Class DicomPixelData
DICOM Pixel Data abstract class for reading and writing DICOM images pixel data according to the specified transfer syntax
Inherited Members
Namespace: Dicom.Imaging
Assembly: cs.temp.dll.dll
Syntax
public abstract class DicomPixelData
Constructors
DicomPixelData(DicomDataset)
Initializes new instance of DicomPixelData using passed dataset
.
Declaration
protected DicomPixelData(DicomDataset dataset)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset |
Properties
BitDepth
Gets new instance of BitDepth using dataset information.
Declaration
public BitDepth BitDepth { get; }
Property Value
Type | Description |
---|---|
BitDepth |
BitsAllocated
Gets number of bits allocated per pixel sample (0028,0100).
Declaration
public ushort BitsAllocated { get; }
Property Value
Type | Description |
---|---|
UInt16 |
BitsStored
Gets or sets number of bits stored per pixel sample (0028,0101).
Declaration
public ushort BitsStored { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
BytesAllocated
Gets number of bytes allocated per pixel sample.
Declaration
public int BytesAllocated { get; }
Property Value
Type | Description |
---|---|
Int32 |
Dataset
Gets the DICOM Dataset containing the pixel data.
Declaration
public DicomDataset Dataset { get; }
Property Value
Type | Description |
---|---|
DicomDataset |
Height
Gets or sets the DICOM image height (rows) in pixels.
Declaration
public ushort Height { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
HighBit
Gets or sets index of the most signficant bit (MSB) of pixel sample(0028,0102).
Declaration
public ushort HighBit { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
IsLossy
Gets lossy image compression (0028,2110) status, returns true if stored value is "01".
Declaration
public bool IsLossy { get; }
Property Value
Type | Description |
---|---|
Boolean |
LossyCompressionMethod
Gets lossy image compression method (0028,2114).
Declaration
public string LossyCompressionMethod { get; }
Property Value
Type | Description |
---|---|
String |
LossyCompressionRatio
Gets lossy image compression ratio (0028,2112).
Declaration
public decimal LossyCompressionRatio { get; }
Property Value
Type | Description |
---|---|
Decimal |
NumberOfFrames
Gets or sets DICOM image Number of frames. This value usually equals 1 for single frame images.
Declaration
public int NumberOfFrames { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
PaletteColorLUT
Gets palette color LUT, valid for PALETTE COLOR PhotometricInterpretation
Declaration
public Color32[] PaletteColorLUT { get; }
Property Value
Type | Description |
---|---|
Color32[] |
PhotometricInterpretation
Gets or sets photometric Interpretation.
Declaration
public PhotometricInterpretation PhotometricInterpretation { get; set; }
Property Value
Type | Description |
---|---|
PhotometricInterpretation |
PixelRepresentation
Gets or sets, pixel Representation (0028,0103), represents signed/unsigned data of the pixel samples.
Declaration
public PixelRepresentation PixelRepresentation { get; set; }
Property Value
Type | Description |
---|---|
PixelRepresentation |
PlanarConfiguration
Gets or sets planar Configuration (0028,0006), indicates whether the color pixel data are sent color-by-plane or color-by-pixel.
Declaration
public PlanarConfiguration PlanarConfiguration { get; set; }
Property Value
Type | Description |
---|---|
PlanarConfiguration |
SamplesPerPixel
Gets or sets number of samples per pixel (0028,0002), usually 1 for grayscale and 3 for color (RGB and YBR.
Declaration
public ushort SamplesPerPixel { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
Syntax
Gets the transfer syntax used to encode the DICOM iamge pixel data
Declaration
public DicomTransferSyntax Syntax { get; }
Property Value
Type | Description |
---|---|
DicomTransferSyntax |
UncompressedFrameSize
Gets uncompressed frame size in bytes.
Declaration
public int UncompressedFrameSize { get; }
Property Value
Type | Description |
---|---|
Int32 |
Width
Gets or sets the DICOM image width (columns) in pixels.
Declaration
public ushort Width { get; set; }
Property Value
Type | Description |
---|---|
UInt16 |
Methods
AddFrame(IByteBuffer)
Abstract AddFrame method to add new frame into dataset pixel dataset. New frame will be appended to existing frames.
Declaration
public abstract void AddFrame(IByteBuffer data)
Parameters
Type | Name | Description |
---|---|---|
IByteBuffer | data | Frame byte buffer. |
Create(DicomDataset, Boolean)
A factory method to initialize new instance of DicomPixelData implementation either Dicom.Imaging.DicomPixelData.OtherWordPixelData, Dicom.Imaging.DicomPixelData.OtherBytePixelData, or Dicom.Imaging.DicomPixelData.EncapsulatedPixelData
Declaration
public static DicomPixelData Create(DicomDataset dataset, bool newPixelData = false)
Parameters
Type | Name | Description |
---|---|---|
DicomDataset | dataset | Source DICOM Dataset |
Boolean | newPixelData | true if new DicomPixelDatawill be created for current dataset,
false to read DicomPixelData from |
Returns
Type | Description |
---|---|
DicomPixelData | New instance of DicomPixelData |
GetFrame(Int32)
Abstract GetFrame method to extract specific frame byte buffer frame
dataset
Declaration
public abstract IByteBuffer GetFrame(int frame)
Parameters
Type | Name | Description |
---|---|---|
Int32 | frame | Frame index |
Returns
Type | Description |
---|---|
IByteBuffer | Frame byte buffer |