Class GrayscaleRenderOptions
Grayscale rendering options class
Inheritance
Inherited Members
Namespace: FellowOakDicom.Imaging
Assembly: fo-dicom.core.dll
Syntax
public class GrayscaleRenderOptions
Properties
BitDepth
BitDepth used to initialize the GrayscaleRenderOptions
Declaration
public BitDepth BitDepth { get; }
Property Value
Type | Description |
---|---|
BitDepth |
ColorMap
Gets or sets the color map associated with the grayscale image.
Declaration
public Color32[] ColorMap { get; set; }
Property Value
Type | Description |
---|---|
Color32[] |
Invert
Set to true to render the output in inverted grey
Declaration
public bool Invert { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ModalityLUT
Modality LUT Sequence
Declaration
public IModalityLUT ModalityLUT { get; }
Property Value
Type | Description |
---|---|
IModalityLUT |
RescaleIntercept
Pixel data rescale interception
Declaration
public double RescaleIntercept { get; }
Property Value
Type | Description |
---|---|
System.Double |
RescaleSlope
Pixel data rescale slope
Declaration
public double RescaleSlope { get; }
Property Value
Type | Description |
---|---|
System.Double |
UseVOILUT
Use VOI LUT if available
Declaration
public bool UseVOILUT { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VOILUTFunction
VOI LUT function (LINEAR or SEGMOID)
Declaration
public string VOILUTFunction { get; }
Property Value
Type | Description |
---|---|
System.String |
VOILUTSequence
VOI LUT Sequence
Declaration
public DicomSequence VOILUTSequence { get; }
Property Value
Type | Description |
---|---|
DicomSequence |
WindowCenter
Window center
Declaration
public double WindowCenter { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
WindowWidth
Window width
Declaration
public double WindowWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
CreateLinearOption(BitDepth, Double, Double)
Declaration
public static GrayscaleRenderOptions CreateLinearOption(BitDepth bits, double minValue, double maxValue)
Parameters
Type | Name | Description |
---|---|---|
BitDepth | bits | |
System.Double | minValue | |
System.Double | maxValue |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions |
FromBitRange(DicomDataset)
Create grayscale render options based on bit range.
Declaration
public static GrayscaleRenderOptions FromBitRange(DicomDataset dataset)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on bit range. |
FromDataset(DicomDataset, Int32)
Create GrayscaleRenderOptions from dataset
and populate the options properties with values:
Bit Depth
Rescale Slope
Rescale Intercept
Window Width
Window Center
Declaration
public static GrayscaleRenderOptions FromDataset(DicomDataset dataset, int frame)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | Dataset to extract GrayscaleRenderOptions from |
System.Int32 | frame | The zero-based frame index for which the grayscale options should be extracted. Use 0 in case of a single-framed image. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | New grayscale render options instance |
FromFunctionalWindowLevel(DicomDataset, Int32)
Create grayscale render options based on window level data stored in functional groups in enhanced multiframe images
Declaration
public static GrayscaleRenderOptions FromFunctionalWindowLevel(DicomDataset dataset, int frame)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
System.Int32 | frame | Zero-based frame index. Use 0 in case of a single-framed image. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on window level data. |
FromHistogram(DicomDataset, Int32)
Create grayscale render options based on pixel data histogram.
Declaration
public static GrayscaleRenderOptions FromHistogram(DicomDataset dataset, int percent = 90)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
System.Int32 | percent | Percentage of histogram window to include. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on pixel data histogram. |
FromImagePixelValueTags(DicomDataset)
Create grayscale render options based on specified image pixel values.
Declaration
public static GrayscaleRenderOptions FromImagePixelValueTags(DicomDataset dataset)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on specified image pixel values. |
FromMinMax(DicomDataset)
Create grayscale render options based on identified minimum and maximum pixel values.
Declaration
public static GrayscaleRenderOptions FromMinMax(DicomDataset dataset)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on identified minimum and maximum pixel values. |
FromWindowLevel(DicomDataset, Int32)
Create grayscale render options based on window level data.
Declaration
public static GrayscaleRenderOptions FromWindowLevel(DicomDataset dataset, int frame = 0)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | DICOM dataset from which render options should be obtained. |
System.Int32 | frame | Zero-based frame index. Use 0 in case of a single-framed image. |
Returns
Type | Description |
---|---|
GrayscaleRenderOptions | Grayscale render options based on window level data. |