SendNDeleteRequest Example for C#
//LEADDICOMNet1 is a predefined LEADDicomNet object
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestSendNDeleteRequest ( )
{
const string UID_SC_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.7";
// Secondary Capture Image Storage
string szClassUID = null;
string szInstanceUID = null;
short nID = 0;
int hPDU = 0;
short nRet = 0;
hPDU = LEADDICOMNet1.GetAssociate(LEADDICOMNet1.hNet);
szClassUID = UID_SC_IMAGE_STORAGE ;
szInstanceUID = "1.2.840.113619.2.30.1.1762288927.1489.906240296.255";
//send a Delete Request Command to the server
nID = LEADDICOMNet1.FindPresentationAbstract(hPDU,
szClassUID);
if (nID == 0)
{
nRet = LEADDICOM1.FindUID(szClassUID);
if (nRet == 0)
MessageBox.Show("Abstract Syntax, " + LEADDICOM1.get_CurrentUID().Name
+ ", Not Supported by Association!");
else
MessageBox.Show("Abstract Syntax, " + szClassUID + ", Not
Supported by Association!");
return;
}
LEADDICOMNet1.SendNDeleteRequest(LEADDICOMNet1.hNet,
nID, 999, szClassUID, szInstanceUID);
}