コード例 #1
0
        /// <summary>
        /// Creates a single instance of a ReferencedStudySequence item. Does not modify the ReferencedStudySequence in the underlying collection.
        /// </summary>
        public ISopInstanceReferenceMacro CreateReferencedStudySequence()
        {
            ISopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(new DicomSequenceItem());

            iodBase.InitializeAttributes();
            return(iodBase);
        }
コード例 #2
0
            /// <summary>
            /// Creates the value of ReferencedRealWorldValueMappingInstanceSequence in the underlying collection. Type 3.
            /// </summary>
            public ISopInstanceReferenceMacro CreateReferencedRealWorldValueMappingInstanceSequence()
            {
                DicomElement dicomElement = base.DicomElementProvider[DicomTags.ReferencedRealWorldValueMappingInstanceSequence];

                if (dicomElement.IsNull || dicomElement.Count == 0)
                {
                    DicomSequenceItem dicomSequenceItem = new DicomSequenceItem();
                    dicomElement.Values = new DicomSequenceItem[] { dicomSequenceItem };
                    SopInstanceReferenceMacro iodBase = new SopInstanceReferenceMacro(dicomSequenceItem);
                    iodBase.InitializeAttributes();
                    return(iodBase);
                }
                return(new SopInstanceReferenceMacro(((DicomSequenceItem[])dicomElement.Values)[0]));
            }