예제 #1
0
        private void Initialize(int bitsStored, int highBit, bool isSigned)
        {
            DicomValidator.ValidateBitsStored(bitsStored);
            DicomValidator.ValidateHighBit(highBit);

            _bitsStored = bitsStored;
            _highBit    = highBit;
            _isSigned   = isSigned;

            CalculateAbsolutePixelValueRange();
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of <see cref="ModalityLutLinear"/> with the specified parameters.
        /// </summary>
        /// <param name="bitsStored">Indicates the number of bits stored of the associated pixel data.</param>
        /// <param name="isSigned">Indicates whether or not the associated pixel data is signed.</param>
        /// <param name="rescaleSlope">The rescale slope.</param>
        /// <param name="rescaleIntercept">The rescale intercept.</param>
        public ModalityLutLinear(
            int bitsStored,
            bool isSigned,
            double rescaleSlope,
            double rescaleIntercept)
            : base()
        {
            DicomValidator.ValidateBitsStored(bitsStored);

            _bitsStored           = bitsStored;
            _isSigned             = isSigned;
            this.RescaleSlope     = rescaleSlope;
            this.RescaleIntercept = rescaleIntercept;

            Initialize();
        }
예제 #3
0
        private void Initialize(
            int bitsStored,
            int highBit,
            bool isSigned,
            double rescaleSlope,
            double rescaleIntercept,
            bool invert)
        {
            DicomValidator.ValidateBitsStored(bitsStored);
            DicomValidator.ValidateHighBit(highBit);

            _bitsStored       = bitsStored;
            _highBit          = highBit;
            _isSigned         = isSigned;
            _rescaleSlope     = rescaleSlope <= double.Epsilon ? 1 : rescaleSlope;
            _rescaleIntercept = rescaleIntercept;
            DefaultInvert     = Invert = invert;
        }
예제 #4
0
파일: Frame.cs 프로젝트: top501/GoldenEagle
        /// <summary>
        /// Validates the <see cref="ImageSop"/> object.
        /// </summary>
        /// <remarks>
        /// Derived classes should call the base class implementation first, and then do further validation.
        /// The <see cref="ImageSop"/> class validates properties deemed vital to usage of the object.
        /// </remarks>
        /// <exception cref="SopValidationException">Thrown when validation fails.</exception>
        internal void Validate()
        {
            DicomValidator.ValidateRows(this.Rows);
            DicomValidator.ValidateColumns(this.Columns);
            DicomValidator.ValidateBitsAllocated(this.BitsAllocated);
            DicomValidator.ValidateBitsStored(this.BitsStored);
            DicomValidator.ValidateHighBit(this.HighBit);
            DicomValidator.ValidateSamplesPerPixel(this.SamplesPerPixel);
            DicomValidator.ValidatePixelRepresentation(this.PixelRepresentation);
            DicomValidator.ValidatePhotometricInterpretation(this.PhotometricInterpretation);

            DicomValidator.ValidateImagePropertyRelationships
            (
                this.BitsStored,
                this.BitsAllocated,
                this.HighBit,
                this.PhotometricInterpretation,
                this.PlanarConfiguration,
                this.SamplesPerPixel
            );
        }
예제 #5
0
        /// <summary>
        /// Validates the <see cref="ImageSop"/> object.
        /// </summary>
        /// <remarks>
        /// Derived classes should call the base class implementation first, and then do further validation.
        /// The <see cref="ImageSop"/> class validates properties deemed vital to usage of the object.
        /// </remarks>
        /// <exception cref="SopValidationException">Thrown when validation fails.</exception>
        internal void Validate()
        {
            DicomValidator.ValidateRows(Rows);
            DicomValidator.ValidateColumns(Columns);
            DicomValidator.ValidateBitsAllocated(BitsAllocated);
            DicomValidator.ValidateBitsStored(BitsStored);
            DicomValidator.ValidateHighBit(HighBit);
            DicomValidator.ValidateSamplesPerPixel(SamplesPerPixel);
            DicomValidator.ValidatePixelRepresentation(PixelRepresentation);
            DicomValidator.ValidatePhotometricInterpretation(PhotometricInterpretation);

            DicomValidator.ValidateImagePropertyRelationships
            (
                BitsStored,
                BitsAllocated,
                HighBit,
                PhotometricInterpretation,
                PlanarConfiguration,
                SamplesPerPixel
            );
        }