Class GrayscalePixelDataU16
- Namespace
- FellowOakDicom.Imaging.Render
- Assembly
- fo-dicom.core.dll
Grayscale unsigned 16 bits IPixelData implementation
public class GrayscalePixelDataU16 : IPixelData
- Inheritance
-
GrayscalePixelDataU16
- Implements
- Inherited Members
- Extension Methods
Constructors
GrayscalePixelDataU16(int, int, BitDepth, IByteBuffer)
Initializes an instance of the GrayscalePixelDataU16 class.
public GrayscalePixelDataU16(int width, int height, BitDepth bitDepth, IByteBuffer data)
Parameters
width
intPixel data width.
height
intPixel data height.
bitDepth
BitDepthBit depth of pixel data.
data
IByteBufferByte data buffer.
Properties
Components
Gets number of pixel components (normally 1 for grayscale, 1 for palette, and 3 for RGB and YBR).
public int Components { get; }
Property Value
Data
Gets pixel data in internal format.
public ushort[] Data { get; }
Property Value
- ushort[]
Height
Gets image height (rows) in pixels.
public int Height { get; }
Property Value
Width
Gets image width (columns) in pixels.
public int Width { get; }
Property Value
Methods
GetHistogram(int)
Gets a histogram of the pixel data for a given channel
.
public Histogram GetHistogram(int channel)
Parameters
channel
intThe channel for which the histogram is requested.
Returns
- Histogram
Histogram of the pixel data for the given
channel
.
GetMinMax()
Return the minimum and maximum pixel values from pixel data.
public DicomRange<double> GetMinMax()
Returns
- DicomRange<double>
Range of calculated minimum and maximum values.
GetMinMax(int)
Return the minimum and maximum pixel values from pixel data. The padding value is taken into account.
public DicomRange<double> GetMinMax(int padding)
Parameters
padding
intPadding value to ignore in min-max determination.
Returns
- DicomRange<double>
Range of calculated minimum and maximum values.
GetPixel(int, int)
Gets the value of the pixel at the specified coordinates.
public double GetPixel(int x, int y)
Parameters
Returns
- double
Pixel value
Render(ILUT, int[])
Render the pixel data after applying lut
to the output array (allocated by user)
public void Render(ILUT lut, int[] output)
Parameters
lut
ILUTLookup table to render the pixels into output pixels
output
int[]The output array to store the result in
Rescale(double)
Gets a rescaled copy of the pixel data.
public IPixelData Rescale(double scale)
Parameters
scale
doubleCopy scale.
Returns
- IPixelData
Rescaled copy of the pixel data.