GDCM 3.0.24
Public Member Functions | List of all members
gdcm::IconImageGenerator Class Reference

IconImageGenerator. More...

#include <gdcmIconImageGenerator.h>

Public Member Functions

 IconImageGenerator ()
 
 ~IconImageGenerator ()
 
void AutoPixelMinMax (bool b)
 
void ConvertRGBToPaletteColor (bool b)
 
bool Generate ()
 Generate Icon.
 
const IconImageGetIconImage () const
 Retrieve generated Icon.
 
PixmapGetPixmap ()
 
const PixmapGetPixmap () const
 
void SetOutputDimensions (const unsigned int dims[2])
 Set Target dimension of output Icon.
 
void SetOutsideValuePixel (double v)
 
void SetPixelMinMax (double min, double max)
 
void SetPixmap (const Pixmap &p)
 Set/Get File.
 

Detailed Description

IconImageGenerator.

This filter will generate a valid Icon from the Pixel Data element (an instance of Pixmap). To generate a valid Icon, one is only allowed the following Photometric Interpretation:

The Pixel Bits Allocated is restricted to 8bits, therefore 16 bits image needs to be rescaled. By default the filter will use the full scalar range of 16bits image to rescale to unsigned 8bits. This may not be ideal for some situation, in which case the API SetPixelMinMax can be used to overwrite the default min,max interval used.

See also
ImageReader
Examples
ExtractIconFromFile.cxx.

Constructor & Destructor Documentation

◆ IconImageGenerator()

gdcm::IconImageGenerator::IconImageGenerator ( )

◆ ~IconImageGenerator()

gdcm::IconImageGenerator::~IconImageGenerator ( )

Member Function Documentation

◆ AutoPixelMinMax()

void gdcm::IconImageGenerator::AutoPixelMinMax ( bool  b)

Instead of explicitly specifying the min/max value for the rescale operation, let the internal mechanism compute the min/max of icon and rescale to best appropriate.

Examples
ExtractIconFromFile.cxx.

◆ ConvertRGBToPaletteColor()

void gdcm::IconImageGenerator::ConvertRGBToPaletteColor ( bool  b)

Converting from RGB to PALETTE_COLOR can be a slow operation. However DICOM standard requires that color icon be described as palette. Set this boolean to false only if you understand the consequences. default value is true, false generates invalid Icon Image Sequence

◆ Generate()

bool gdcm::IconImageGenerator::Generate ( )

Generate Icon.

Examples
ExtractIconFromFile.cxx.

◆ GetIconImage()

const IconImage & gdcm::IconImageGenerator::GetIconImage ( ) const
inline

Retrieve generated Icon.

Examples
ExtractIconFromFile.cxx.

◆ GetPixmap() [1/2]

Pixmap & gdcm::IconImageGenerator::GetPixmap ( )
inline

◆ GetPixmap() [2/2]

const Pixmap & gdcm::IconImageGenerator::GetPixmap ( ) const
inline

◆ SetOutputDimensions()

void gdcm::IconImageGenerator::SetOutputDimensions ( const unsigned int  dims[2])

Set Target dimension of output Icon.

Examples
ExtractIconFromFile.cxx.

◆ SetOutsideValuePixel()

void gdcm::IconImageGenerator::SetOutsideValuePixel ( double  v)

Set a pixel value that should be discarded. This happen typically for CT image, where a pixel has been used to pad outside the image (see Pixel Padding Value). Requires AutoPixelMinMax(true)

◆ SetPixelMinMax()

void gdcm::IconImageGenerator::SetPixelMinMax ( double  min,
double  max 
)

Override default min/max to compute best rescale for 16bits -> 8bits downscale. Typically those value can be read from the SmallestImagePixelValue LargestImagePixelValue DICOM attribute.

◆ SetPixmap()

void gdcm::IconImageGenerator::SetPixmap ( const Pixmap p)
inline

Set/Get File.

Examples
ExtractIconFromFile.cxx.

The documentation for this class was generated from the following file: