Example #1
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
            );
        }
Example #2
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
            );
        }