Exemplo n.º 1
0
        private static void AddReferencedSopSequence(ReferencedSopItemCollection storageCommitItems,
			uint tag,
			DvtkData.Dimse.AttributeSet attributeSet,
			InstanceStateEnum newInstanceState)
        {
            ushort group = (ushort)(tag >> 16);
            ushort element = (ushort)(tag & 0x0000FFFF);
            DvtkData.Dimse.Tag tagValue = new DvtkData.Dimse.Tag(group, element);

            DvtkData.Dimse.Attribute referencedSopSequence = attributeSet.GetAttribute(tagValue);
            if (referencedSopSequence != null)
            {
                attributeSet.Remove(referencedSopSequence);
            }

            referencedSopSequence = new DvtkData.Dimse.Attribute(tag, DvtkData.Dimse.VR.SQ);
            SequenceOfItems referencedSopSequenceOfItems = new SequenceOfItems();
            referencedSopSequence.DicomValue = referencedSopSequenceOfItems;

            foreach(ReferencedSopItem  referencedSopItem in storageCommitItems)
            {
                if (((referencedSopItem.InstanceState == InstanceStateEnum.InstanceStored) &&
                    (newInstanceState == InstanceStateEnum.InstanceMppsCompleted)) ||
                    ((referencedSopItem.InstanceState == InstanceStateEnum.InstanceMppsCompleted) &&
                    (newInstanceState == InstanceStateEnum.InstanceStorageCommitRequested)))
                {

                    DvtkData.Dimse.SequenceItem referencedSopSequenceItem = new DvtkData.Dimse.SequenceItem();
                    referencedSopSequenceItem.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_CLASS_UID.GroupNumber,
                        DvtkData.Dimse.Tag.REFERENCED_SOP_CLASS_UID.ElementNumber,
                        DvtkData.Dimse.VR.UI, referencedSopItem.SopClassUid);
                    referencedSopSequenceItem.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_INSTANCE_UID.GroupNumber,
                        DvtkData.Dimse.Tag.REFERENCED_SOP_INSTANCE_UID.ElementNumber,
                        DvtkData.Dimse.VR.UI, referencedSopItem.SopInstanceUid);
                    referencedSopItem.InstanceState = newInstanceState;
                    referencedSopSequenceOfItems.Sequence.Add(referencedSopSequenceItem);
                }
            }
            attributeSet.Add(referencedSopSequence);
        }
Exemplo n.º 2
0
 private static void AddSopData(ReferencedSopItemCollection storageCommitItems, DvtkHighLevelInterface.Dicom.Messages.DicomMessage dicomMessage)
 {
     Values values = dicomMessage.CommandSet["0x00000002"].Values;
     System.String sopClassUid = values[0];
     values = dicomMessage.CommandSet["0x00001000"].Values;
     System.String sopInstanceUid = values[0];
     ReferencedSopItem storageCommitItem = storageCommitItems.Find(sopClassUid, sopInstanceUid);
     if (storageCommitItem == null)
     {
         storageCommitItem = new ReferencedSopItem(sopClassUid, sopInstanceUid);
         storageCommitItem.InstanceState = InstanceStateEnum.InstanceStored;
         storageCommitItems.Add(storageCommitItem);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Generate an NSet MPPS Completed/Discontinued by taking the default values from the given
        /// DCM file. The default manager is required to get the appropriate Series Instance UID.
        /// </summary>
        /// <param name="mppsCompletedDiscontinuedDcmFilename">Used to get the dataset default values.</param>
        /// <param name="defaultValueManager">For the Series Instance UID.</param>
        /// <param name="storageCommitItems">Corresponding Storage Commitment items.</param>
        /// <param name="mppsCompletedDiscontinuedMessage">MPPS Completed/Discontinued message being populated.</param>
        /// <param name="mppsInstanceUid">MPPS Instance UID.</param>
        public static void MakeNSetMppsCompletedDiscontinued(System.String mppsCompletedDiscontinuedDcmFilename,
			Dvtk.Dicom.InformationEntity.DefaultValues.DefaultValueManager defaultValueManager,
			ReferencedSopItemCollection storageCommitItems,
			DvtkHighLevelInterface.Dicom.Messages.DicomMessage mppsCompletedDiscontinuedMessage,
			System.String mppsInstanceUid)
        {
            mppsCompletedDiscontinuedMessage.Set("0x00000003", VR.UI, "1.2.840.10008.3.1.2.3.3");
            mppsCompletedDiscontinuedMessage.Set("0x00001001", VR.UI, mppsInstanceUid);

            // Read the DCM file
            mppsCompletedDiscontinuedMessage.DataSet.DvtkDataDataSet = Dvtk.DvtkDataHelper.ReadDataSetFromFile(mppsCompletedDiscontinuedDcmFilename);

            // Update the procedure step end date & time values
            UpdateEndDateTimeValues(defaultValueManager, mppsCompletedDiscontinuedMessage.DataSet.DvtkDataDataSet);

            // Add the storage commitment items
            AddStorageCommitItems(defaultValueManager, storageCommitItems, mppsCompletedDiscontinuedMessage.DataSet.DvtkDataDataSet);
        }
Exemplo n.º 4
0
        private static void AddDefaultMppsCompletedDiscontinuedValues(Dvtk.Dicom.InformationEntity.DefaultValues.DefaultValueManager defaultValueManager,
			ReferencedSopItemCollection storageCommitItems,
			DvtkData.Dimse.DataSet dataset,
			System.String mppsStatus)
        {
            DvtkData.Dimse.SequenceItem performedSeriesSequenceItem = new DvtkData.Dimse.SequenceItem();

            // Series Entity default values
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.PROTOCOL_NAME, VR.LO, performedSeriesSequenceItem);
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.RETRIEVE_AE_TITLE, VR.AE, performedSeriesSequenceItem);
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.SERIES_DESCRIPTION, VR.LO, performedSeriesSequenceItem);
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.PERFORMING_PHYSICIANS_NAME, VR.PN, performedSeriesSequenceItem);
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.OPERATORS_NAME, VR.PN, performedSeriesSequenceItem);

            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.SERIES_INSTANCE_UID, VR.UI, performedSeriesSequenceItem);

            performedSeriesSequenceItem.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_STANDALONE_SOP_INSTANCE_SEQUENCE.GroupNumber,
                DvtkData.Dimse.Tag.REFERENCED_STANDALONE_SOP_INSTANCE_SEQUENCE.ElementNumber,
                DvtkData.Dimse.VR.SQ);

            // Performed Procedure Step Entity default values
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.PERFORMED_PROCEDURE_STEP_END_DATE, VR.DA, dataset);
            AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.PERFORMED_PROCEDURE_STEP_END_TIME, VR.TM, dataset);

            if (defaultValueManager.GetInstantiatedValue(DvtkData.Dimse.Tag.COMMENTS_ON_THE_PERFORMED_PROCEDURE_STEPS) != System.String.Empty)
            {
                AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.COMMENTS_ON_THE_PERFORMED_PROCEDURE_STEPS, VR.ST, dataset);
            }

            AddReferencedSopSequence(storageCommitItems, 0x00081140, performedSeriesSequenceItem, InstanceStateEnum.InstanceMppsCompleted);

            dataset.AddAttribute(DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.GroupNumber,
                DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.ElementNumber,
                DvtkData.Dimse.VR.SQ, performedSeriesSequenceItem);

            dataset.AddAttribute(DvtkData.Dimse.Tag.PERFORMED_PROCEDURE_STEP_STATUS.GroupNumber,
                DvtkData.Dimse.Tag.PERFORMED_PROCEDURE_STEP_STATUS.ElementNumber,
                VR.CS, mppsStatus);

            // Add any RadiationDoseDefaultValues default values
            AddRadiationDoseDefaultValues(defaultValueManager, dataset);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Make a N-ACTION storage commitment.
        /// </summary>
        /// <param name="storageCommitItems">The storage commitment items.</param>
        /// <param name="storageCommitmentMessage">The storage commitment message.</param>
        /// <param name="storageCommitTransactionUid">The storage commitment transaction UID.</param>
        /// <param name="mppsInstanceUid">The MPPS instance UID.</param>
        public static void MakeNActionStorageCommitment(ReferencedSopItemCollection storageCommitItems,
			DvtkHighLevelInterface.Dicom.Messages.DicomMessage storageCommitmentMessage,
			System.String storageCommitTransactionUid,
			System.String mppsInstanceUid)
        {
            storageCommitmentMessage.Set("0x00000003", VR.UI, "1.2.840.10008.1.20.1");
            storageCommitmentMessage.Set("0x00001001", VR.UI, "1.2.840.10008.1.20.1.1"); // Well known Instance UID
            storageCommitmentMessage.Set("0x00001008", VR.US, 1);

            // Add the required values to the StorageCommitment message
            AddStorageCommitmentValues(storageCommitItems,
                storageCommitmentMessage.DataSet.DvtkDataDataSet,
                storageCommitTransactionUid,
                mppsInstanceUid);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Generate an NSet MPPS Completed/Discontinued by taking the default values from the Default
        /// Value Manager.
        /// </summary>
        /// <param name="defaultValueManager">Used to get the default values.</param>
        /// <param name="storageCommitItems">Corresponding Storage Commitment items.</param>
        /// <param name="mppsCompletedDiscontinuedMessage">MPPS Completed/Discontinued message being populated.</param>
        /// <param name="mppsInstanceUid">MPPS Instance UID.</param>
        /// <param name="mppsStatus"></param>
        public static void MakeNSetMppsCompletedDiscontinued(Dvtk.Dicom.InformationEntity.DefaultValues.DefaultValueManager defaultValueManager,
			ReferencedSopItemCollection storageCommitItems,
			DvtkHighLevelInterface.Dicom.Messages.DicomMessage mppsCompletedDiscontinuedMessage,
			System.String mppsInstanceUid,
			System.String mppsStatus)
        {
            mppsCompletedDiscontinuedMessage.Set("0x00000003", VR.UI, "1.2.840.10008.3.1.2.3.3");
            mppsCompletedDiscontinuedMessage.Set("0x00001001", VR.UI, mppsInstanceUid);

            // Add the default values to the MppsCompletedDiscontinued message
            AddDefaultMppsCompletedDiscontinuedValues(defaultValueManager, storageCommitItems, mppsCompletedDiscontinuedMessage.DataSet.DvtkDataDataSet, mppsStatus);
        }
Exemplo n.º 7
0
 /// <summary>
 /// Handle C-STORE responses.
 /// </summary>
 /// <param name="storageCommitItems">The storage commitment items.</param>
 /// <param name="cStoreResponses">The C-STORE responses.</param>
 public static void HandleCStoreResponses(ReferencedSopItemCollection storageCommitItems, DvtkHighLevelInterface.Dicom.Messages.DicomMessageCollection cStoreResponses)
 {
     foreach(DvtkHighLevelInterface.Dicom.Messages.DicomMessage cStoreRsp in cStoreResponses)
     {
         AddSopData(storageCommitItems, cStoreRsp);
     }
 }
Exemplo n.º 8
0
        /// <summary>
        /// Handle N-EVENT-REPORT for storage commitment.
        /// </summary>
        /// <param name="storageCommitItems">The storage commitment items.</param>
        /// <param name="storageCommitmentMessage">The storage commitment message.</param>
        public static void HandleNEventReportStorageCommitment(ReferencedSopItemCollection storageCommitItems,
			DvtkHighLevelInterface.Dicom.Messages.DicomMessage storageCommitmentMessage)
        {
            DvtkData.Dimse.DataSet dataset = storageCommitmentMessage.DataSet.DvtkDataDataSet;
            if (dataset != null)
            {
                // Try to get the successfully stored instances
                DvtkData.Dimse.Attribute eventReferenceSopSequence = dataset.GetAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_SEQUENCE);
                if (eventReferenceSopSequence != null)
                {
                    SequenceOfItems sequenceOfItems = (SequenceOfItems)eventReferenceSopSequence.DicomValue;
                    foreach (DvtkData.Dimse.SequenceItem item in sequenceOfItems.Sequence)
                    {
                        UpdateReferencedSopItem(storageCommitItems, item, InstanceStateEnum.InstanceStorageCommitReportedSuccess);
                    }
                }

                // try to get the unsuccessfully stored instances
                DvtkData.Dimse.Attribute eventFailedSopSequence = dataset.GetAttribute(DvtkData.Dimse.Tag.FAILED_SOP_SEQUENCE);
                if (eventFailedSopSequence != null)
                {
                    SequenceOfItems sequenceOfItems = (SequenceOfItems)eventFailedSopSequence.DicomValue;
                    foreach (DvtkData.Dimse.SequenceItem item in sequenceOfItems.Sequence)
                    {
                        UpdateReferencedSopItem(storageCommitItems, item, InstanceStateEnum.InstanceStorageCommitReportedFailure);
                    }
                }
            }
        }
Exemplo n.º 9
0
        private static void AddStorageCommitmentValues(ReferencedSopItemCollection storageCommitItems,
			DvtkData.Dimse.DataSet dataset,
			System.String storageCommitTransactionUid,
			System.String mppsInstanceUid)
        {
            DvtkData.Dimse.SequenceItem referencedStudyComponentSequenceItem = new DvtkData.Dimse.SequenceItem();
            referencedStudyComponentSequenceItem.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_CLASS_UID.GroupNumber,
                DvtkData.Dimse.Tag.REFERENCED_SOP_CLASS_UID.ElementNumber,
                DvtkData.Dimse.VR.UI, "1.2.840.10008.3.1.2.3.3");
            referencedStudyComponentSequenceItem.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_INSTANCE_UID.GroupNumber,
                DvtkData.Dimse.Tag.REFERENCED_SOP_INSTANCE_UID.ElementNumber,
                DvtkData.Dimse.VR.UI, mppsInstanceUid);
            dataset.AddAttribute(DvtkData.Dimse.Tag.REFERENCED_STUDY_COMPONENT_SEQUENCE.GroupNumber,
                DvtkData.Dimse.Tag.REFERENCED_STUDY_COMPONENT_SEQUENCE.ElementNumber,
                DvtkData.Dimse.VR.SQ, referencedStudyComponentSequenceItem);

            AddReferencedSopSequence(storageCommitItems, 0x00081199, dataset, InstanceStateEnum.InstanceStorageCommitRequested);

            dataset.AddAttribute(DvtkData.Dimse.Tag.TRANSACTION_UID.GroupNumber,
                DvtkData.Dimse.Tag.TRANSACTION_UID.ElementNumber,
                DvtkData.Dimse.VR.UI, storageCommitTransactionUid);
        }
Exemplo n.º 10
0
        private static void UpdateReferencedSopItem(ReferencedSopItemCollection storageCommitItems, DvtkData.Dimse.SequenceItem item, InstanceStateEnum newInstanceState)
        {
            if (item != null)
            {
                System.String sopClassUid = System.String.Empty;
                System.String sopInstanceUid = System.String.Empty;

                // Try to get the SOP Class UID and SOP Instance UID out of the item
                DvtkData.Dimse.Attribute attribute = item.GetAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_CLASS_UID);
                if (attribute != null)
                {
                    UniqueIdentifier uniqueIdentifier = (UniqueIdentifier)attribute.DicomValue;
                    if (uniqueIdentifier.Values.Count > 0)
                    {
                        sopClassUid = uniqueIdentifier.Values[0];
                    }
                }

                attribute = item.GetAttribute(DvtkData.Dimse.Tag.REFERENCED_SOP_INSTANCE_UID);
                if (attribute != null)
                {
                    UniqueIdentifier uniqueIdentifier = (UniqueIdentifier)attribute.DicomValue;
                    if (uniqueIdentifier.Values.Count > 0)
                    {
                        sopInstanceUid = uniqueIdentifier.Values[0];
                    }
                }
                ReferencedSopItem referencedSopItem = storageCommitItems.Find(sopClassUid, sopInstanceUid);
                if ((referencedSopItem != null) &&
                    (referencedSopItem.InstanceState == InstanceStateEnum.InstanceStorageCommitRequested))
                {
                    referencedSopItem.InstanceState = newInstanceState;
                }
            }
        }
Exemplo n.º 11
0
        private static void AddStorageCommitItems(Dvtk.Dicom.InformationEntity.DefaultValues.DefaultValueManager defaultValueManager,
			ReferencedSopItemCollection storageCommitItems,
			DvtkData.Dimse.DataSet dataset)
        {
            DvtkData.Dimse.SequenceItem performedSeriesSequenceItem = null;

            // Try to get the Performed Series Sequence
            DvtkData.Dimse.Attribute performedSeriesSequence = dataset.GetAttribute(DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE);
            if (performedSeriesSequence != null)
            {
                DvtkData.Dimse.SequenceOfItems sequenceOfItems = (DvtkData.Dimse.SequenceOfItems)performedSeriesSequence.DicomValue;
                if (sequenceOfItems.Sequence.Count == 1)
                {
                    performedSeriesSequenceItem = sequenceOfItems.Sequence[0];
                }
                else
                {
                    dataset.Remove(performedSeriesSequence);

                    performedSeriesSequenceItem = new DvtkData.Dimse.SequenceItem();

                    dataset.AddAttribute(DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.GroupNumber,
                        DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.ElementNumber,
                        DvtkData.Dimse.VR.SQ, performedSeriesSequenceItem);
                }
            }
            else
            {
                performedSeriesSequenceItem = new DvtkData.Dimse.SequenceItem();

                dataset.AddAttribute(DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.GroupNumber,
                    DvtkData.Dimse.Tag.PERFORMED_SERIES_SEQUENCE.ElementNumber,
                    DvtkData.Dimse.VR.SQ, performedSeriesSequenceItem);
            }

            if (performedSeriesSequenceItem != null)
            {
                // Series Entity default values
                DvtkData.Dimse.Attribute seriesInstanceUid = performedSeriesSequenceItem.GetAttribute(DvtkData.Dimse.Tag.SERIES_INSTANCE_UID);
                if (seriesInstanceUid != null)
                {
                    performedSeriesSequenceItem.Remove(seriesInstanceUid);
                }
                AddDefaultValue(defaultValueManager, DvtkData.Dimse.Tag.SERIES_INSTANCE_UID, VR.UI, performedSeriesSequenceItem);

                AddReferencedSopSequence(storageCommitItems, 0x00081140, performedSeriesSequenceItem, InstanceStateEnum.InstanceMppsCompleted);
            }
        }
Exemplo n.º 12
0
        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();
        }
Exemplo n.º 13
0
 private void HandleCStoreResponses(ReferencedSopItemCollection storageCommitItems, DicomMessageCollection cStoreResponses)
 {
     foreach (DicomMessage cStoreRsp in cStoreResponses)
     {
         AddSopData(storageCommitItems, cStoreRsp);
     }
 }
Exemplo n.º 14
0
        private bool TriggerModalityWorklistQuery(DicomTrigger trigger)
        {
            // Start with empty worklist and storage commit items
            _modalityWorklistItems = new DicomQueryItemCollection();
            _storageCommitItems = new ReferencedSopItemCollection();
            _nCreateSetMppsInProgress = null;

            // RAD-5 - trigger the DssOrderFiller
            bool triggerResult = TriggerActorInstances(ActorTypeEnum.DssOrderFiller, trigger, true);

            // Get the worklist items returned
            if (triggerResult == true)
            {
                foreach (ActorsTransaction actorsTransaction in ActorsTransactionLog)
                {
                    if (actorsTransaction.FromActorName.Type == ActorTypeEnum.DssOrderFiller)
                    {
                        BaseTransaction baseTransaction = actorsTransaction.Transaction;
                        if (baseTransaction is DicomTransaction)
                        {
                            DicomTransaction dicomTransaction = (DicomTransaction)baseTransaction;
                            if (dicomTransaction.Processed == false)
                            {
                                DicomMessageCollection cFindResponses = dicomTransaction.DicomMessages.CFindResponses;
                                int index = 0;
                                foreach (DvtkHighLevelInterface.Dicom.Messages.DicomMessage dicomMessage in cFindResponses)
                                {
                                    if (dicomMessage.DataSet.Count != 0)
                                    {
                                        DicomQueryItem dicomWorklistItem = new DicomQueryItem(index++, dicomMessage);
                                        _modalityWorklistItems.Add(dicomWorklistItem);
                                    }
                                }
                                dicomTransaction.Processed = true;
                            }
                        }
                    }
                }
            }

            return triggerResult;
        }
Exemplo n.º 15
0
 /// <summary>
 /// Class constructor.
 /// </summary>
 /// <param name="id">Actor Id.</param>
 /// <param name="iheFramework">Ihe Framework container.</param>
 public AcquisitionModalityActor(System.String id, Dvtk.IheActors.IheFramework.IheFramework iheFramework)
     : base(new ActorName(ActorTypeEnum.AcquisitionModality, id), iheFramework)
 {
     _modalityWorklistItems = new DicomQueryItemCollection();
     _storageCommitItems = new ReferencedSopItemCollection();
 }