Beispiel #1
0
        /// <summary>
        /// Creates a single instance of a MaskSubtractionSequence item. Does not modify the MaskSubtractionSequence in the underlying collection.
        /// </summary>
        public MaskSubtractionSequenceIod CreateMaskSubtractionSequence()
        {
            var iodBase = new MaskSubtractionSequenceIod(new DicomSequenceItem());

            iodBase.InitializeAttributes();
            return(iodBase);
        }
        /// <summary>
        /// Creates the MaskSubtractionSequence in the underlying collection. Type 1C.
        /// </summary>
        public MaskSubtractionSequenceIod CreateMaskSubtractionSequence()
        {
            var dicomAttribute = DicomElementProvider[DicomTags.MaskSubtractionSequence];

            if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
            {
                var dicomSequenceItem = new DicomSequenceItem();
                dicomAttribute.Values = new[] { dicomSequenceItem };
                var sequenceType = new MaskSubtractionSequenceIod(dicomSequenceItem);
                sequenceType.InitializeAttributes();
                return(sequenceType);
            }
            return(new MaskSubtractionSequenceIod(((DicomSequenceItem[])dicomAttribute.Values)[0]));
        }