コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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);
 }