コード例 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="pixelData">The pixel data the algorithm will be run on.</param>
        /// <param name="modalityLut">The modality lut to use for calculating <see cref="WindowWidth"/> and <see cref="WindowCenter"/>, if applicable.</param>
        protected AlgorithmCalculatedVoiLutLinear(GrayscalePixelData pixelData, IModalityLut modalityLut)
        {
            Platform.CheckForNullReference(pixelData, "pixelData");

            _pixelData   = pixelData;
            _modalityLut = modalityLut;

            _windowWidth  = double.NaN;
            _windowCenter = double.NaN;
        }
コード例 #2
0
 /// <summary>
 /// Calculates and returns the minimum and maximum pixel values in the input <paramref name="pixelData"/>.
 /// </summary>
 /// <param name="pixelData">The input pixel data.</param>
 /// <param name="windowStart">Returns the minimum pixel value.</param>
 /// <param name="windowEnd">Returns the maximum pixel value.</param>
 protected override void CalculateWindowRange(GrayscalePixelData pixelData, out int windowStart, out int windowEnd)
 {
     pixelData.CalculateMinMaxPixelValue(out windowStart, out windowEnd);
 }
コード例 #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="pixelData">The pixel data the algorithm will be run on.</param>
 public MinMaxPixelCalculatedLinearLut(GrayscalePixelData pixelData)
     : base(pixelData)
 {
 }
コード例 #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <remarks>
 /// The input <see cref="IVoiLut"/> object can be null.
 /// </remarks>
 /// <param name="pixelData">The pixel data the algorithm will be run on.</param>
 /// <param name="modalityLut">The modality lut to use for calculating <see cref="AlgorithmCalculatedVoiLutLinear.WindowWidth"/>
 /// and <see cref="AlgorithmCalculatedVoiLutLinear.WindowCenter"/>, if applicable.</param>
 public MinMaxPixelCalculatedLinearLut(GrayscalePixelData pixelData, IModalityLut modalityLut)
     : base(pixelData, modalityLut)
 {
 }
コード例 #5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="pixelData">The pixel data the algorithm will be run on.</param>
 protected AlgorithmCalculatedVoiLutLinear(GrayscalePixelData pixelData)
     : this(pixelData, null)
 {
 }
コード例 #6
0
 /// <summary>
 /// Called when either of <see cref="WindowWidth"/> or <see cref="WindowCenter"/> are first accessed.
 /// </summary>
 /// <remarks>
 /// Inheritors must implement this method and return the <paramref name="windowStart"/> and <paramref name="windowEnd"/>
 /// value range that will be used to calculate the <see cref="WindowWidth"/> and <see cref="WindowCenter"/>.
 /// </remarks>
 /// <param name="pixelData">The pixel data that is to be used to calculate <paramref name="windowStart"/> and <paramref name="windowEnd"/>.</param>
 /// <param name="windowStart">returns the start value in the window range.</param>
 /// <param name="windowEnd">returns the end value in the window range.</param>
 protected abstract void CalculateWindowRange(GrayscalePixelData pixelData, out int windowStart, out int windowEnd);