DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / PixelValuesByFrameGeneric Method
The 1-based frame number to retrieve
Controls whether to apply the scale/offset or Modality LUT if present
Example

In This Topic
    PixelValuesByFrameGeneric Method (DicomImage)
    In This Topic
    Returns an array of pixel values for a frame, optionally transformed via the modality transformation
    Syntax
    'Declaration
     
    
    Public Function PixelValuesByFrameGeneric( _
       ByVal frame As System.Integer, _
       ByVal modalityTransform As System.Boolean _
    ) As System.Array
    public System.Array PixelValuesByFrameGeneric( 
       System.int frame,
       System.bool modalityTransform
    )

    Parameters

    frame
    The 1-based frame number to retrieve
    modalityTransform
    Controls whether to apply the scale/offset or Modality LUT if present

    Return Value

    Array of values representing the (possibly transformed) pixel values. Return type is a generic array as opposed to PixelValuesByFrame which returns a float[]
    Remarks
    Even if modalityTransform is false, the values are still masked to the relevant bit length and interpreted as sign/unsigned. This differs from RawPixelValuesByFrame.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    bool modalityTransform = false;
    var rawPixelValues = image.PixelValuesByFrameGeneric(1, modalityTransform);
    modalityTransform = true;
    var transformedPixelValues = image.PixelValuesByFrameGeneric(1, modalityTransform);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also