/// <summary>
        /// Creates the PixelValueTransformationSequence in the underlying collection. Type 1.
        /// </summary>
        public PixelValueTransformationSequenceItem CreatePixelValueTransformationSequence()
        {
            var dicomAttribute = DicomAttributeProvider[DicomTags.PixelValueTransformationSequence];

            if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
            {
                var dicomSequenceItem = new DicomSequenceItem();
                dicomAttribute.Values = new[] { dicomSequenceItem };
                var sequenceType = new PixelValueTransformationSequenceItem(dicomSequenceItem);
                return(sequenceType);
            }
            return(new PixelValueTransformationSequenceItem(((DicomSequenceItem[])dicomAttribute.Values)[0]));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the PixelValueTransformationSequence in the underlying collection. Type 1.
        /// </summary>
        public PixelValueTransformationSequenceItem CreatePixelValueTransformationSequence()
        {
            var dicomAttribute = DicomAttributeProvider[DicomTags.PixelValueTransformationSequence];

            if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
            {
                var sequenceType = new PixelValueTransformationSequenceItem {
                    RescaleSlope = 1, RescaleIntercept = 0, RescaleType = "US"
                };
                dicomAttribute.Values = new[] { sequenceType.DicomSequenceItem };
                return(sequenceType);
            }
            return(new PixelValueTransformationSequenceItem(((DicomSequenceItem[])dicomAttribute.Values)[0]));
        }
		/// <summary>
		/// Creates the PixelValueTransformationSequence in the underlying collection. Type 1.
		/// </summary>
		public PixelValueTransformationSequenceItem CreatePixelValueTransformationSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.PixelValueTransformationSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var dicomSequenceItem = new DicomSequenceItem();
				dicomAttribute.Values = new[] {dicomSequenceItem};
				var sequenceType = new PixelValueTransformationSequenceItem(dicomSequenceItem);
				return sequenceType;
			}
			return new PixelValueTransformationSequenceItem(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}
		/// <summary>
		/// Creates the PixelValueTransformationSequence in the underlying collection. Type 1.
		/// </summary>
		public PixelValueTransformationSequenceItem CreatePixelValueTransformationSequence()
		{
			var dicomAttribute = DicomAttributeProvider[DicomTags.PixelValueTransformationSequence];
			if (dicomAttribute.IsNull || dicomAttribute.IsEmpty)
			{
				var sequenceType = new PixelValueTransformationSequenceItem {RescaleSlope = 1, RescaleIntercept = 0, RescaleType = "US"};
				dicomAttribute.Values = new[] {sequenceType.DicomSequenceItem};
				return sequenceType;
			}
			return new PixelValueTransformationSequenceItem(((DicomSequenceItem[]) dicomAttribute.Values)[0]);
		}