Exemple #1
0
        private PresentationContext[] SetPresentationContexts(DicomTrigger dicomTrigger)
        {
            DicomTriggerItemCollection localTriggerItems = new DicomTriggerItemCollection();

            // use the local trigger items to establish a list of presentation contexts that
            // only appear once
            foreach (DicomTriggerItem triggerItem in dicomTrigger.TriggerItems)
            {
                if (localTriggerItems.FindMatchingPresentationContext(triggerItem) == false)
                {
                    localTriggerItems.Add(triggerItem);
                }
            }

            // now set up the returned presentation contexts from the local trigger collection
            PresentationContext[] presentationContexts = new PresentationContext[localTriggerItems.Count];
            int index = 0;

            foreach (DicomTriggerItem triggerItem in localTriggerItems)
            {
                // save the presentation context
                presentationContexts[index++] = new PresentationContext(triggerItem.SopClassUid,
                                                                        MergeTransferSyntaxes(triggerItem.TransferSyntaxes));
            }

            return(presentationContexts);
        }
Exemple #2
0
        private PresentationContext[] SetPresentationContexts(DicomTrigger dicomTrigger)
        {
            DicomTriggerItemCollection localTriggerItems = new DicomTriggerItemCollection();

            // use the local trigger items to establish a list of presentation contexts that
            // only appear once
            foreach (DicomTriggerItem triggerItem in dicomTrigger.TriggerItems)
            {
                if (localTriggerItems.FindMatchingPresentationContext(triggerItem) == false)
                {
                    localTriggerItems.Add(triggerItem);
                }
            }

            // now set up the returned presentation contexts from the local trigger collection
            PresentationContext[] presentationContexts = new PresentationContext[localTriggerItems.Count];
            int index = 0;
            foreach (DicomTriggerItem triggerItem in localTriggerItems)
            {
                // save the presentation context
                presentationContexts[index++] = new PresentationContext(triggerItem.SopClassUid,
                    MergeTransferSyntaxes(triggerItem.TransferSyntaxes));
            }

            return presentationContexts;
        }