Пример #1
0
        private void Initialize(int rows, int columns, int bitsPerPixel)
        {
            DicomValidator.ValidateRows(rows);
            DicomValidator.ValidateColumns(columns);

            _rows         = rows;
            _columns      = columns;
            _bitsPerPixel = bitsPerPixel;
            SetValidationPolicy();
        }
Пример #2
0
        private void Initialize(int rows, int columns, int bitsAllocated)
        {
            DicomValidator.ValidateRows(rows);
            DicomValidator.ValidateColumns(columns);
            _rows          = rows;
            _columns       = columns;
            _bitsAllocated = bitsAllocated;

            _bytesPerPixel = bitsAllocated / 8;
            _stride        = _columns * _bytesPerPixel;
        }
Пример #3
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(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
            );
        }
Пример #4
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
            );
        }