DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / SetColourTable Method
List of System.Drawing.Color values
Example

In This Topic
    SetColourTable Method
    In This Topic
    The colour lookup table of DicomImage
    Syntax
    'Declaration
     
    
    Public Sub SetColourTable( _
       ByVal value As System.Collections.Generic.IList(Of Color) _
    ) 
    public void SetColourTable( 
       System.Collections.Generic.IList<Color> value
    )

    Parameters

    value
    List of System.Drawing.Color values
    Remarks
    This property enables developers to define and apply their own color table to Images.
    Example
    // Load DICOM image
    DicomImage image = new DicomImage("your_dicom_image.dcm");
                         
    // Example: a heatmap color table
    List<Color> heatmapTable = new List<Color>
    {
        Color.Black,       // Low intensity
        Color.DarkBlue,
        Color.Blue,
        Color.Cyan,
        Color.Green,
        Color.Yellow,
        Color.Orange,
        Color.Red,
        Color.White        // High intensity
    };
                
    // Apply the custom color table to the DICOM image
    image.ColourTable = heatmapTable;
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also