/// <summary> /// Initialize new instance of <seealso cref="GenericGrayscalePipeline"/> which consist of the following sequence /// Rescale (Modality) LUT -> VOI LUT -> Output LUT and optionally Invert LUT if specified by grayscale options /// </summary> /// <param name="options">Grayscale options to use in the pipeline</param> public GenericGrayscalePipeline(GrayscaleRenderOptions options) { _options = options; if (options.ModalityLUTSequence != null) { _modalityLut = new ModalitySequenceLUT(_options); } else if (_options.RescaleSlope != 1.0 || _options.RescaleIntercept != 0.0) { _modalityLut = new ModalityRescaleLUT(_options); } if (_options.UseVOILUT && options.VOILUTSequence != null) { _voiSequenceLut = new VOISequenceLUT(_options); _voiLut = new VOILinearLUT(GrayscaleRenderOptions.CreateLinearOption(_options.BitDepth, _voiSequenceLut.MinimumOutputValue, _voiSequenceLut.MaximumOutputValue)); } else { _voiLut = VOILUT.Create(_options); } _outputLut = new OutputLUT(_options); if (_options.Invert) { _invertLut = new InvertLUT(_outputLut.MinimumOutputValue, _outputLut.MaximumOutputValue); } }
/// <summary> /// Initialize new instance of <seealso cref="GenericGrayscalePipeline"/> which consist of the following sequence /// Rescale (Modality) LUT -> VOI LUT -> Output LUT and optionally Invert LUT if specified by grayscale options /// </summary> /// <param name="options">Grayscale options to use in the pipeline</param> public GenericGrayscalePipeline(GrayscaleRenderOptions options) { if (options.RescaleSlope != 1.0 || options.RescaleIntercept != 0.0) { _rescaleLut = new ModalityLUT(options); } _voiLut = VOILUT.Create(options); _outputLut = new OutputLUT(options.Monochrome1 ? ColorTable.Monochrome1 : ColorTable.Monochrome2); if (options.Invert) { _invertLut = new InvertLUT(_outputLut.MinimumOutputValue, _outputLut.MaximumOutputValue); } }
/// <summary> /// Initialize new instance of <seealso cref="GenericGrayscalePipeline"/> which consist of the following sequence /// Rescale (Modality) LUT -> VOI LUT -> Output LUT and optionally Invert LUT if specified by grayscale options /// </summary> /// <param name="options">Grayscale options to use in the pipeline</param> public GenericGrayscalePipeline(GrayscaleRenderOptions options) { _options = options; if (_options.RescaleSlope != 1.0 || _options.RescaleIntercept != 0.0) { _rescaleLut = new ModalityLUT(_options); } _voiLut = VOILUT.Create(_options); _outputLut = new OutputLUT(_options); if (_options.Invert) { _invertLut = new InvertLUT(_outputLut.MinimumOutputValue, _outputLut.MaximumOutputValue); } }
public GenericGrayscalePipeline(GrayscaleRenderOptions options) { if (options.RescaleSlope != 1.0 || options.RescaleIntercept != 0.0) { _rescaleLut = new RescaleLUT(options.BitDepth.MinimumValue, options.BitDepth.MaximumValue, options.RescaleSlope, options.RescaleIntercept); } _voiLut = new VOILinearLUT(options.WindowCenter, options.WindowWidth); _outputLut = new OutputLUT(options.Monochrome1 ? ColorTable.Monochrome1 : ColorTable.Monochrome2); if (options.Invert) { _invertLut = new InvertLUT(_outputLut.MinimumOutputValue, _outputLut.MaximumOutputValue); } }