private void Initialize(int bitsStored, int highBit, bool isSigned) { DicomValidator.ValidateBitsStored(bitsStored); DicomValidator.ValidateHighBit(highBit); _bitsStored = bitsStored; _highBit = highBit; _isSigned = isSigned; CalculateAbsolutePixelValueRange(); }
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; }
/// <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 ); }
/// <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 ); }