Class GrayscalePixelDataS16
Grayscale signed 16 bits IPixelData implementation
Implements
Inherited Members
Namespace: Dicom.Imaging.Render
Assembly: cs.temp.dll.dll
Syntax
public class GrayscalePixelDataS16 : IPixelData
Constructors
GrayscalePixelDataS16(Int32, Int32, BitDepth, IByteBuffer)
Initializes an instance of the GrayscalePixelDataS16 class.
Declaration
public GrayscalePixelDataS16(int width, int height, BitDepth bitDepth, IByteBuffer data)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | Pixel data width. |
Int32 | height | Pixel data height. |
BitDepth | bitDepth | Bit depth of pixel data. |
IByteBuffer | data | Byte data buffer. |
Properties
Components
Gets number of pixel components (normally 1 for grayscale, 1 for palette, and 3 for RGB and YBR).
Declaration
public int Components { get; }
Property Value
Type | Description |
---|---|
Int32 |
Data
Gets pixel data in internal format.
Declaration
public short[] Data { get; }
Property Value
Type | Description |
---|---|
Int16[] |
Height
Gets image height (rows) in pixels.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
Int32 |
Width
Gets image width (columns) in pixels.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
GetHistogram(Int32)
Gets a histogram of the pixel data for a given channel
.
Declaration
public Histogram GetHistogram(int channel)
Parameters
Type | Name | Description |
---|---|---|
Int32 | channel | The channel for which the histogram is requested. |
Returns
Type | Description |
---|---|
Histogram | Histogram of the pixel data for the given |
GetMinMax()
Return the minimum and maximum pixel values from pixel data.
Declaration
public DicomRange<double> GetMinMax()
Returns
Type | Description |
---|---|
DicomRange<Double> | Range of calculated minimum and maximum values. |
GetMinMax(Int32)
Return the minimum and maximum pixel values from pixel data. The padding value is taken into account.
Declaration
public DicomRange<double> GetMinMax(int padding)
Parameters
Type | Name | Description |
---|---|---|
Int32 | padding | Padding value to ignore in min-max determination. |
Returns
Type | Description |
---|---|
DicomRange<Double> | Range of calculated minimum and maximum values. |
GetPixel(Int32, Int32)
Gets the value of the pixel at the specified coordinates.
Declaration
public double GetPixel(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | X |
Int32 | y | Y |
Returns
Type | Description |
---|---|
Double | Pixel value |
Render(ILUT, Int32[])
Render the pixel data after applying lut
to the output array (allocated by user)
Declaration
public void Render(ILUT lut, int[] output)
Parameters
Type | Name | Description |
---|---|---|
ILUT | lut | Lookup table to render the pixels into output pixels |
Int32[] | output | The output array to store the result in |
Rescale(Double)
Gets a rescaled copy of the pixel data.
Declaration
public IPixelData Rescale(double scale)
Parameters
Type | Name | Description |
---|---|---|
Double | scale | Copy scale. |
Returns
Type | Description |
---|---|
IPixelData | Rescaled copy of the pixel data. |