GDCM 3.0.24
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
gdcm::ImageCodec Class Referenceabstract

ImageCodec. More...

#include <gdcmImageCodec.h>

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

Public Member Functions

 ImageCodec ()
 
 ~ImageCodec () override
 
bool CanCode (TransferSyntax const &) const override
 Return whether this coder support this transfer syntax (can code it)
 
bool CanDecode (TransferSyntax const &) const override
 Return whether this decoder support this transfer syntax (can decode it)
 
bool CleanupUnusedBits (char *data, size_t datalen)
 
virtual ImageCodecClone () const =0
 
bool Decode (DataElement const &is_, DataElement &os) override
 Decode.
 
const unsigned int * GetDimensions () const
 
virtual bool GetHeaderInfo (std::istream &is_, TransferSyntax &ts)
 
bool GetLossyFlag () const
 
const LookupTableGetLUT () const
 
bool GetNeedByteSwap () const
 
unsigned int GetNumberOfDimensions () const
 
const PhotometricInterpretationGetPhotometricInterpretation () const
 
PixelFormatGetPixelFormat ()
 
const PixelFormatGetPixelFormat () const
 
unsigned int GetPlanarConfiguration () const
 
bool IsLossy () const
 
void SetDimensions (const std::vector< unsigned int > &d)
 
void SetDimensions (const unsigned int d[3])
 
void SetLossyFlag (bool l)
 
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)
 
- Public Member Functions inherited from gdcm::Coder
virtual ~Coder ()=default
 
virtual bool Code (DataElement const &in_, DataElement &out_)
 Code.
 
- Public Member Functions inherited from gdcm::Decoder
virtual ~Decoder ()=default
 

Protected Types

typedef SmartPointer< LookupTableLUTPtr
 

Protected Member Functions

virtual bool AppendFrameEncode (std::ostream &out, const char *data, size_t datalen)
 
virtual bool AppendRowEncode (std::ostream &out, const char *data, size_t datalen)
 
bool DecodeByStreams (std::istream &is_, std::ostream &os) override
 
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)
 
bool DoYBRFull422 (std::istream &is_, std::ostream &os)
 
virtual bool IsFrameEncoder ()
 
virtual bool IsRowEncoder ()
 
virtual bool IsValid (PhotometricInterpretation const &pi)
 
virtual bool StartEncode (std::ostream &os)
 
virtual bool StopEncode (std::ostream &os)
 
- Protected Member Functions inherited from gdcm::Coder
virtual bool InternalCode (const char *bv, unsigned long len, std::ostream &os)
 

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 FileChangeTransferSyntax
 
class ImageChangePhotometricInterpretation
 

Detailed Description

ImageCodec.

Note
Main codec, this is a central place for all implementation
Examples
FileChangeTSLossy.cs.

Member Typedef Documentation

◆ LUTPtr

Constructor & Destructor Documentation

◆ ImageCodec()

gdcm::ImageCodec::ImageCodec ( )

◆ ~ImageCodec()

gdcm::ImageCodec::~ImageCodec ( )
override

Member Function Documentation

◆ AppendFrameEncode()

virtual bool gdcm::ImageCodec::AppendFrameEncode ( std::ostream &  out,
const char *  data,
size_t  datalen 
)
protectedvirtual

◆ AppendRowEncode()

virtual bool gdcm::ImageCodec::AppendRowEncode ( std::ostream &  out,
const char *  data,
size_t  datalen 
)
protectedvirtual

◆ CanCode()

bool gdcm::ImageCodec::CanCode ( TransferSyntax const &  ) const
inlineoverridevirtual

Return whether this coder support this transfer syntax (can code it)

Implements gdcm::Coder.

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

◆ CanDecode()

bool gdcm::ImageCodec::CanDecode ( TransferSyntax const &  ) const
inlineoverridevirtual

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

Implements gdcm::Decoder.

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

◆ CleanupUnusedBits()

bool gdcm::ImageCodec::CleanupUnusedBits ( char *  data,
size_t  datalen 
)

◆ Clone()

virtual ImageCodec * gdcm::ImageCodec::Clone ( ) const
pure virtual

◆ Decode()

bool gdcm::ImageCodec::Decode ( DataElement const &  ,
DataElement  
)
overridevirtual

◆ DecodeByStreams()

bool gdcm::ImageCodec::DecodeByStreams ( std::istream &  is_,
std::ostream &  os 
)
overrideprotectedvirtual

◆ DoByteSwap()

bool gdcm::ImageCodec::DoByteSwap ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoInvertMonochrome()

bool gdcm::ImageCodec::DoInvertMonochrome ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoOverlayCleanup()

bool gdcm::ImageCodec::DoOverlayCleanup ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoPaddedCompositePixelCode()

bool gdcm::ImageCodec::DoPaddedCompositePixelCode ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoPlanarConfiguration()

bool gdcm::ImageCodec::DoPlanarConfiguration ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoSimpleCopy()

bool gdcm::ImageCodec::DoSimpleCopy ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoYBR()

bool gdcm::ImageCodec::DoYBR ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ DoYBRFull422()

bool gdcm::ImageCodec::DoYBRFull422 ( std::istream &  is_,
std::ostream &  os 
)
protected

◆ GetDimensions()

const unsigned int * gdcm::ImageCodec::GetDimensions ( ) const
inline

◆ GetHeaderInfo()

virtual bool gdcm::ImageCodec::GetHeaderInfo ( std::istream &  is_,
TransferSyntax ts 
)
virtual

◆ GetLossyFlag()

bool gdcm::ImageCodec::GetLossyFlag ( ) const

◆ GetLUT()

const LookupTable & gdcm::ImageCodec::GetLUT ( ) const
inline

◆ GetNeedByteSwap()

bool gdcm::ImageCodec::GetNeedByteSwap ( ) const
inline

◆ GetNumberOfDimensions()

unsigned int gdcm::ImageCodec::GetNumberOfDimensions ( ) const

◆ GetPhotometricInterpretation()

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

◆ GetPixelFormat() [1/2]

PixelFormat & gdcm::ImageCodec::GetPixelFormat ( )
inline

◆ GetPixelFormat() [2/2]

const PixelFormat & gdcm::ImageCodec::GetPixelFormat ( ) const
inline

◆ GetPlanarConfiguration()

unsigned int gdcm::ImageCodec::GetPlanarConfiguration ( ) const
inline

◆ IsFrameEncoder()

virtual bool gdcm::ImageCodec::IsFrameEncoder ( )
protectedvirtual

◆ IsLossy()

bool gdcm::ImageCodec::IsLossy ( ) const

◆ IsRowEncoder()

virtual bool gdcm::ImageCodec::IsRowEncoder ( )
protectedvirtual

◆ IsValid()

virtual bool gdcm::ImageCodec::IsValid ( PhotometricInterpretation const &  pi)
protectedvirtual

Reimplemented in gdcm::JPEGCodec.

◆ SetDimensions() [1/2]

void gdcm::ImageCodec::SetDimensions ( const std::vector< unsigned int > &  d)

◆ SetDimensions() [2/2]

void gdcm::ImageCodec::SetDimensions ( const unsigned int  d[3])

◆ SetLossyFlag()

void gdcm::ImageCodec::SetLossyFlag ( bool  l)

◆ SetLUT()

void gdcm::ImageCodec::SetLUT ( LookupTable const &  lut)
inline

◆ SetNeedByteSwap()

void gdcm::ImageCodec::SetNeedByteSwap ( bool  b)
inline

◆ SetNeedOverlayCleanup()

void gdcm::ImageCodec::SetNeedOverlayCleanup ( bool  b)
inline

◆ SetNumberOfDimensions()

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

◆ SetPhotometricInterpretation()

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

◆ SetPixelFormat()

virtual void gdcm::ImageCodec::SetPixelFormat ( PixelFormat const &  pf)
inlinevirtual

Reimplemented in gdcm::JPEGCodec.

Examples
ExtractIconFromFile.cxx.

◆ SetPlanarConfiguration()

void gdcm::ImageCodec::SetPlanarConfiguration ( unsigned int  pc)
inline

◆ StartEncode()

virtual bool gdcm::ImageCodec::StartEncode ( std::ostream &  os)
protectedvirtual

◆ StopEncode()

virtual bool gdcm::ImageCodec::StopEncode ( std::ostream &  os)
protectedvirtual

Friends And Related Symbol Documentation

◆ FileChangeTransferSyntax

friend class FileChangeTransferSyntax
friend

This is a high level API to encode in a streaming fashion. Each plugin will handle differently the caching mechanism so that a limited memory is used when compressing dataset. Codec will fall into two categories:

  • Full row encoder: only a single scanline (row) of data is needed to be loaded at a time;
  • Full frame encoder (default): a complete frame (row x col) is needed to be loaded at a time

◆ ImageChangePhotometricInterpretation

Member Data Documentation

◆ Dimensions

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

◆ LossyFlag

bool gdcm::ImageCodec::LossyFlag
protected

◆ LUT

LUTPtr gdcm::ImageCodec::LUT
protected

◆ NeedByteSwap

bool gdcm::ImageCodec::NeedByteSwap
protected

◆ NeedOverlayCleanup

bool gdcm::ImageCodec::NeedOverlayCleanup
protected

◆ NumberOfDimensions

unsigned int gdcm::ImageCodec::NumberOfDimensions
protected

◆ PF

PixelFormat gdcm::ImageCodec::PF
protected

◆ PI

PhotometricInterpretation gdcm::ImageCodec::PI
protected

◆ PlanarConfiguration

unsigned int gdcm::ImageCodec::PlanarConfiguration
protected

◆ RequestPaddedCompositePixelCode

bool gdcm::ImageCodec::RequestPaddedCompositePixelCode
protected

◆ RequestPlanarConfiguration

bool gdcm::ImageCodec::RequestPlanarConfiguration
protected

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