gdcm::LookupTable Class Reference

LookupTable class. More...

`#include <gdcmLookupTable.h>`

Inheritance diagram for gdcm::LookupTable:
[legend]
Collaboration diagram for gdcm::LookupTable:
[legend]

## Public Types

enum | LookupTableType { RED = 0 , GREEN , BLUE , GRAY , UNKNOWN }

## Public Member Functions

| LookupTable ()
| LookupTable (LookupTable const &lut)
| ~LookupTable () override
void | Allocate (unsigned short bitsample=8)
| Allocate the LUT.
void | Clear ()
| Clear the LUT.
bool | Decode (char *outputbuffer, size_t outlen, const char *inputbuffer, size_t inlen) const
void | Decode (std::istream &is, std::ostream &os) const
| Decode the LUT.
bool | Decode8 (char *outputbuffer, size_t outlen, const char *inputbuffer, size_t inlen) const
| Decode into RGB 8 bits space.
unsigned short | GetBitSample () const
| return the bit sample
bool | GetBufferAsRGBA (unsigned char *rgba) const
| return the LUT as RGBA buffer
void | GetLUT (LookupTableType type, unsigned char *array, unsigned int &length) const
void | GetLUTDescriptor (LookupTableType type, unsigned short &length, unsigned short &subscript, unsigned short &bitsize) const
unsigned int | GetLUTLength (LookupTableType type) const
const unsigned char * | GetPointer () const
| return a raw pointer to the LUT
void | InitializeBlueLUT (unsigned short length, unsigned short subscript, unsigned short bitsize)
bool | Initialized () const
| return whether the LUT has been initialized
void | InitializeGreenLUT (unsigned short length, unsigned short subscript, unsigned short bitsize)
void | InitializeLUT (LookupTableType type, unsigned short length, unsigned short subscript, unsigned short bitsize)
| Generic interface:
void | InitializeRedLUT (unsigned short length, unsigned short subscript, unsigned short bitsize)
| RED / GREEN / BLUE specific:
bool | IsRGB8 () const
| Return whether 16 bits LUT is in RGB 8 bits space.
void | Print (std::ostream &) const override
void | SetBlueLUT (const unsigned char *blue, unsigned int length)
void | SetGreenLUT (const unsigned char *green, unsigned int length)
virtual void | SetLUT (LookupTableType type, const unsigned char *array, unsigned int length)
void | SetRedLUT (const unsigned char *red, unsigned int length)
bool | WriteBufferAsRGBA (const unsigned char *rgba)
| Write the LUT as RGBA.
Public Member Functions inherited from gdcm::Object
| Object ()
| Object (const Object &)
| Special requirement for copy/cstor, assignment operator.
virtual | ~Object ()
void | operator= (const Object &)

## Protected Attributes

unsigned short | BitSample
bool | IncompleteLUT:1
LookupTableInternal * | Internal

## Additional Inherited Members

Protected Member Functions inherited from gdcm::Object
void | Register ()
void | UnRegister ()

## Detailed Description

LookupTable class.

Examples
  ExtractImageRegionWithLUT.cs, and PrintLUT.cxx.

## Member Enumeration Documentation

## LookupTableType

enum gdcm::LookupTable::LookupTableType

Enumerator
RED |
GREEN |
BLUE |
GRAY |
UNKNOWN |

## Constructor & Destructor Documentation

## LookupTable() [1/2]

gdcm::LookupTable::LookupTable | ( |  | ) |

Referenced by LookupTable().

## ~LookupTable()

gdcm::LookupTable::~LookupTable | ( |  | ) |

override

## LookupTable() [2/2]

gdcm::LookupTable::LookupTable | ( | LookupTable const & | lut | ) |

inline

References LookupTable(), and gdcm::Object::Object().

## Member Function Documentation

## Allocate()

void gdcm::LookupTable::Allocate | ( | unsigned short | bitsample = 8 | ) |

Allocate the LUT.

## Clear()

void gdcm::LookupTable::Clear | ( |  | ) |

Clear the LUT.

## Decode() [1/2]

bool gdcm::LookupTable::Decode | ( | char * | outputbuffer,
|  | size_t | outlen,
|  | const char * | inputbuffer,
|  | size_t | inlen ) const

Decode the LUT outputbuffer will contains the RGB decoded PALETTE COLOR input image of size inlen the outputbuffer should be at least 3 times the size of inlen

## Decode() [2/2]

void gdcm::LookupTable::Decode | ( | std::istream & | is,
|  | std::ostream & | os ) const

Decode the LUT.

Examples
  ExtractImageRegionWithLUT.cs.

## Decode8()

bool gdcm::LookupTable::Decode8 | ( | char * | outputbuffer,
|  | size_t | outlen,
|  | const char * | inputbuffer,
|  | size_t | inlen ) const

Decode into RGB 8 bits space.

## GetBitSample()

unsigned short gdcm::LookupTable::GetBitSample | ( |  | ) | const

inline

return the bit sample

References BitSample.

## GetBufferAsRGBA()

bool gdcm::LookupTable::GetBufferAsRGBA | ( | unsigned char * | rgba | ) | const

return the LUT as RGBA buffer

## GetLUT()

void gdcm::LookupTable::GetLUT | ( | LookupTableType | type,
|  | unsigned char * | array,
|  | unsigned int & | length ) const

## GetLUTDescriptor()

void gdcm::LookupTable::GetLUTDescriptor | ( | LookupTableType | type,
|  | unsigned short & | length,
|  | unsigned short & | subscript,
|  | unsigned short & | bitsize ) const

## GetLUTLength()

unsigned int gdcm::LookupTable::GetLUTLength | ( | LookupTableType | type | ) | const

## GetPointer()

const unsigned char * gdcm::LookupTable::GetPointer | ( |  | ) | const

return a raw pointer to the LUT

## InitializeBlueLUT()

void gdcm::LookupTable::InitializeBlueLUT | ( | unsigned short | length,
|  | unsigned short | subscript,
|  | unsigned short | bitsize )

## Initialized()

bool gdcm::LookupTable::Initialized | ( |  | ) | const

return whether the LUT has been initialized

## InitializeGreenLUT()

void gdcm::LookupTable::InitializeGreenLUT | ( | unsigned short | length,
|  | unsigned short | subscript,
|  | unsigned short | bitsize )

## InitializeLUT()

void gdcm::LookupTable::InitializeLUT | ( | LookupTableType | type,
|  | unsigned short | length,
|  | unsigned short | subscript,
|  | unsigned short | bitsize )

Generic interface:

## InitializeRedLUT()

void gdcm::LookupTable::InitializeRedLUT | ( | unsigned short | length,
|  | unsigned short | subscript,
|  | unsigned short | bitsize )

RED / GREEN / BLUE specific:

## IsRGB8()

bool gdcm::LookupTable::IsRGB8 | ( |  | ) | const

Return whether 16 bits LUT is in RGB 8 bits space.

## Print()

void gdcm::LookupTable::Print | ( | std::ostream & |  | ) | const

override virtual

Reimplemented from gdcm::Object.

Reimplemented in gdcm::SegmentedPaletteColorLookupTable.

Examples
  PrintLUT.cxx.

## SetBlueLUT()

void gdcm::LookupTable::SetBlueLUT | ( | const unsigned char * | blue,
|  | unsigned int | length )

## SetGreenLUT()

void gdcm::LookupTable::SetGreenLUT | ( | const unsigned char * | green,
|  | unsigned int | length )

## SetLUT()

virtual void gdcm::LookupTable::SetLUT | ( | LookupTableType | type,
|  | const unsigned char * | array,
|  | unsigned int | length )

virtual

Reimplemented in gdcm::SegmentedPaletteColorLookupTable.

## SetRedLUT()

void gdcm::LookupTable::SetRedLUT | ( | const unsigned char * | red,
|  | unsigned int | length )

## WriteBufferAsRGBA()

bool gdcm::LookupTable::WriteBufferAsRGBA | ( | const unsigned char * | rgba | ) |

Write the LUT as RGBA.

## Member Data Documentation

## BitSample

unsigned short gdcm::LookupTable::BitSample

protected

Referenced by GetBitSample().

## IncompleteLUT

bool gdcm::LookupTable::IncompleteLUT

protected

## Internal

LookupTableInternal* gdcm::LookupTable::Internal

protected

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

- gdcmLookupTable.h