GDCM: gdcm::Bitmap Class Reference

GDCM 3.2.5

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
gdcm::Bitmap Class Reference

Bitmap class. More...

`#include <gdcmBitmap.h>`

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

## Public Member Functions
| Bitmap ()
| ~Bitmap () override
virtual bool | AreOverlaysInPixelData () const
void | Clear ()
bool | GetBuffer (char *buffer) const
| Access the raw data.
unsigned long | GetBufferLength () const
unsigned int | GetColumns () const
DataElement & | GetDataElement ()
const DataElement & | GetDataElement () const
unsigned int | GetDimension (unsigned int idx) const
const unsigned int * | GetDimensions () const
| Return the dimension of the pixel data, first dimension (x), then 2nd (y), then 3rd (z)...
LookupTable & | GetLUT ()
const LookupTable & | GetLUT () const
bool | GetNeedByteSwap () const
| INTERNAL do not use.
unsigned int | GetNumberOfDimensions () const
| Return the number of dimension of the pixel data bytes; for example 2 for a 2D matrices of values.
const PhotometricInterpretation & | GetPhotometricInterpretation () const
| return the photometric interpretation
PixelFormat & | GetPixelFormat ()
const PixelFormat & | GetPixelFormat () const
| Get/Set PixelFormat.
unsigned int | GetPlanarConfiguration () const
| return the planar configuration
unsigned int | GetRows () const
const TransferSyntax & | GetTransferSyntax () const
bool | IsEmpty () const
bool | IsLossy () const
| Return whether or not the image was compressed using a lossy compressor or not.
bool | IsTransferSyntaxCompatible (TransferSyntax const &ts) const
void | Print (std::ostream &) const override
void | SetColumns (unsigned int col)
void | SetDataElement (DataElement const &de)
void | SetDimension (unsigned int idx, unsigned int dim)
void | SetDimensions (const unsigned int dims[3])
void | SetLossyFlag (bool f)
| Specifically set that the image was compressed using a lossy compression mechanism.
void | SetLUT (LookupTable const &lut)
| Set/Get LUT.
void | SetNeedByteSwap (bool b)
void | SetNumberOfDimensions (unsigned int dim)
void | SetPhotometricInterpretation (PhotometricInterpretation const &pi)
void | SetPixelFormat (PixelFormat const &pf)
void | SetPlanarConfiguration (unsigned int pc)
void | SetRows (unsigned int rows)
void | SetTransferSyntax (TransferSyntax const &ts)
| Transfer syntax.
virtual bool | UnusedBitsPresentInPixelData () const
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 Types
typedef SmartPointer< LookupTable > | LUTPtr

## Protected Member Functions
bool | ComputeLossyFlag ()
bool | GetBuffer2 (std::ostream &os) const
bool | TryJPEG2000Codec (char *buffer, bool &lossyflag) const
bool | TryJPEG2000Codec2 (std::ostream &os) const
bool | TryJPEGCodec (char *buffer, bool &lossyflag) const
bool | TryJPEGCodec2 (std::ostream &os) const
bool | TryJPEGLSCodec (char *buffer, bool &lossyflag) const
bool | TryKAKADUCodec (char *buffer, bool &lossyflag) const
bool | TryPVRGCodec (char *buffer, bool &lossyflag) const
bool | TryRAWCodec (char *buffer, bool &lossyflag) const
bool | TryRLECodec (char *buffer, bool &lossyflag) const
Protected Member Functions inherited from gdcm::Object
void | Register ()
void | UnRegister ()

## Protected Attributes
std::vector< unsigned int > | Dimensions
bool | LossyFlag
LUTPtr | LUT
bool | NeedByteSwap
unsigned int | NumberOfDimensions
PixelFormat | PF
PhotometricInterpretation | PI
DataElement | PixelData
unsigned int | PlanarConfiguration
TransferSyntax | TS

## Friends
class | ImageChangeTransferSyntax
class | PixmapReader

## Detailed Description

Bitmap class.

A bitmap based image. Used as parent for both IconImage and the main Pixel Data Image It does not contains any World Space information (IPP, IOP)

## Member Typedef Documentation

## ◆ LUTPtr

typedef SmartPointer<LookupTable> gdcm::Bitmap::LUTPtr
| protected

## Constructor & Destructor Documentation

## ◆ Bitmap()

gdcm::Bitmap::Bitmap | ( |  | ) |

## ◆ ~Bitmap()

gdcm::Bitmap::~Bitmap | ( |  | ) |
| override

## Member Function Documentation

## ◆ AreOverlaysInPixelData()

virtual bool gdcm::Bitmap::AreOverlaysInPixelData | ( |  | ) | const
| inlinevirtual

Reimplemented in gdcm::Pixmap.

## ◆ Clear()

void gdcm::Bitmap::Clear | ( |  | ) |

## ◆ ComputeLossyFlag()

bool gdcm::Bitmap::ComputeLossyFlag | ( |  | ) |
| protected

## ◆ GetBuffer()

bool gdcm::Bitmap::GetBuffer | ( | char * | buffer | ) | const

Access the raw data.

Examples
  BasicImageAnonymizer.cs, ConvertToQImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, GetArray.cs, ReadMultiTimesException.cxx, and threadgdcm.cxx.

## ◆ GetBuffer2()

bool gdcm::Bitmap::GetBuffer2 | ( | std::ostream & | os | ) | const
| protected

## ◆ GetBufferLength()

unsigned long gdcm::Bitmap::GetBufferLength | ( |  | ) | const

Return the length of the image after decompression WARNING for palette color: It will NOT take into account the Palette Color thus you need to multiply this length by 3 if computing the size of equivalent RGB image

Examples
  BasicImageAnonymizer.cs, ConvertToQImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, GetArray.cs, PatchFile.cxx, ReadMultiTimesException.cxx, RescaleImage.cs, and threadgdcm.cxx.

## ◆ GetColumns()

unsigned int gdcm::Bitmap::GetColumns | ( |  | ) | const
| inline

References GetDimension().

## ◆ GetDataElement() [1/2]

DataElement & gdcm::Bitmap::GetDataElement | ( |  | ) |
| inline

References PixelData.

## ◆ GetDataElement() [2/2]

const DataElement & gdcm::Bitmap::GetDataElement | ( |  | ) | const
| inline

Examples
  ExtractIconFromFile.cxx.

References PixelData.

## ◆ GetDimension()

unsigned int gdcm::Bitmap::GetDimension | ( | unsigned int | idx | ) | const

Examples
  BasicImageAnonymizer.cs, DecompressImage.cs, and GetArray.cs.

Referenced by GetColumns(), and GetRows().

## ◆ GetDimensions()

const unsigned int * gdcm::Bitmap::GetDimensions | ( |  | ) | const

Return the dimension of the pixel data, first dimension (x), then 2nd (y), then 3rd (z)...

Examples
  ConvertToQImage.cxx, ExtractIconFromFile.cxx, FixJAIBugJPEGLS.cxx, HelloVizWorld.cxx, and threadgdcm.cxx.

## ◆ GetLUT() [1/2]

LookupTable & gdcm::Bitmap::GetLUT | ( |  | ) |
| inline

References LUT.

## ◆ GetLUT() [2/2]

const LookupTable & gdcm::Bitmap::GetLUT | ( |  | ) | const
| inline

Examples
  ExtractIconFromFile.cxx, ExtractImageRegionWithLUT.cs, and PrintLUT.cxx.

References LUT.

## ◆ GetNeedByteSwap()

bool gdcm::Bitmap::GetNeedByteSwap | ( |  | ) | const
| inline

INTERNAL do not use.

References NeedByteSwap.

## ◆ GetNumberOfDimensions()

unsigned int gdcm::Bitmap::GetNumberOfDimensions | ( |  | ) | const

Return the number of dimension of the pixel data bytes; for example 2 for a 2D matrices of values.

Examples
  DecompressImage.cs, GetArray.cs, HelloVizWorld.cxx, and threadgdcm.cxx.

## ◆ GetPhotometricInterpretation()

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

return the photometric interpretation

Examples
  ConvertToQImage.cxx, DecompressImage.cs, ExtractIconFromFile.cxx, and HelloVizWorld.cxx.

## ◆ GetPixelFormat() [1/2]

PixelFormat & gdcm::Bitmap::GetPixelFormat | ( |  | ) |
| inline

References PF.

## ◆ GetPixelFormat() [2/2]

const PixelFormat & gdcm::Bitmap::GetPixelFormat | ( |  | ) | const
| inline

Get/Set PixelFormat.

Examples
  ConvertToQImage.cxx, DecompressImage.cs, ExtractIconFromFile.cxx, FixJAIBugJPEGLS.cxx, GetArray.cs, GetJPEGSamplePrecision.cxx, RescaleImage.cs, TemplateEmptyImage.cxx, and threadgdcm.cxx.

References PF.

## ◆ GetPlanarConfiguration()

unsigned int gdcm::Bitmap::GetPlanarConfiguration | ( |  | ) | const

return the planar configuration

## ◆ GetRows()

unsigned int gdcm::Bitmap::GetRows | ( |  | ) | const
| inline

References GetDimension().

## ◆ GetTransferSyntax()

const TransferSyntax & gdcm::Bitmap::GetTransferSyntax | ( |  | ) | const
| inline

Examples
  ExtractIconFromFile.cxx.

References TS.

## ◆ IsEmpty()

bool gdcm::Bitmap::IsEmpty | ( |  | ) | const
| inline

References Dimensions.

## ◆ IsLossy()

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

Return whether or not the image was compressed using a lossy compressor or not.

## ◆ IsTransferSyntaxCompatible()

bool gdcm::Bitmap::IsTransferSyntaxCompatible | ( | TransferSyntax const & | ts | ) | const

## ◆ Print()

void gdcm::Bitmap::Print | ( | std::ostream & |  | ) | const
| overridevirtual

Reimplemented from gdcm::Object.

Reimplemented in gdcm::Image, and gdcm::Pixmap.

Examples
  ExtractIconFromFile.cxx.

## ◆ SetColumns()

void gdcm::Bitmap::SetColumns | ( | unsigned int | col | ) |
| inline

References SetDimension().

## ◆ SetDataElement()

void gdcm::Bitmap::SetDataElement | ( | DataElement const & | de | ) |
| inline

Examples
  BasicImageAnonymizer.cs, CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, FileChangeTS.cs, FileChangeTSLossy.cs, MpegVideoInfo.cs, csa2img.cxx, and iU22tomultisc.cxx.

References PixelData.

## ◆ SetDimension()

void gdcm::Bitmap::SetDimension | ( | unsigned int | idx,
|  | unsigned int | dim )

Examples
  DecompressImageMultiframe.cs, DecompressJPEGFile.cs, FileChangeTS.cs, FileChangeTSLossy.cs, MpegVideoInfo.cs, csa2img.cxx, and iU22tomultisc.cxx.

Referenced by SetColumns(), and SetRows().

## ◆ SetDimensions()

void gdcm::Bitmap::SetDimensions | ( | const unsigned int | dims[3] | ) |

Examples
  CreateARGBImage.cxx, CreateCMYKImage.cxx, and DecompressImage.cs.

## ◆ SetLossyFlag()

void gdcm::Bitmap::SetLossyFlag | ( | bool | f | ) |
| inline

Specifically set that the image was compressed using a lossy compression mechanism.

References LossyFlag.

## ◆ SetLUT()

void gdcm::Bitmap::SetLUT | ( | LookupTable const & | lut | ) |
| inline

Set/Get LUT.

References LUT, and gdcm::Object::SmartPointer.

## ◆ SetNeedByteSwap()

void gdcm::Bitmap::SetNeedByteSwap | ( | bool | b | ) |
| inline

References NeedByteSwap.

## ◆ SetNumberOfDimensions()

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

Examples
  CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, FileChangeTS.cs, FileChangeTSLossy.cs, MpegVideoInfo.cs, csa2img.cxx, and iU22tomultisc.cxx.

## ◆ SetPhotometricInterpretation()

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

Examples
  CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, FileChangeTS.cs, FileChangeTSLossy.cs, MpegVideoInfo.cs, csa2img.cxx, and iU22tomultisc.cxx.

## ◆ SetPixelFormat()

void gdcm::Bitmap::SetPixelFormat | ( | PixelFormat const & | pf | ) |
| inline

Examples
  CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, MpegVideoInfo.cs, csa2img.cxx, and iU22tomultisc.cxx.

References PF.

## ◆ SetPlanarConfiguration()

void gdcm::Bitmap::SetPlanarConfiguration | ( | unsigned int | pc | ) |

Warning
  you need to call SetPixelFormat first (before SetPlanarConfiguration) for consistency checking

## ◆ SetRows()

void gdcm::Bitmap::SetRows | ( | unsigned int | rows | ) |
| inline

References SetDimension().

## ◆ SetTransferSyntax()

void gdcm::Bitmap::SetTransferSyntax | ( | TransferSyntax const & | ts | ) |
| inline

Transfer syntax.

Examples
  BasicImageAnonymizer.cs, CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, MergeTwoFiles.cxx, and MpegVideoInfo.cs.

References TS.

## ◆ TryJPEG2000Codec()

bool gdcm::Bitmap::TryJPEG2000Codec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryJPEG2000Codec2()

bool gdcm::Bitmap::TryJPEG2000Codec2 | ( | std::ostream & | os | ) | const
| protected

## ◆ TryJPEGCodec()

bool gdcm::Bitmap::TryJPEGCodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryJPEGCodec2()

bool gdcm::Bitmap::TryJPEGCodec2 | ( | std::ostream & | os | ) | const
| protected

## ◆ TryJPEGLSCodec()

bool gdcm::Bitmap::TryJPEGLSCodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryKAKADUCodec()

bool gdcm::Bitmap::TryKAKADUCodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryPVRGCodec()

bool gdcm::Bitmap::TryPVRGCodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryRAWCodec()

bool gdcm::Bitmap::TryRAWCodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ TryRLECodec()

bool gdcm::Bitmap::TryRLECodec | ( | char * | buffer,
|  | bool & | lossyflag ) const
| protected

## ◆ UnusedBitsPresentInPixelData()

virtual bool gdcm::Bitmap::UnusedBitsPresentInPixelData | ( |  | ) | const
| inlinevirtual

Reimplemented in gdcm::Pixmap.

## Friends And Related Symbol Documentation

## ◆ ImageChangeTransferSyntax

friend class ImageChangeTransferSyntax
| friend

References ImageChangeTransferSyntax.

Referenced by ImageChangeTransferSyntax.

## ◆ PixmapReader

friend class PixmapReader
| friend

References PixmapReader.

Referenced by PixmapReader.

## Member Data Documentation

## ◆ Dimensions

std::vector<unsigned int> gdcm::Bitmap::Dimensions
| protected

Referenced by IsEmpty().

## ◆ LossyFlag

bool gdcm::Bitmap::LossyFlag
| protected

Referenced by SetLossyFlag().

## ◆ LUT

LUTPtr gdcm::Bitmap::LUT
| protected

Referenced by GetLUT(), GetLUT(), and SetLUT().

## ◆ NeedByteSwap

bool gdcm::Bitmap::NeedByteSwap
| protected

Referenced by GetNeedByteSwap(), and SetNeedByteSwap().

## ◆ NumberOfDimensions

unsigned int gdcm::Bitmap::NumberOfDimensions
| protected

## ◆ PF

PixelFormat gdcm::Bitmap::PF
| protected

Referenced by GetPixelFormat(), GetPixelFormat(), and SetPixelFormat().

## ◆ PI

PhotometricInterpretation gdcm::Bitmap::PI
| protected

## ◆ PixelData

DataElement gdcm::Bitmap::PixelData
| protected

Referenced by GetDataElement(), GetDataElement(), and SetDataElement().

## ◆ PlanarConfiguration

unsigned int gdcm::Bitmap::PlanarConfiguration
| protected

## ◆ TS

TransferSyntax gdcm::Bitmap::TS
| protected

Referenced by GetTransferSyntax(), and SetTransferSyntax().

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

- gdcmBitmap.h