Public Member Functions

gdcm::Image Class Reference

Image. More...

#include <gdcmImage.h>

Inheritance diagram for gdcm::Image:
Inheritance graph
[legend]
Collaboration diagram for gdcm::Image:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Image ()
 ~Image ()
const double * GetDirectionCosines () const
double GetDirectionCosines (unsigned int idx) const
double GetIntercept () const
double GetOrigin (unsigned int idx) const
const double * GetOrigin () const
double GetSlope () const
double GetSpacing (unsigned int idx) const
const double * GetSpacing () const
SwapCode GetSwapCode () const
 DEPRECATED DO NOT USE.
void Print (std::ostream &os) const
 print
void SetDirectionCosines (unsigned int idx, double dircos)
void SetDirectionCosines (const double *dircos)
void SetDirectionCosines (const float *dircos)
void SetIntercept (double intercept)
 intercept
void SetOrigin (const float *ori)
void SetOrigin (unsigned int idx, double ori)
void SetOrigin (const double *ori)
void SetSlope (double slope)
 slope
void SetSpacing (unsigned int idx, double spacing)
void SetSpacing (const double *spacing)
void SetSwapCode (SwapCode sc)

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 Pixel Data element (7fe0,0010).

Warning:
This class does some heuristics to guess the Spacing but is not compatible with DICOM CP-586. In case of doubt use PixmapReader instead
See also:
ImageReader PixmapReader
Examples:

CompressImage.cxx, ConvertToQImage.cxx, CreateARGBImage.cxx, CreateCMYKImage.cxx, csa2img.cxx, GenFakeImage.cxx, GetJPEGSamplePrecision.cxx, HelloVizWorld.cxx, PatchFile.cxx, and threadgdcm.cxx.


Constructor & Destructor Documentation

gdcm::Image::Image (  ) [inline]
gdcm::Image::~Image (  ) [inline]

Member Function Documentation

const double* gdcm::Image::GetDirectionCosines (  ) const

Return a 6-tuples specifying the direction cosines A default value of (1,0,0,0,1,0) will be return when the direction cosines was not specified.

double gdcm::Image::GetDirectionCosines ( unsigned int  idx ) const
double gdcm::Image::GetIntercept (  ) const [inline]
const double* gdcm::Image::GetOrigin (  ) const

Return a 3-tuples specifying the origin Will return (0,0,0) if the origin was not specified.

Examples:
HelloVizWorld.cxx.
double gdcm::Image::GetOrigin ( unsigned int  idx ) const
double gdcm::Image::GetSlope (  ) const [inline]
double gdcm::Image::GetSpacing ( unsigned int  idx ) const
const double* gdcm::Image::GetSpacing (  ) const

Return a 3-tuples specifying the spacing NOTE: 3rd value can be an aribtrary 1 value when the spacing was not specified (ex. 2D image). WARNING: when the spacing is not specifier, a default value of 1 will be returned

SwapCode gdcm::Image::GetSwapCode (  ) const [inline]

DEPRECATED DO NOT USE.

void gdcm::Image::Print ( std::ostream &  os ) const [virtual]

print

Reimplemented from gdcm::Pixmap.

Examples:
CompressImage.cxx, and PatchFile.cxx.
void gdcm::Image::SetDirectionCosines ( const double *  dircos )
void gdcm::Image::SetDirectionCosines ( const float *  dircos )
void gdcm::Image::SetDirectionCosines ( unsigned int  idx,
double  dircos 
)
void gdcm::Image::SetIntercept ( double  intercept ) [inline]

intercept

Examples:
csa2img.cxx.
void gdcm::Image::SetOrigin ( unsigned int  idx,
double  ori 
)
void gdcm::Image::SetOrigin ( const double *  ori )
void gdcm::Image::SetOrigin ( const float *  ori )
void gdcm::Image::SetSlope ( double  slope ) [inline]

slope

Examples:
csa2img.cxx.
void gdcm::Image::SetSpacing ( const double *  spacing )
Examples:
csa2img.cxx.
void gdcm::Image::SetSpacing ( unsigned int  idx,
double  spacing 
)
void gdcm::Image::SetSwapCode ( SwapCode  sc ) [inline]

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

Generated on Sat Dec 4 2010 08:59:47 for GDCM by doxygen 1.7.2
SourceForge.net Logo