# gdcm::ImageCodec Class Reference

ImageCodec. More...

`#include <gdcmImageCodec.h>`

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

List of all members.

## Public Member Functions

| ImageCodec ()
| ~ImageCodec ()
bool | CanDecode (TransferSyntax const &) const
| Return whether this decoder support this transfer syntax (can decode it).
bool | Decode (DataElement const &is, DataElement &os)
| Decode.
const unsigned int * | GetDimensions () const
virtual bool | GetHeaderInfo (std::istream &is, TransferSyntax &ts)
const LookupTable & | GetLUT () const
bool | GetNeedByteSwap () const
const PhotometricInterpretation & | GetPhotometricInterpretation () const
const PixelFormat & | GetPixelFormat () const
PixelFormat & | GetPixelFormat ()
unsigned int | GetPlanarConfiguration () const
bool | IsLossy () const
void | SetDimensions (const unsigned int *d)
void | SetLUT (LookupTable const &lut)
void | SetNeedByteSwap (bool b)
void | SetNeedOverlayCleanup (bool b)
void | SetNumberOfDimensions (unsigned int dim)
void | SetPhotometricInterpretation (PhotometricInterpretation const &pi)
virtual void | SetPixelFormat (PixelFormat const &pf)
void | SetPlanarConfiguration (unsigned int pc)

## Protected Types

typedef SmartPointer< LookupTable > | LUTPtr

## Protected Member Functions

bool | Decode (std::istream &is, std::ostream &os)
bool | DoByteSwap (std::istream &is, std::ostream &os)
bool | DoInvertMonochrome (std::istream &is, std::ostream &os)
bool | DoOverlayCleanup (std::istream &is, std::ostream &os)
bool | DoPaddedCompositePixelCode (std::istream &is, std::ostream &os)
bool | DoPlanarConfiguration (std::istream &is, std::ostream &os)
bool | DoSimpleCopy (std::istream &is, std::ostream &os)
bool | DoYBR (std::istream &is, std::ostream &os)
virtual bool | IsValid (PhotometricInterpretation const &pi)

## Protected Attributes

unsigned int | Dimensions [3]
bool | LossyFlag
LUTPtr | LUT
bool | NeedByteSwap
bool | NeedOverlayCleanup
unsigned int | NumberOfDimensions
PixelFormat | PF
PhotometricInterpretation | PI
unsigned int | PlanarConfiguration
bool | RequestPaddedCompositePixelCode
bool | RequestPlanarConfiguration

## Friends

class | ImageChangePhotometricInterpretation

## Detailed Description

ImageCodec.

Note:
  Main codec, this is a central place for all implementation

## Member Typedef Documentation

typedef SmartPointer<LookupTable> gdcm::ImageCodec::LUTPtr`[protected]`

## Constructor & Destructor Documentation

gdcm::ImageCodec::ImageCodec | ( |  | ) |

gdcm::ImageCodec::~ImageCodec | ( |  | ) |

## Member Function Documentation

bool gdcm::ImageCodec::CanDecode | ( | TransferSyntax const & |  | ) | const`[inline, virtual]`

Return whether this decoder support this transfer syntax (can decode it).

Implements gdcm::Decoder.

Reimplemented in gdcm::JPEG2000Codec, gdcm::JPEGCodec, gdcm::JPEGLSCodec, gdcm::PNMCodec, gdcm::PVRGCodec, gdcm::RAWCodec, and gdcm::RLECodec.

bool gdcm::ImageCodec::Decode | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected, virtual]`

Reimplemented from gdcm::Decoder.

Reimplemented in gdcm::DeltaEncodingCodec, gdcm::JPEG12Codec, gdcm::JPEG16Codec, gdcm::JPEG2000Codec, gdcm::JPEG8Codec, gdcm::JPEGCodec, gdcm::RAWCodec, and gdcm::RLECodec.

bool gdcm::ImageCodec::Decode | ( | DataElement const & | is,
|  | DataElement & | os |
| ) |  |  | `[virtual]`

Decode.

Reimplemented from gdcm::Decoder.

Reimplemented in gdcm::DeltaEncodingCodec, gdcm::JPEG2000Codec, gdcm::JPEGCodec, gdcm::JPEGLSCodec, gdcm::PVRGCodec, gdcm::RAWCodec, and gdcm::RLECodec.

bool gdcm::ImageCodec::DoByteSwap | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoInvertMonochrome | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoOverlayCleanup | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoPaddedCompositePixelCode | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoPlanarConfiguration | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoSimpleCopy | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

bool gdcm::ImageCodec::DoYBR | ( | std::istream & | is,
|  | std::ostream & | os |
| ) |  |  | `[protected]`

const unsigned int* gdcm::ImageCodec::GetDimensions | ( |  | ) | const`[inline]`

virtual bool gdcm::ImageCodec::GetHeaderInfo | ( | std::istream & | is,
|  | TransferSyntax & | ts |
| ) |  |  | `[virtual]`

Reimplemented in gdcm::JPEG12Codec, gdcm::JPEG16Codec, gdcm::JPEG2000Codec, gdcm::JPEG8Codec, gdcm::JPEGCodec, gdcm::JPEGLSCodec, gdcm::PNMCodec, gdcm::RAWCodec, and gdcm::RLECodec.

const LookupTable& gdcm::ImageCodec::GetLUT | ( |  | ) | const`[inline]`

bool gdcm::ImageCodec::GetNeedByteSwap | ( |  | ) | const`[inline]`

const PhotometricInterpretation& gdcm::ImageCodec::GetPhotometricInterpretation | ( |  | ) | const

const PixelFormat& gdcm::ImageCodec::GetPixelFormat | ( |  | ) | const`[inline]`

PixelFormat& gdcm::ImageCodec::GetPixelFormat | ( |  | ) | `[inline]`

Examples:
  GetJPEGSamplePrecision.cxx.

unsigned int gdcm::ImageCodec::GetPlanarConfiguration | ( |  | ) | const`[inline]`

bool gdcm::ImageCodec::IsLossy | ( |  | ) | const

virtual bool gdcm::ImageCodec::IsValid | ( | PhotometricInterpretation const & | pi | ) | `[protected, virtual]`

Reimplemented in gdcm::JPEGCodec.

void gdcm::ImageCodec::SetDimensions | ( | const unsigned int * | d | ) | `[inline]`

void gdcm::ImageCodec::SetLUT | ( | LookupTable const & | lut | ) | `[inline]`

void gdcm::ImageCodec::SetNeedByteSwap | ( | bool | b | ) | `[inline]`

void gdcm::ImageCodec::SetNeedOverlayCleanup | ( | bool | b | ) | `[inline]`

void gdcm::ImageCodec::SetNumberOfDimensions | ( | unsigned int | dim | ) |

void gdcm::ImageCodec::SetPhotometricInterpretation | ( | PhotometricInterpretation const & | pi | ) |

virtual void gdcm::ImageCodec::SetPixelFormat | ( | PixelFormat const & | pf | ) | `[inline, virtual]`

Reimplemented in gdcm::JPEGCodec.

void gdcm::ImageCodec::SetPlanarConfiguration | ( | unsigned int | pc | ) | `[inline]`

## Friends And Related Function Documentation

friend class ImageChangePhotometricInterpretation`[friend]`

## Member Data Documentation

unsigned int gdcm::ImageCodec::Dimensions[3]`[protected]`

bool gdcm::ImageCodec::LossyFlag`[protected]`

LUTPtr gdcm::ImageCodec::LUT`[protected]`

bool gdcm::ImageCodec::NeedByteSwap`[protected]`

bool gdcm::ImageCodec::NeedOverlayCleanup`[protected]`

unsigned int gdcm::ImageCodec::NumberOfDimensions`[protected]`

PixelFormat gdcm::ImageCodec::PF`[protected]`

PhotometricInterpretation gdcm::ImageCodec::PI`[protected]`

unsigned int gdcm::ImageCodec::PlanarConfiguration`[protected]`

bool gdcm::ImageCodec::RequestPaddedCompositePixelCode`[protected]`

bool gdcm::ImageCodec::RequestPlanarConfiguration`[protected]`

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

- gdcmImageCodec.h