public override void serverConnection(DCXREQ req, Association serverino, DCXOBJ query) { queryResults = req.Query(serverino.myAET, serverino.TargetAET, serverino.TargetIp, serverino.TargetPort, "1.2.840.10008.5.1.4.1.2.1.1", query); }
public static String find(Association ass, Selector sel) { DCXOBJ obj = fillData(sel); String ret = ""; // Create the requester object DCXREQ req = new DCXREQ(); // send the query DCXOBJIterator it = req.Query(ass.myAET, ass.TargetAET, ass.TargetIp, ass.TargetPort, "1.2.840.10008.5.1.4.1.2.1.1", obj); DCXOBJ currObj = null; try { int index = 1; // Iterate over the query results for (; !it.AtEnd(); it.Next()) { currObj = it.Get(); string message = ""; message += stampa(currObj, (int)DICOM_TAGS_ENUM.patientName); if (level == "STUDY" || level == "SERIES" || level == "IMAGE") { message += stampa(currObj, (int)DICOM_TAGS_ENUM.StudyDescription); } if (level == "SERIES" || level == "IMAGE") { message += stampa(currObj, (int)DICOM_TAGS_ENUM.SeriesDescription); } if (level == "IMAGE") { message += stampa(currObj, (int)DICOM_TAGS_ENUM.sopClassUid); message += stampa(currObj, (int)DICOM_TAGS_ENUM.sopInstanceUID); } if (level == "STUDY") { message += stampa(currObj, (int)DICOM_TAGS_ENUM.studyInstanceUID); } if (level == "SERIES") { message += stampa(currObj, (int)DICOM_TAGS_ENUM.seriesInstanceUID); if (index == 1) // l'UID della serie รจ il primo dello studio // non uso la funzione stampa, se no mi aggiunge altro testo oltre all'id { try { currElem = currObj.getElementByTag((int)DICOM_TAGS_ENUM.seriesInstanceUID); } catch (Exception e) { Console.WriteLine(e.Message); } //Tag Not Found ret = currElem.Value; Console.WriteLine(ret); } } index++; Console.WriteLine(message); } } catch (Exception ex) { MessageBox.Show(ex.Message); } return(ret); }