15#ifndef GDCMLOOKUPTABLE_H
16#define GDCMLOOKUPTABLE_H
25class LookupTableInternal;
42 void Print(std::ostream &)
const override;
49 unsigned short subscript,
unsigned short bitsize);
55 unsigned short &subscript,
unsigned short &bitsize)
const;
59 unsigned short bitsize);
60 void SetRedLUT(
const unsigned char *red,
unsigned int length);
62 unsigned short bitsize);
63 void SetGreenLUT(
const unsigned char *green,
unsigned int length);
65 unsigned short bitsize);
66 void SetBlueLUT(
const unsigned char *blue,
unsigned int length);
72 void Decode(std::istream &is, std::ostream &os)
const;
77 bool Decode(
char *outputbuffer,
size_t outlen,
const char *inputbuffer,
size_t inlen)
const;
83 bool Decode8(
char *outputbuffer,
size_t outlen,
const char *inputbuffer,
size_t inlen)
const;
107 void Encode(std::istream &is, std::ostream &os);
LookupTable class.
Definition gdcmLookupTable.h:30
void GetLUTDescriptor(LookupTableType type, unsigned short &length, unsigned short &subscript, unsigned short &bitsize) const
LookupTableType
Definition gdcmLookupTable.h:32
@ GRAY
Definition gdcmLookupTable.h:36
@ BLUE
Definition gdcmLookupTable.h:35
@ GREEN
Definition gdcmLookupTable.h:34
unsigned short BitSample
Definition gdcmLookupTable.h:111
void SetBlueLUT(const unsigned char *blue, unsigned int length)
virtual void SetLUT(LookupTableType type, const unsigned char *array, unsigned int length)
void InitializeGreenLUT(unsigned short length, unsigned short subscript, unsigned short bitsize)
void Decode(std::istream &is, std::ostream &os) const
Decode the LUT.
void SetGreenLUT(const unsigned char *green, unsigned int length)
bool WriteBufferAsRGBA(const unsigned char *rgba)
Write the LUT as RGBA.
void SetRedLUT(const unsigned char *red, unsigned int length)
bool GetBufferAsRGBA(unsigned char *rgba) const
return the LUT as RGBA buffer
bool Decode8(char *outputbuffer, size_t outlen, const char *inputbuffer, size_t inlen) const
Decode into RGB 8 bits space.
bool Initialized() const
return whether the LUT has been initialized
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 GetLUT(LookupTableType type, unsigned char *array, unsigned int &length) const
bool Decode(char *outputbuffer, size_t outlen, const char *inputbuffer, size_t inlen) const
void InitializeBlueLUT(unsigned short length, unsigned short subscript, unsigned short bitsize)
void Clear()
Clear the LUT.
LookupTable(LookupTable const &lut)
Definition gdcmLookupTable.h:85
LookupTableInternal * Internal
Definition gdcmLookupTable.h:110
void Allocate(unsigned short bitsample=8)
Allocate the LUT.
void InitializeLUT(LookupTableType type, unsigned short length, unsigned short subscript, unsigned short bitsize)
Generic interface:
bool IncompleteLUT
Definition gdcmLookupTable.h:112
const unsigned char * GetPointer() const
return a raw pointer to the LUT
void Print(std::ostream &) const override
unsigned int GetLUTLength(LookupTableType type) const
unsigned short GetBitSample() const
return the bit sample
Definition gdcmLookupTable.h:100
Object.
Definition gdcmObject.h:37
#define GDCM_EXPORT
Definition gdcmWin32.h:34