GDCM 3.0.24
Public Member Functions | List of all members
gdcm::Image Class Reference

Image. More...

#include <gdcmImage.h>

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

Public Member Functions

 Image ()
 
 ~Image () override=default
 
const double * GetDirectionCosines () const
 
double GetDirectionCosines (unsigned int idx) const
 
double GetIntercept () const
 
const double * GetOrigin () const
 
double GetOrigin (unsigned int idx) const
 
double GetSlope () const
 
const double * GetSpacing () const
 
double GetSpacing (unsigned int idx) const
 
void Print (std::ostream &os) const override
 print
 
void SetDirectionCosines (const double dircos[6])
 
void SetDirectionCosines (const float dircos[6])
 
void SetDirectionCosines (unsigned int idx, double dircos)
 
void SetIntercept (double intercept)
 intercept
 
void SetOrigin (const double origin[3])
 
void SetOrigin (const float origin[3])
 
void SetOrigin (unsigned int idx, double ori)
 
void SetSlope (double slope)
 slope
 
void SetSpacing (const double spacing[3])
 
void SetSpacing (unsigned int idx, double spacing)
 
- Public Member Functions inherited from gdcm::Pixmap
 Pixmap ()
 
 ~Pixmap () override
 
bool AreOverlaysInPixelData () const override
 returns if Overlays are stored in the unused bit of the pixel data:
 
CurveGetCurve (size_t i=0)
 Curve: group 50xx.
 
const CurveGetCurve (size_t i=0) const
 
IconImageGetIconImage ()
 
const IconImageGetIconImage () const
 Set/Get Icon Image.
 
size_t GetNumberOfCurves () const
 
size_t GetNumberOfOverlays () const
 
OverlayGetOverlay (size_t i=0)
 Overlay: group 60xx.
 
const OverlayGetOverlay (size_t i=0) const
 
void Print (std::ostream &) const override
 
void RemoveOverlay (size_t i)
 
void SetIconImage (IconImage const &ii)
 
void SetNumberOfCurves (size_t n)
 
void SetNumberOfOverlays (size_t n)
 
bool UnusedBitsPresentInPixelData () const override
 returns if there are unused bits in the pixel data
 
- Public Member Functions inherited from gdcm::Bitmap
 Bitmap ()
 
 ~Bitmap () override
 
void Clear ()
 
bool GetBuffer (char *buffer) const
 Access the raw data.
 
unsigned long GetBufferLength () const
 
unsigned int GetColumns () const
 
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)...
 
LookupTableGetLUT ()
 
const LookupTableGetLUT () 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 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
 
const TransferSyntaxGetTransferSyntax () 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 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.
 
- Public Member Functions inherited from gdcm::Object
 Object ()
 
 Object (const Object &)
 Special requirement for copy/cstor, assignment operator.
 
virtual ~Object ()
 
void operator= (const Object &)
 

Additional Inherited Members

- Protected Types inherited from gdcm::Bitmap
typedef SmartPointer< LookupTableLUTPtr
 
- Protected Member Functions inherited from gdcm::Bitmap
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 inherited from gdcm::Pixmap
std::vector< CurveCurves
 
SmartPointer< IconImageIcon
 
std::vector< OverlayOverlays
 
- Protected Attributes inherited from gdcm::Bitmap
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
 

Detailed Description

Image.

This is the container for an Image in the general sense. From this container you should be able to request information like:

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
BasicImageAnonymizer.cs, CompressImage.cxx, CompressLossyJPEG.cs, ConvertToQImage.cxx, CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, DecompressImageMultiframe.cs, DecompressJPEGFile.cs, ExtractIconFromFile.cxx, FixJAIBugJPEGLS.cxx, GenFakeImage.cxx, GetArray.cs, GetJPEGSamplePrecision.cxx, GetSubSequenceData.cxx, HelloVizWorld.cxx, MpegVideoInfo.cs, PatchFile.cxx, PrintLUT.cxx, ReadMultiTimesException.cxx, RescaleImage.cs, TemplateEmptyImage.cxx, csa2img.cxx, iU22tomultisc.cxx, and threadgdcm.cxx.

Constructor & Destructor Documentation

◆ Image()

gdcm::Image::Image ( )
inline

◆ ~Image()

gdcm::Image::~Image ( )
overridedefault

Member Function Documentation

◆ GetDirectionCosines() [1/2]

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.

◆ GetDirectionCosines() [2/2]

double gdcm::Image::GetDirectionCosines ( unsigned int  idx) const

◆ GetIntercept()

double gdcm::Image::GetIntercept ( ) const
inline

◆ GetOrigin() [1/2]

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.

◆ GetOrigin() [2/2]

double gdcm::Image::GetOrigin ( unsigned int  idx) const

◆ GetSlope()

double gdcm::Image::GetSlope ( ) const
inline

◆ GetSpacing() [1/2]

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

Return a 3-tuples specifying the spacing NOTE: 3rd value can be an arbitrary 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

◆ GetSpacing() [2/2]

double gdcm::Image::GetSpacing ( unsigned int  idx) const

◆ Print()

void gdcm::Image::Print ( std::ostream &  os) const
overridevirtual

print

Reimplemented from gdcm::Bitmap.

Examples
CompressImage.cxx, and PatchFile.cxx.

◆ SetDirectionCosines() [1/3]

void gdcm::Image::SetDirectionCosines ( const double  dircos[6])

◆ SetDirectionCosines() [2/3]

void gdcm::Image::SetDirectionCosines ( const float  dircos[6])

◆ SetDirectionCosines() [3/3]

void gdcm::Image::SetDirectionCosines ( unsigned int  idx,
double  dircos 
)

◆ SetIntercept()

void gdcm::Image::SetIntercept ( double  intercept)
inline

intercept

Examples
TemplateEmptyImage.cxx.

◆ SetOrigin() [1/3]

void gdcm::Image::SetOrigin ( const double  origin[3])

◆ SetOrigin() [2/3]

void gdcm::Image::SetOrigin ( const float  origin[3])

◆ SetOrigin() [3/3]

void gdcm::Image::SetOrigin ( unsigned int  idx,
double  ori 
)

◆ SetSlope()

void gdcm::Image::SetSlope ( double  slope)
inline

slope

Examples
TemplateEmptyImage.cxx.

◆ SetSpacing() [1/2]

void gdcm::Image::SetSpacing ( const double  spacing[3])

◆ SetSpacing() [2/2]

void gdcm::Image::SetSpacing ( unsigned int  idx,
double  spacing 
)

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