vtkgdcm
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkGDCMImageReader Class Reference

read DICOM Image files (Pixel Data) More...

#include <vtkGDCMImageReader.h>

Inheritance diagram for vtkGDCMImageReader:
[legend]

Public Types

typedef vtkMedicalImageReader2 Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int CanReadFile (const char *fname)
 
virtual const char * GetFileExtensions ()
 Valid extensions. More...
 
virtual const char * GetDescriptiveName ()
 A descriptive name for this format. More...
 
virtual vtkMatrix4x4 * GetDirectionCosines ()
 Get the Image Position (Patient) as stored in the DICOM file This is a read-only data member. More...
 
virtual vtkMedicalImageProperties * GetMedicalImageProperties ()
 Get the medical image properties object. More...
 
virtual void SetMedicalImageProperties (vtkMedicalImageProperties *pd)
 
virtual void SetFileNames (vtkStringArray *)
 
virtual vtkStringArray * GetFileNames ()
 
virtual int GetLoadOverlays ()
 Specifically request to load the overlay into the gdcm-VTK layer (gdcm always loads them when found). More...
 
virtual void SetLoadOverlays (int)
 
virtual void LoadOverlaysOn ()
 
virtual void LoadOverlaysOff ()
 
virtual int GetLoadIconImage ()
 Set/Get whether or not to load the Icon as vtkImageData (if found in the DICOM file) More...
 
virtual void SetLoadIconImage (int)
 
virtual void LoadIconImageOn ()
 
virtual void LoadIconImageOff ()
 
virtual int GetLossyFlag ()
 Set/Get whether or not the image was compressed using a lossy compression algorithm. More...
 
virtual void SetLossyFlag (int)
 
virtual void LossyFlagOn ()
 
virtual void LossyFlagOff ()
 
virtual int GetNumberOfOverlays ()
 Read only: number of overlays as found in this image (multiple overlays per slice is allowed) Only valid when LoadOverlays is true. More...
 
virtual int GetNumberOfIconImages ()
 Read only: number of icon image (there can only be zero or one icon per file) Only valid when LoadIconImage is true. More...
 
vtkImageData * GetOverlay (int i)
 Get Overlay/IconImage Remember to ALWAYS use those methods in your code, as the internal number for the output port is not garantee to remain the same, as features are added to the reader. More...
 
vtkImageData * GetIconImage ()
 
virtual int GetApplyLookupTable ()
 Load image with its associated Lookup Table. More...
 
virtual void SetApplyLookupTable (int)
 
virtual void ApplyLookupTableOn ()
 
virtual void ApplyLookupTableOff ()
 
virtual int GetApplyYBRToRGB ()
 Load image as YBR. More...
 
virtual void SetApplyYBRToRGB (int)
 
virtual void ApplyYBRToRGBOn ()
 
virtual void ApplyYBRToRGBOff ()
 
virtual int GetImageFormat ()
 Return VTK_LUMINANCE, VTK_INVERSE_LUMINANCE, VTK_RGB, VTK_RGBA, VTK_LOOKUP_TABLE, VTK_YBR or VTK_CMYK or 0 when ImageFormat is not handled. More...
 
virtual int GetPlanarConfiguration ()
 Return the Planar Configuration. More...
 
virtual double * GetImagePositionPatient ()
 Return the 'raw' information stored in the DICOM file: In case of a series of multiple files, only the first file is considered. More...
 
virtual void GetImagePositionPatient (double &, double &, double &)
 
virtual void GetImagePositionPatient (double[3])
 
virtual double * GetImageOrientationPatient ()
 
virtual void GetImageOrientationPatient (double &, double &, double &, double &, double &, double &)
 
virtual void GetImageOrientationPatient (double[6])
 
virtual vtkPolyData * GetCurve ()
 Set/Get the first Curve Data: More...
 
virtual void SetCurve (vtkPolyData *pd)
 
virtual double GetShift ()
 \DEPRECATED: Modality LUT Value returned by GetShift/GetScale might be inaccurate since Shift/Scale could be varying along the Series read. More...
 
virtual double GetScale ()
 

Static Public Member Functions

static vtkGDCMImageReaderNew ()
 
static int IsTypeOf (const char *type)
 
static vtkGDCMImageReaderSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkGDCMImageReader ()
 
 ~vtkGDCMImageReader ()
 
virtual void SetImageOrientationPatient (double, double, double, double, double, double)
 
virtual void SetImageOrientationPatient (double[6])
 
void FillMedicalImageInformation (const gdcm::ImageReader &reader)
 
int RequestInformationCompat ()
 
int RequestDataCompat ()
 
void ExecuteInformation ()
 
void ExecuteData (vtkDataObject *out)
 
int LoadSingleFile (const char *filename, char *pointer, unsigned long &outlen)
 
void SetFilePrefix (const char *)
 
virtual char * GetFilePrefix ()
 
void SetFilePattern (const char *)
 
virtual char * GetFilePattern ()
 

Protected Attributes

vtkMedicalImageProperties * MedicalImageProperties
 Medical Image properties. More...
 
vtkStringArray * FileNames
 
vtkMatrix4x4 * DirectionCosines
 
int LoadOverlays
 
int NumberOfOverlays
 
int LoadIconImage
 
int NumberOfIconImages
 
int IconImageDataExtent [6]
 
double ImagePositionPatient [3]
 
double ImageOrientationPatient [6]
 
vtkPolyData * Curve
 
int ImageFormat
 
int ApplyInverseVideo
 
int ApplyLookupTable
 
int ApplyYBRToRGB
 
int ApplyPlanarConfiguration
 
int ApplyShiftScale
 
double Shift
 
double Scale
 
int IconDataScalarType
 
int IconNumberOfScalarComponents
 
int PlanarConfiguration
 
int LossyFlag
 
int ForceRescale
 

Detailed Description

read DICOM Image files (Pixel Data)

vtkGDCMImageReader is a source object that reads some DICOM files this reader is single threaded.

Attention
upside down as VTK would expect, use this option only if you know what you are doing.
expected to provide an ordered list of filenames. No sorting will be applied afterward.
from a tag in a 2D DICOM file should be correct, there has been reports that this value can be missing, or incorrect, in which case users are advised to override this value using the return value from gdcm::IPPSorter::GetZSpacing() and set it via vtkImageChangeInformation on the reader itself.
Todo:

This reader does not handle a series of 3D images, only a single 3D (multi frame) or a list of 2D files are supported for now.

Did not implement SetFilePattern / SetFilePrefix API, move it to protected section for now.

Bug:
Overlay are assumed to have the same extent as image. Right now if overlay origin is not 0,0 the overlay will have an offset... Only the very first overlay is loaded at the VTK level, for now (even if there are more than one in the file)
DataOrigin:
When the reader is instantiated with FileLowerLeftOn the DataOrigin and Image Position (Patient) are identical. But when FileLowerLeft is Off, we have to reorder the Y-line of the image, and thus the DataOrigin is then translated to the other side of the image.
Spacing:
When reading a 3D volume, the spacing along the Z dimension might be negative (so as to respect up-side-down) as specified in the Image Orientation (Patient) tag. When Z-spacing is 0, this means the multi-frame object contains image which do not represent uniform volume.
Warning
When using vtkGDCMPolyDataReader in conjonction with vtkGDCMImageReader it is required that FileLowerLeft is set to ON as coordinate system would be inconsistent in between the two data structures.
Color Space mapping::
  • VTK_LUMINANCE <-> MONOCHROME2
  • VTK_LUMINANCE_ALPHA <-> Not supported
  • VTK_RGB <-> RGB
  • VTK_RGBA <-> ARGB (deprecated, DICOM 2008)
  • VTK_INVERSE_LUMINANCE <-> MONOCHROME1
  • VTK_LOOKUP_TABLE <-> PALETTE COLOR
  • VTK_YBR <-> YBR_FULL
Color Space mapping::
For detailed information on color space transformation and true lossless transformation see: http://gdcm.sourceforge.net/wiki/index.php/Color_Space_Transformations
See also
vtkMedicalImageReader2 vtkMedicalImageProperties vtkGDCMPolyDataReader vtkGDCMImageWriter vtkDICOMImageReader

Definition at line 108 of file vtkGDCMImageReader.h.

Member Typedef Documentation

◆ Superclass

typedef vtkMedicalImageReader2 vtkGDCMImageReader::Superclass

Definition at line 112 of file vtkGDCMImageReader.h.

Constructor & Destructor Documentation

◆ vtkGDCMImageReader()

vtkGDCMImageReader::vtkGDCMImageReader ( )
protected

◆ ~vtkGDCMImageReader()

vtkGDCMImageReader::~vtkGDCMImageReader ( )
protected

Member Function Documentation

◆ New()

static vtkGDCMImageReader* vtkGDCMImageReader::New ( )
static

◆ GetClassName()

virtual const char* vtkGDCMImageReader::GetClassName ( )
virtual

Reimplemented in vtkGDCMThreadedImageReader.

◆ IsTypeOf()

static int vtkGDCMImageReader::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkGDCMImageReader::IsA ( const char *  type)
virtual

Reimplemented in vtkGDCMThreadedImageReader.

◆ SafeDownCast()

static vtkGDCMImageReader* vtkGDCMImageReader::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

virtual void vtkGDCMImageReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Reimplemented in vtkGDCMThreadedImageReader.

◆ CanReadFile()

virtual int vtkGDCMImageReader::CanReadFile ( const char *  fname)
virtual

◆ GetFileExtensions()

virtual const char* vtkGDCMImageReader::GetFileExtensions ( )
inlinevirtual

Valid extensions.

Definition at line 120 of file vtkGDCMImageReader.h.

◆ GetDescriptiveName()

virtual const char* vtkGDCMImageReader::GetDescriptiveName ( )
inlinevirtual

A descriptive name for this format.

Definition at line 129 of file vtkGDCMImageReader.h.

◆ GetDirectionCosines()

virtual vtkMatrix4x4* vtkGDCMImageReader::GetDirectionCosines ( )
virtual

Get the Image Position (Patient) as stored in the DICOM file This is a read-only data member.

◆ GetMedicalImageProperties()

virtual vtkMedicalImageProperties* vtkGDCMImageReader::GetMedicalImageProperties ( )
virtual

Get the medical image properties object.

◆ SetMedicalImageProperties()

virtual void vtkGDCMImageReader::SetMedicalImageProperties ( vtkMedicalImageProperties *  pd)
virtual

◆ SetFileNames()

virtual void vtkGDCMImageReader::SetFileNames ( vtkStringArray *  )
virtual

◆ GetFileNames()

virtual vtkStringArray* vtkGDCMImageReader::GetFileNames ( )
virtual

◆ GetLoadOverlays()

virtual int vtkGDCMImageReader::GetLoadOverlays ( )
virtual

Specifically request to load the overlay into the gdcm-VTK layer (gdcm always loads them when found).

If no overlay is found in the image, then the vtkImageData for the overlay will be empty.

◆ SetLoadOverlays()

virtual void vtkGDCMImageReader::SetLoadOverlays ( int  )
virtual

◆ LoadOverlaysOn()

virtual void vtkGDCMImageReader::LoadOverlaysOn ( )
virtual

◆ LoadOverlaysOff()

virtual void vtkGDCMImageReader::LoadOverlaysOff ( )
virtual

◆ GetLoadIconImage()

virtual int vtkGDCMImageReader::GetLoadIconImage ( )
virtual

Set/Get whether or not to load the Icon as vtkImageData (if found in the DICOM file)

◆ SetLoadIconImage()

virtual void vtkGDCMImageReader::SetLoadIconImage ( int  )
virtual

◆ LoadIconImageOn()

virtual void vtkGDCMImageReader::LoadIconImageOn ( )
virtual

◆ LoadIconImageOff()

virtual void vtkGDCMImageReader::LoadIconImageOff ( )
virtual

◆ GetLossyFlag()

virtual int vtkGDCMImageReader::GetLossyFlag ( )
virtual

Set/Get whether or not the image was compressed using a lossy compression algorithm.

◆ SetLossyFlag()

virtual void vtkGDCMImageReader::SetLossyFlag ( int  )
virtual

◆ LossyFlagOn()

virtual void vtkGDCMImageReader::LossyFlagOn ( )
virtual

◆ LossyFlagOff()

virtual void vtkGDCMImageReader::LossyFlagOff ( )
virtual

◆ GetNumberOfOverlays()

virtual int vtkGDCMImageReader::GetNumberOfOverlays ( )
virtual

Read only: number of overlays as found in this image (multiple overlays per slice is allowed) Only valid when LoadOverlays is true.

◆ GetNumberOfIconImages()

virtual int vtkGDCMImageReader::GetNumberOfIconImages ( )
virtual

Read only: number of icon image (there can only be zero or one icon per file) Only valid when LoadIconImage is true.

◆ GetOverlay()

vtkImageData* vtkGDCMImageReader::GetOverlay ( int  i)

Get Overlay/IconImage Remember to ALWAYS use those methods in your code, as the internal number for the output port is not garantee to remain the same, as features are added to the reader.

◆ GetIconImage()

vtkImageData* vtkGDCMImageReader::GetIconImage ( )

◆ GetApplyLookupTable()

virtual int vtkGDCMImageReader::GetApplyLookupTable ( )
virtual

Load image with its associated Lookup Table.

◆ SetApplyLookupTable()

virtual void vtkGDCMImageReader::SetApplyLookupTable ( int  )
virtual

◆ ApplyLookupTableOn()

virtual void vtkGDCMImageReader::ApplyLookupTableOn ( )
virtual

◆ ApplyLookupTableOff()

virtual void vtkGDCMImageReader::ApplyLookupTableOff ( )
virtual

◆ GetApplyYBRToRGB()

virtual int vtkGDCMImageReader::GetApplyYBRToRGB ( )
virtual

Load image as YBR.

◆ SetApplyYBRToRGB()

virtual void vtkGDCMImageReader::SetApplyYBRToRGB ( int  )
virtual

◆ ApplyYBRToRGBOn()

virtual void vtkGDCMImageReader::ApplyYBRToRGBOn ( )
virtual

◆ ApplyYBRToRGBOff()

virtual void vtkGDCMImageReader::ApplyYBRToRGBOff ( )
virtual

◆ GetImageFormat()

virtual int vtkGDCMImageReader::GetImageFormat ( )
virtual

Return VTK_LUMINANCE, VTK_INVERSE_LUMINANCE, VTK_RGB, VTK_RGBA, VTK_LOOKUP_TABLE, VTK_YBR or VTK_CMYK or 0 when ImageFormat is not handled.

Warning: For color image, PlanarConfiguration need to be taken into account.

◆ GetPlanarConfiguration()

virtual int vtkGDCMImageReader::GetPlanarConfiguration ( )
virtual

Return the Planar Configuration.

This simply means that the internal DICOM image was stored using a particular planar configuration (most of the time: 0) For monochrome image, PlanarConfiguration is always 0

◆ GetImagePositionPatient() [1/3]

virtual double* vtkGDCMImageReader::GetImagePositionPatient ( )
virtual

Return the 'raw' information stored in the DICOM file: In case of a series of multiple files, only the first file is considered.

The Image Orientation (Patient) is garantee to remain the same, and image Image Position (Patient) in other slice can be computed using the ZSpacing (3rd dimension) (0020,0032) DS [87.774866-182.908510\168.629671] # 32, 3 ImagePositionPatient (0020,0037) DS [0.001479\0.999989-0.004376-0.002039-0.004372-0.999988] # 58, 6 ImageOrientationPatient

◆ GetImagePositionPatient() [2/3]

virtual void vtkGDCMImageReader::GetImagePositionPatient ( double &  ,
double &  ,
double &   
)
virtual

◆ GetImagePositionPatient() [3/3]

virtual void vtkGDCMImageReader::GetImagePositionPatient ( double  [3])
virtual

◆ GetImageOrientationPatient() [1/3]

virtual double* vtkGDCMImageReader::GetImageOrientationPatient ( )
virtual

◆ GetImageOrientationPatient() [2/3]

virtual void vtkGDCMImageReader::GetImageOrientationPatient ( double &  ,
double &  ,
double &  ,
double &  ,
double &  ,
double &   
)
virtual

◆ GetImageOrientationPatient() [3/3]

virtual void vtkGDCMImageReader::GetImageOrientationPatient ( double  [6])
virtual

◆ GetCurve()

virtual vtkPolyData* vtkGDCMImageReader::GetCurve ( )
virtual

Set/Get the first Curve Data:

◆ SetCurve()

virtual void vtkGDCMImageReader::SetCurve ( vtkPolyData *  pd)
virtual

◆ GetShift()

virtual double vtkGDCMImageReader::GetShift ( )
virtual

\DEPRECATED: Modality LUT Value returned by GetShift/GetScale might be inaccurate since Shift/Scale could be varying along the Series read.

Therefore user are advices not to use those functions anymore

◆ GetScale()

virtual double vtkGDCMImageReader::GetScale ( )
virtual

◆ SetImageOrientationPatient() [1/2]

virtual void vtkGDCMImageReader::SetImageOrientationPatient ( double  ,
double  ,
double  ,
double  ,
double  ,
double   
)
protectedvirtual

◆ SetImageOrientationPatient() [2/2]

virtual void vtkGDCMImageReader::SetImageOrientationPatient ( double  [6])
protectedvirtual

◆ FillMedicalImageInformation()

void vtkGDCMImageReader::FillMedicalImageInformation ( const gdcm::ImageReader &  reader)
protected

◆ RequestInformationCompat()

int vtkGDCMImageReader::RequestInformationCompat ( )
protected

◆ RequestDataCompat()

int vtkGDCMImageReader::RequestDataCompat ( )
protected

◆ ExecuteInformation()

void vtkGDCMImageReader::ExecuteInformation ( )
protected

◆ ExecuteData()

void vtkGDCMImageReader::ExecuteData ( vtkDataObject *  out)
protected

◆ LoadSingleFile()

int vtkGDCMImageReader::LoadSingleFile ( const char *  filename,
char *  pointer,
unsigned long &  outlen 
)
protected

◆ SetFilePrefix()

void vtkGDCMImageReader::SetFilePrefix ( const char *  )
inlineprotected

Definition at line 362 of file vtkGDCMImageReader.h.

◆ GetFilePrefix()

virtual char* vtkGDCMImageReader::GetFilePrefix ( )
protectedvirtual

◆ SetFilePattern()

void vtkGDCMImageReader::SetFilePattern ( const char *  )
inlineprotected

Definition at line 364 of file vtkGDCMImageReader.h.

◆ GetFilePattern()

virtual char* vtkGDCMImageReader::GetFilePattern ( )
protectedvirtual

Member Data Documentation

◆ MedicalImageProperties

vtkMedicalImageProperties* vtkGDCMImageReader::MedicalImageProperties
protected

Medical Image properties.

Definition at line 323 of file vtkGDCMImageReader.h.

◆ FileNames

vtkStringArray* vtkGDCMImageReader::FileNames
protected

Definition at line 327 of file vtkGDCMImageReader.h.

◆ DirectionCosines

vtkMatrix4x4* vtkGDCMImageReader::DirectionCosines
protected

Definition at line 331 of file vtkGDCMImageReader.h.

◆ LoadOverlays

int vtkGDCMImageReader::LoadOverlays
protected

Definition at line 332 of file vtkGDCMImageReader.h.

◆ NumberOfOverlays

int vtkGDCMImageReader::NumberOfOverlays
protected

Definition at line 333 of file vtkGDCMImageReader.h.

◆ LoadIconImage

int vtkGDCMImageReader::LoadIconImage
protected

Definition at line 334 of file vtkGDCMImageReader.h.

◆ NumberOfIconImages

int vtkGDCMImageReader::NumberOfIconImages
protected

Definition at line 335 of file vtkGDCMImageReader.h.

◆ IconImageDataExtent

int vtkGDCMImageReader::IconImageDataExtent[6]
protected

Definition at line 336 of file vtkGDCMImageReader.h.

◆ ImagePositionPatient

double vtkGDCMImageReader::ImagePositionPatient[3]
protected

Definition at line 337 of file vtkGDCMImageReader.h.

◆ ImageOrientationPatient

double vtkGDCMImageReader::ImageOrientationPatient[6]
protected

Definition at line 338 of file vtkGDCMImageReader.h.

◆ Curve

vtkPolyData* vtkGDCMImageReader::Curve
protected

Definition at line 339 of file vtkGDCMImageReader.h.

◆ ImageFormat

int vtkGDCMImageReader::ImageFormat
protected

Definition at line 341 of file vtkGDCMImageReader.h.

◆ ApplyInverseVideo

int vtkGDCMImageReader::ApplyInverseVideo
protected

Definition at line 343 of file vtkGDCMImageReader.h.

◆ ApplyLookupTable

int vtkGDCMImageReader::ApplyLookupTable
protected

Definition at line 344 of file vtkGDCMImageReader.h.

◆ ApplyYBRToRGB

int vtkGDCMImageReader::ApplyYBRToRGB
protected

Definition at line 345 of file vtkGDCMImageReader.h.

◆ ApplyPlanarConfiguration

int vtkGDCMImageReader::ApplyPlanarConfiguration
protected

Definition at line 347 of file vtkGDCMImageReader.h.

◆ ApplyShiftScale

int vtkGDCMImageReader::ApplyShiftScale
protected

Definition at line 348 of file vtkGDCMImageReader.h.

◆ Shift

double vtkGDCMImageReader::Shift
protected

Definition at line 352 of file vtkGDCMImageReader.h.

◆ Scale

double vtkGDCMImageReader::Scale
protected

Definition at line 353 of file vtkGDCMImageReader.h.

◆ IconDataScalarType

int vtkGDCMImageReader::IconDataScalarType
protected

Definition at line 354 of file vtkGDCMImageReader.h.

◆ IconNumberOfScalarComponents

int vtkGDCMImageReader::IconNumberOfScalarComponents
protected

Definition at line 355 of file vtkGDCMImageReader.h.

◆ PlanarConfiguration

int vtkGDCMImageReader::PlanarConfiguration
protected

Definition at line 356 of file vtkGDCMImageReader.h.

◆ LossyFlag

int vtkGDCMImageReader::LossyFlag
protected

Definition at line 357 of file vtkGDCMImageReader.h.

◆ ForceRescale

int vtkGDCMImageReader::ForceRescale
protected

Definition at line 358 of file vtkGDCMImageReader.h.


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