public StoreSCP() { errorCount = 0; app = new DCXAPP(); app.StartLogging("C:/Users/daniele/Desktop/dicomLog.txt"); // creo l'accettore acc = new DCXACC(); // connetto gli eventi alle callback acc.OnConnection += new IDCXACCEvents_OnConnectionEventHandler(OnConnectionEventHandler); acc.OnStoreSetup += new IDCXACCEvents_OnStoreSetupEventHandler(OnStoreSetupEventHandler); acc.OnTimeout += new IDCXACCEvents_OnTimeoutEventHandler(OnTimeoutEventHandler); acc.OnStoreDone += new IDCXACCEvents_OnStoreDoneEventHandler(OnStoreDoneEventHandler); acc.OnCommitResult += new IDCXACCEvents_OnCommitResultEventHandler(OnCommitResultEventHandler); }
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 }