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 override void serverConnection(DCXREQ req, Association serverino, DCXOBJ moveQuery) { req.MoveAndStore( serverino.myAET, // The AE title that issue the C-MOVE serverino.TargetAET, // The PACS AE title serverino.TargetIp, // The PACS IP address serverino.TargetPort, // The PACS listener port serverino.myAET, // The AE title to send the moveQuery, // The matching criteria serverino.myPort, // The port to receive the results accepter); // The accepter to handle the results }
public static void moveAndStore(Association ass, Selector sel) { // Create an object with the query matching criteria (Identifier) DCXOBJ query = fillData(sel); // Create an accepter to handle the incomming association DCXACC accepter = new DCXACC(); accepter.StoreDirectory = @"C:/Users/daniele/Desktop/provaDicom"; Directory.CreateDirectory(accepter.StoreDirectory); // Create a requester and run the query DCXREQ requester = new DCXREQ(); requester.MoveAndStore( ass.myAET, // The AE title that issue the C-MOVE ass.TargetAET, // The PACS AE title ass.TargetIp, // The PACS IP address ass.TargetPort, // The PACS listener port ass.myAET, // The AE title to send the query, // The matching criteria 104, // The port to receive the results accepter); // The accepter to handle the results }
public override void setCallbackDelegate(DCXREQ req) { req.OnMoveResponseRecievedEx += new IDCXREQEvents_OnMoveResponseRecievedExEventHandler(OnMoveResponseRecievedEx); }
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); }
public abstract void setCallbackDelegate(DCXREQ req);
public abstract void serverConnection(DCXREQ req, Association serverino, DCXOBJ query);