public OverviewThread(DicomThreadOptions mppsOptions, DicomThread thread, ArrayList selectedTS, bool isSendRandomRsps, string dcmFile, int nrOfRsps) { this.mppsOptions = mppsOptions; this.worklistThread = thread; this.worklistOptions = thread.Options; this.selectedTSList = selectedTS; this.sendRandomizeRsps = isSendRandomRsps; this.selectedDCMFile = dcmFile; this.nrOfRandomRsps = nrOfRsps; }
public OverviewThread(DicomThreadOptions mppsOptions, DicomThread thread, ArrayList selectedTS, bool isSendRandomRsps, string dcmFile, int nrOfRsps) { this.mppsOptions = mppsOptions; this.worklistThread = thread; this.worklistOptions = thread.Options; this.selectedTSList = selectedTS; this.sendRandomizeRsps = isSendRandomRsps; this.selectedDCMFile = dcmFile; this.nrOfRandomRsps = nrOfRsps; }
public OverviewThread(DicomThreadOptions storageOptions, DicomThreadOptions commitOption, ArrayList selectedSOP, ArrayList selectedTS, ArrayList selectedTSCommit, int delay, String startDateTime) { this.storeOptions = storageOptions; this.commitOptions = commitOption; this.selectedSOPList = selectedSOP; foreach (string ts in selectedTS) { selectedTSList.Add(ts); } this.selectedTSCommitList = selectedTSCommit; this.eventDelay = delay * 1000; this.startDateTime = startDateTime; }
private void Initialize() { // // Construct the MPPS DicomOptions implicitly by constructing a DicomThread. // IteratorClass mppsDicomThread = new IteratorClass(rootPath, validationResultsFileGroup.Directory, /* "MPPS_SCP.ses", */ "MPPS"); this.mppsOptions = mppsDicomThread.Options; // // Construct the Worklist DicomOptions implicitly by constructing a DicomThread. // worklistDicomThread = new IteratorClass(rootPath, validationResultsFileGroup.Directory, /*"WLM_SCP.ses",*/ "Worklist"); this.worklistOptions = worklistDicomThread.Options; }
private void SaveToSessionFiles(DicomThreadOptions storageOptions, DicomThreadOptions storageCommitOptions) { storageOptions.SaveToFile(Path.Combine(applDirectory, "StorageSCPEmulator.ses")); storageCommitOptions.SaveToFile(Path.Combine(applDirectory, "CommitSCPEmulator.ses")); }
public StorageSCPEmulator() { // // Required for Windows Form Designer support // InitializeComponent(); this.dvtkWebBrowserSCPEmulator.XmlStyleSheetFullFileName = applDirectory + "\\DVT_RESULTS.xslt"; this.dvtkWebBrowserSCPEmulator.BackwardFormwardEnabledStateChangeEvent += new DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(dvtkWebBrowserSCPEmulator_BackwardFormwardEnabledStateChangeEvent); this.dvtkWebBrowserSCPEmulator.ErrorWarningEnabledStateChangeEvent += new DvtkWebBrowserNew.ErrorWarningEnabledStateChangeEventHandler(dvtkWebBrowserSCPEmulator_ErrorWarningEnabledStateChangeEvent); selectedTS.Add("1.2.840.10008.1.2"); selectedTS.Add("1.2.840.10008.1.2.1"); selectedTS.Add("1.2.840.10008.1.2.2"); selectedTS.Add("1.2.840.10008.1.2.4.70"); selectedTS.Add("1.2.840.10008.1.2.4.50"); selectedTS.Add("1.2.840.10008.1.2.5"); selectedSops.Add("1.2.840.10008.1.1"); selectedTSCommit.Add("1.2.840.10008.1.2"); selectedTSCommit.Add("1.2.840.10008.1.2.1"); selectedTSCommit.Add("1.2.840.10008.1.2.2"); // // Set the .Net thread name for debugging purposes. // System.Threading.Thread.CurrentThread.Name = "Storage SCP Emulator"; // // The ThreadManager. // this.threadManager = new ThreadManager(); // // Construct the Storage DicomOptions implicitly by constructing a DicomThread. // storageSCPDicomThread = new SCP(); storageSCPDicomThread.Initialize(this.threadManager); this.storageOptions = storageSCPDicomThread.Options; this.storageOptions.Identifier = "Storage SCP"; this.storageOptions.AttachChildsToUserInterfaces = true; this.storageOptions.StorageMode = Dvtk.Sessions.StorageMode.AsMedia; this.storageOptions.LogThreadStartingAndStoppingInParent = false; this.storageOptions.LogWaitingForCompletionChildThreads = false; // // Construct the Storage DicomOptions implicitly by constructing a DicomThread. // storageCommitSCPDicomThread = new SCP(); storageCommitSCPDicomThread.Initialize(this.threadManager); this.storageCommitOptions = storageCommitSCPDicomThread.Options; this.storageCommitOptions.Identifier = "Storage Commit SCP"; this.storageCommitOptions.AttachChildsToUserInterfaces = true; this.storageCommitOptions.StorageMode = Dvtk.Sessions.StorageMode.NoStorage; this.storageCommitOptions.LogThreadStartingAndStoppingInParent = false; this.storageCommitOptions.LogWaitingForCompletionChildThreads = false; this.threadsStateChangeEventHandler = new ThreadManager.ThreadsStateChangeEventHandler(this.HandleThreadsStateChangeEvent); }
public void Initialize(string FilePath, DicomThreadOptions Options) { options = Options; Initialize(FilePath); }
public StorageSCUEmulator() { // // Required for Windows Form Designer support // InitializeComponent(); InitializeBackgoundWorker(); this.dvtkWebBrowserSCUEmulator.XmlStyleSheetFullFileName = applDirectory + "\\DVT_RESULTS.xslt"; this.dvtkWebBrowserSCUEmulator.BackwardFormwardEnabledStateChangeEvent +=new DvtkApplicationLayer.UserInterfaces.DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(dvtkWebBrowserSCUEmulator_BackwardFormwardEnabledStateChangeEvent); this.dvtkWebBrowserSCUEmulator.ErrorWarningEnabledStateChangeEvent += new DvtkWebBrowserNew.ErrorWarningEnabledStateChangeEventHandler(dvtkWebBrowserSCUEmulator_ErrorWarningEnabledStateChangeEvent); selectedTS.Add("1.2.840.10008.1.2"); selectedTS.Add("1.2.840.10008.1.2.1"); selectedTS.Add("1.2.840.10008.1.2.2"); // // Set the .Net thread name for debugging purposes. // System.Threading.Thread.CurrentThread.Name = "Storage SCU Emulator"; this.threadsStateChangeEventHandler = new ThreadManager.ThreadsStateChangeEventHandler(this.HandleThreadsStateChangeEvent); updateUIControlsHandler = new UpdateUIControlsDelegate(UpdateUIControls); updateUIControlsFromBGThreadHandler = new UpdateUIControlsFromBGThreadDelegate(UpdateUIControlsFromBGThread); this.threadManager = new ThreadManager(); this.threadManager.ThreadsStateChangeEvent += this.threadsStateChangeEventHandler; // // Stored files options. // this.fileGroups = new FileGroups("Storage SCU Emulator"); this.validationResultsFileGroup = new ValidationResultsFileGroup(); this.validationResultsFileGroup.DefaultFolder = "Results"; this.fileGroups.Add(validationResultsFileGroup); this.fileGroups.CreateDirectories(); this.fileGroups.CheckIsConfigured("\"Stored Files\\Options...\" menu item"); // Set Storage thread StoreScu storageScu = new StoreScu(); storageScu.Initialize(this.threadManager); this.storageOptions = storageScu.Options; this.storageOptions.LoadFromFile(Path.Combine(applDirectory, "StorageSCUEmulator.ses")); this.storageOptions.StorageMode = Dvtk.Sessions.StorageMode.AsMediaOnly; this.storageOptions.ResultsDirectory = validationResultsFileGroup.Directory; this.storageOptions.DataDirectory = validationResultsFileGroup.Directory; //Environment.CurrentDirectory = this.storageOptions.ResultsDirectory; //Set the Commit thread CommitScu commitScu = new CommitScu(this); commitScu.Initialize(this.threadManager); this.storageCommitSCUOptions = commitScu.Options; this.storageCommitSCUOptions.LoadFromFile(Path.Combine(applDirectory, "CommitSCUEmulator.ses")); this.storageCommitSCUOptions.ResultsDirectory = validationResultsFileGroup.Directory; this.storageCommitSCUOptions.DataDirectory = validationResultsFileGroup.Directory; // Make sure the session files contain the same information as the Stored Files user settings. SaveToSessionFiles(this.storageOptions, this.storageCommitSCUOptions); this.storageCommitItems = new ReferencedSopItemCollection(); }
public void Initialize(string FilePath, DicomThreadOptions Options) { options = Options; Initialize(FilePath); }
/// <summary> /// Default constructor. /// </summary> public RisEmulator() { // // Required for Windows Form Designer support // InitializeComponent(); if (!Directory.Exists(ConfigurationsDirectory)) { Directory.CreateDirectory(ConfigurationsDirectory); } this.config = Config.Deserialize(Path.Combine(ConfigurationsDirectory, "Config.xml")); Config.ConfigFullFileName = Path.Combine(ConfigurationsDirectory, "Config.xml"); // // Initialize the browser control. // rootPath = Application.StartupPath; this.dvtkWebBrowserResults.XmlStyleSheetFullFileName = Path.Combine(rootPath, "DVT_RESULTS.xslt"); if(config.TSILESupport) selectedTS.Add("1.2.840.10008.1.2"); if(config.TSELESupport) selectedTS.Add("1.2.840.10008.1.2.1"); if(config.TSEBESupport) selectedTS.Add("1.2.840.10008.1.2.2"); //if (config.SPSDChecked) // checkBoxSPSD.Checked = true; //else // checkBoxSPSD.Checked = false; // // Set the .Net thread name for debugging purposes. // System.Threading.Thread.CurrentThread.Name = "RIS Emulator"; // // Stored files options. // this.fileGroups = new FileGroups("RIS Emulator"); this.validationResultsFileGroup = new ValidationResultsFileGroup(); this.validationResultsFileGroup.DefaultFolder = "Results"; this.fileGroups.Add(validationResultsFileGroup); this.fileGroups.CreateDirectories(); this.fileGroups.CheckIsConfigured("\"Stored Files\\Options...\" menu item"); // // The ThreadManager. // ThreadManager threadManager = new ThreadManager(); // // Construct the MPPS DicomOptions implicitly by constructing a DicomThread. // SCP mppsDicomThread = new SCP(); mppsDicomThread.Initialize(threadManager); this.mppsOptions = mppsDicomThread.Options; this.mppsOptions.LoadFromFile(Path.Combine(rootPath, "MPPS_SCP.ses")); this.mppsOptions.Identifier = "MPPS"; this.mppsOptions.AttachChildsToUserInterfaces = true; this.mppsOptions.StorageMode = Dvtk.Sessions.StorageMode.NoStorage; this.mppsOptions.LogThreadStartingAndStoppingInParent = false; this.mppsOptions.LogWaitingForCompletionChildThreads = false; this.mppsOptions.ResultsDirectory = validationResultsFileGroup.Directory; // // Construct the Worklist DicomOptions implicitly by constructing a DicomThread. // worklistDicomThread = new SCP(); worklistDicomThread.Initialize(threadManager); this.worklistOptions = worklistDicomThread.Options; this.worklistOptions.LoadFromFile(Path.Combine(rootPath, "WLM_SCP.ses")); this.worklistOptions.Identifier = "Worklist"; this.worklistOptions.AttachChildsToUserInterfaces = true; this.worklistOptions.StorageMode = Dvtk.Sessions.StorageMode.NoStorage; this.worklistOptions.LogThreadStartingAndStoppingInParent = false; this.worklistOptions.LogWaitingForCompletionChildThreads = false; this.worklistOptions.ResultsDirectory = validationResultsFileGroup.Directory; // // Initialize the DicomThreadOptionsControls // this.mppsOptionsControl.DicomThreadOptions = this.mppsOptions; this.mppsOptionsControl.LocalAeTitleVisible = true; this.mppsOptionsControl.LocalPortVisible = true; this.mppsOptionsControl.RemoteAeTitleVisible = true; this.mppsOptionsControl.OptionChangedEvent+= new DicomThreadOptionsUserControl.OptionChangedEventHandler(this.HandleOptionChanged); this.mppsOptionsControl.UpdateUserControl(); this.worklistOptionsControl.DicomThreadOptions = this.worklistOptions; this.worklistOptionsControl.LocalAeTitleVisible = true; this.worklistOptionsControl.LocalPortVisible = true; this.worklistOptionsControl.RemoteAeTitleVisible = true; this.worklistOptionsControl.OptionChangedEvent+= new DicomThreadOptionsUserControl.OptionChangedEventHandler(this.HandleOptionChanged); this.worklistOptionsControl.UpdateUserControl(); // Save the config so next time no attempt will be made to again try to load the same settings this.config.Serialize(); // // Set the Backward/forward button handler. // this.dvtkWebBrowserResults.BackwardFormwardEnabledStateChangeEvent+= new DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(BackwardFormwardEnabledStateChangeEvent); UpdateButtons(); // // Other. // this.threadsStateChangeEventHandler = new ThreadManager.ThreadsStateChangeEventHandler(this.HandleThreadsStateChangeEvent); // Load definition and DCM files dcmEditorRISEmulator.DCMFileDataDirectory = validationResultsFileGroup.Directory; dcmEditorRISEmulator.DefFile = this.worklistOptions.DvtkScriptSession.DefinitionManagement.DefinitionFileRootDirectory + "ModalityWorklist-FIND.def"; dcmEditorRISEmulator.DefFile = this.worklistOptions.DvtkScriptSession.DefinitionManagement.DefinitionFileRootDirectory + "ModalityPerformedProcedureStep.def"; dcmEditorRISEmulator.DCMFile = rootPath + @"\Data\Worklist\d1I00001.dcm"; dataDirectory = this.worklistOptions.DataDirectory; //Update settings from the config XML if (config.DataDirectoryForEmulation != "") dataDirectory = config.DataDirectoryForEmulation; else config.DataDirectoryForEmulation = dataDirectory; buttonBrowse.Visible = false; textBoxDataDir.Visible = false; buttonStart.Enabled = false; dataDirectoryForTempFiles = validationResultsFileGroup.Directory; this.WindowState = FormWindowState.Maximized; }
private void SaveToSessionFiles(DicomThreadOptions storageOptions, DicomThreadOptions storageCommitOptions) { this.worklistOptions.SaveToFile(Path.Combine(rootPath, "WLM_SCP.ses")); this.mppsOptions.SaveToFile(Path.Combine(rootPath, "MPPS_SCP.ses")); }