Logo Search packages:      
Sourcecode: gdcm version File versions  Download package

gdcm::Image Class Reference

#include <gdcmImage.h>

Inheritance diagram for gdcm::Image:

gdcm::Pixmap gdcm::Bitmap gdcm::Object

List of all members.


Detailed Description

Image.

Note:
This is the container for an Image in the general sense. From this container you should be able to request information like:
  • Origin
  • Dimension
  • PixelFormat ... But also to retrieve the image as a raw buffer (char *) Since we have to deal with both RAW data and JPEG stream (which internally encode all the above information) this API might seems redundant. One way to solve that would be to subclass gdcm::Image with gdcm::JPEGImage which would from the stream extract the header info and fill it to please gdcm::Image...well except origin for instance
Basically you can see it as a storage for the PixelData element. However it was also used for MRSpectroscopy object (as proof of concept)

Definition at line 45 of file gdcmImage.h.


Public Member Functions

bool AreOverlaysInPixelData () const
 returns if Overlays are stored in the unused bit of the pixel data:
void Clear ()
bool GetBuffer (char *buffer) const
 Acces the raw data.
unsigned long GetBufferLength () const
unsigned int GetColumns () const
const CurveGetCurve (unsigned int i=0) const
CurveGetCurve (unsigned int i=0)
 Curve: group 50xx.
DataElementGetDataElement ()
const DataElementGetDataElement () 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)...
double GetDirectionCosines (unsigned int idx) const
const double * GetDirectionCosines () const
IconImageGetIconImage ()
const IconImageGetIconImage () const
 Set/Get Icon Image.
double GetIntercept () const
LookupTableGetLUT ()
const LookupTableGetLUT () const
bool GetNeedByteSwap () const
unsigned int GetNumberOfCurves () const
unsigned int GetNumberOfDimensions () const
 Return the number of dimension of the pixel data bytes; for example 2 for a 2D matrices of values.
unsigned int GetNumberOfOverlays () const
double GetOrigin (unsigned int idx) const
const double * GetOrigin () const
const OverlayGetOverlay (unsigned int i=0) const
OverlayGetOverlay (unsigned int i=0)
 Overlay: group 60xx.
const PhotometricInterpretationGetPhotometricInterpretation () const
 return the photometric interpretation
PixelFormatGetPixelFormat ()
const PixelFormatGetPixelFormat () const
 Get/Set PixelFormat.
unsigned int GetPlanarConfiguration () const
 return the planar configuration
unsigned int GetRows () const
double GetSlope () const
double GetSpacing (unsigned int idx) const
const double * GetSpacing () const
SwapCode GetSwapCode () const
 DEPRECATED DO NOT USE.
const TransferSyntaxGetTransferSyntax () const
bool IsEmpty () const
bool IsLossy () const
 Return whether or not the image was compressed using a lossy compressor or not.
void Print (std::ostream &os) const
 print
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 SetDirectionCosines (unsigned int idx, double dircos)
void SetDirectionCosines (const double *dircos)
void SetDirectionCosines (const float *dircos)
void SetIntercept (double intercept)
 intercept
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 SetNumberOfCurves (unsigned int n)
void SetNumberOfDimensions (unsigned int dim)
void SetNumberOfOverlays (unsigned int n)
void SetOrigin (unsigned int idx, double ori)
void SetOrigin (const double *ori)
void SetOrigin (const float *ori)
void SetPhotometricInterpretation (PhotometricInterpretation const &pi)
void SetPixelFormat (PixelFormat const &pf)
void SetPlanarConfiguration (unsigned int pc)
void SetRows (unsigned int rows)
void SetSlope (double slope)
 slope
void SetSpacing (unsigned int idx, double spacing)
void SetSpacing (const double *spacing)
void SetSwapCode (SwapCode sc)
void SetTransferSyntax (TransferSyntax const &ts)
 Transfer syntax.

Protected Types

typedef SmartPointer< LookupTableLUTPtr

Protected Member Functions

bool ComputeLossyFlag ()
bool GetBuffer2 (std::ostream &os) const
void Register ()
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 TryPVRGCodec (char *buffer, bool &lossyflag) const
bool TryRAWCodec (char *buffer, bool &lossyflag) const
bool TryRLECodec (char *buffer, bool &lossyflag) const
void UnRegister ()

Protected Attributes

std::vector< CurveCurves
std::vector< unsigned int > Dimensions
IconImage Icon
bool LossyFlag
LUTPtr LUT
bool NeedByteSwap
unsigned int NumberOfDimensions
std::vector< OverlayOverlays
PixelFormat PF
PhotometricInterpretation PI
DataElement PixelData
unsigned int PlanarConfiguration
TransferSyntax TS

Private Attributes

std::vector< double > DirectionCosines
double Intercept
std::vector< double > Origin
SwapCode SC
double Slope
std::vector< double > Spacing

Friends

class ImageChangeTransferSyntax
class PixmapReader

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

Generated by  Doxygen 1.6.0   Back to index