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

write DICOM files More...

#include <vtkGDCMImageWriter.h>

Inherits vtkImageWriter.

Public Types

enum  CompressionTypes {
  NO_COMPRESSION = 0 , JPEG_COMPRESSION , JPEG2000_COMPRESSION , JPEGLS_COMPRESSION ,
  RLE_COMPRESSION
}
 
typedef vtkImageWriter Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
virtual vtkMedicalImageProperties * GetMedicalImageProperties ()
 Pass in the vtkmedicalimageproperties object for medical information to be mapped to DICOM attributes. More...
 
virtual void SetMedicalImageProperties (vtkMedicalImageProperties *)
 
virtual void SetFileNames (vtkStringArray *)
 Pass in the list of filename to be used to write out the DICOM file(s) More...
 
virtual vtkStringArray * GetFileNames ()
 
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 void Write ()
 
virtual const char * GetFileExtensions ()
 Get the entension for this file format. More...
 
virtual const char * GetDescriptiveName ()
 Get the name of this file format. More...
 
virtual void SetDirectionCosines (vtkMatrix4x4 *matrix)
 You need to manually specify the direction the image is in to write a valid DICOM file since vtkImageData do not contains one (eg. More...
 
virtual vtkMatrix4x4 * GetDirectionCosines ()
 
virtual void SetDirectionCosinesFromImageOrientationPatient (const double dircos[6])
 
virtual void SetShift (double)
 Modality LUT. More...
 
virtual double GetShift ()
 
virtual void SetScale (double)
 
virtual double GetScale ()
 
virtual int GetImageFormat ()
 See vtkGDCMImageReader for list of ImageFormat. More...
 
virtual void SetImageFormat (int)
 
virtual void FileLowerLeftOn ()
 Set/Get whether the data comes from the file starting in the lower left corner or upper left corner. More...
 
virtual void FileLowerLeftOff ()
 
virtual int GetFileLowerLeft ()
 
virtual void SetFileLowerLeft (int)
 
virtual void SetPlanarConfiguration (int)
 For color image (more than a single comp) you can specify the planar configuration you prefer. More...
 
virtual int GetPlanarConfiguration ()
 
virtual void SetStudyUID (const char *)
 Set/Get specific StudyUID / SeriesUID. More...
 
virtual char * GetStudyUID ()
 
virtual void SetSeriesUID (const char *)
 
virtual char * GetSeriesUID ()
 
virtual void SetCompressionType (int)
 
virtual int GetCompressionType ()
 

Static Public Member Functions

static vtkGDCMImageWriterNew ()
 
static int IsTypeOf (const char *type)
 
static vtkGDCMImageWriterSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkGDCMImageWriter ()
 
 ~vtkGDCMImageWriter ()
 
void WriteSlice (vtkImageData *data)
 
int WriteGDCMData (vtkImageData *data, int timeStep)
 
virtual char * GetFileName ()
 

Detailed Description

write DICOM files

vtkGDCMImageWriter is a sink object that write DICOM files this writer is single threaded (see vtkGDCMThreadedImageReader2 for multi-thread)

Warning
only if ImageFormat is set to VTK_LOOKUP_TABLE
Attention
but instead a list of filenames: see SetFileNames and class gdcm::FilenameGenerator
Warning
You need to specify the correct ImageFormat (taken from the reader) You need to explicitly specify the DirectionCosines (taken from the reader) Since VTK 5.4 vtkMedicalImageProperties has its own DirectionCosine (no 's') user need to make sure the vtkMatrix4x4 is compatible with the 6-vector DirectionCosine.
Attention
as 2D slice, therefore the shift/scale operation might not be optimized for all slices. This is not recommended for image with a large dynamic range.
See also
vtkImageWriter vtkMedicalImageProperties vtkGDCMImageReader

Definition at line 51 of file vtkGDCMImageWriter.h.

Member Typedef Documentation

◆ Superclass

typedef vtkImageWriter vtkGDCMImageWriter::Superclass

Definition at line 55 of file vtkGDCMImageWriter.h.

Member Enumeration Documentation

◆ CompressionTypes

Enumerator
NO_COMPRESSION 
JPEG_COMPRESSION 
JPEG2000_COMPRESSION 
JPEGLS_COMPRESSION 
RLE_COMPRESSION 

Definition at line 156 of file vtkGDCMImageWriter.h.

Constructor & Destructor Documentation

◆ vtkGDCMImageWriter()

vtkGDCMImageWriter::vtkGDCMImageWriter ( )
protected

◆ ~vtkGDCMImageWriter()

vtkGDCMImageWriter::~vtkGDCMImageWriter ( )
protected

Member Function Documentation

◆ New()

static vtkGDCMImageWriter * vtkGDCMImageWriter::New ( )
static

◆ GetClassName()

virtual const char * vtkGDCMImageWriter::GetClassName ( )
virtual

◆ IsTypeOf()

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

◆ IsA()

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

◆ SafeDownCast()

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

◆ PrintSelf()

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

◆ GetMedicalImageProperties()

virtual vtkMedicalImageProperties * vtkGDCMImageWriter::GetMedicalImageProperties ( )
virtual

Pass in the vtkmedicalimageproperties object for medical information to be mapped to DICOM attributes.

◆ SetMedicalImageProperties()

virtual void vtkGDCMImageWriter::SetMedicalImageProperties ( vtkMedicalImageProperties *  )
virtual

◆ SetFileNames()

virtual void vtkGDCMImageWriter::SetFileNames ( vtkStringArray *  )
virtual

Pass in the list of filename to be used to write out the DICOM file(s)

◆ GetFileNames()

virtual vtkStringArray * vtkGDCMImageWriter::GetFileNames ( )
virtual

◆ GetLossyFlag()

virtual int vtkGDCMImageWriter::GetLossyFlag ( )
virtual

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

◆ SetLossyFlag()

virtual void vtkGDCMImageWriter::SetLossyFlag ( int  )
virtual

◆ LossyFlagOn()

virtual void vtkGDCMImageWriter::LossyFlagOn ( )
virtual

◆ LossyFlagOff()

virtual void vtkGDCMImageWriter::LossyFlagOff ( )
virtual

◆ Write()

virtual void vtkGDCMImageWriter::Write ( )
virtual

◆ GetFileExtensions()

virtual const char * vtkGDCMImageWriter::GetFileExtensions ( )
inlinevirtual

Get the entension for this file format.

Definition at line 90 of file vtkGDCMImageWriter.h.

◆ GetDescriptiveName()

virtual const char * vtkGDCMImageWriter::GetDescriptiveName ( )
inlinevirtual

Get the name of this file format.

Definition at line 96 of file vtkGDCMImageWriter.h.

◆ SetDirectionCosines()

virtual void vtkGDCMImageWriter::SetDirectionCosines ( vtkMatrix4x4 *  matrix)
virtual

You need to manually specify the direction the image is in to write a valid DICOM file since vtkImageData do not contains one (eg.

MR Image Storage, CT Image Storage...)

◆ GetDirectionCosines()

virtual vtkMatrix4x4 * vtkGDCMImageWriter::GetDirectionCosines ( )
virtual

◆ SetDirectionCosinesFromImageOrientationPatient()

virtual void vtkGDCMImageWriter::SetDirectionCosinesFromImageOrientationPatient ( const double  dircos[6])
virtual

◆ SetShift()

virtual void vtkGDCMImageWriter::SetShift ( double  )
virtual

Modality LUT.

◆ GetShift()

virtual double vtkGDCMImageWriter::GetShift ( )
virtual

◆ SetScale()

virtual void vtkGDCMImageWriter::SetScale ( double  )
virtual

◆ GetScale()

virtual double vtkGDCMImageWriter::GetScale ( )
virtual

◆ GetImageFormat()

virtual int vtkGDCMImageWriter::GetImageFormat ( )
virtual

See vtkGDCMImageReader for list of ImageFormat.

◆ SetImageFormat()

virtual void vtkGDCMImageWriter::SetImageFormat ( int  )
virtual

◆ FileLowerLeftOn()

virtual void vtkGDCMImageWriter::FileLowerLeftOn ( )
virtual

Set/Get whether the data comes from the file starting in the lower left corner or upper left corner.

◆ FileLowerLeftOff()

virtual void vtkGDCMImageWriter::FileLowerLeftOff ( )
virtual

◆ GetFileLowerLeft()

virtual int vtkGDCMImageWriter::GetFileLowerLeft ( )
virtual

◆ SetFileLowerLeft()

virtual void vtkGDCMImageWriter::SetFileLowerLeft ( int  )
virtual

◆ SetPlanarConfiguration()

virtual void vtkGDCMImageWriter::SetPlanarConfiguration ( int  )
virtual

For color image (more than a single comp) you can specify the planar configuration you prefer.

◆ GetPlanarConfiguration()

virtual int vtkGDCMImageWriter::GetPlanarConfiguration ( )
virtual

◆ SetStudyUID()

virtual void vtkGDCMImageWriter::SetStudyUID ( const char *  )
virtual

Set/Get specific StudyUID / SeriesUID.

◆ GetStudyUID()

virtual char * vtkGDCMImageWriter::GetStudyUID ( )
virtual

◆ SetSeriesUID()

virtual void vtkGDCMImageWriter::SetSeriesUID ( const char *  )
virtual

◆ GetSeriesUID()

virtual char * vtkGDCMImageWriter::GetSeriesUID ( )
virtual

◆ SetCompressionType()

virtual void vtkGDCMImageWriter::SetCompressionType ( int  )
virtual

◆ GetCompressionType()

virtual int vtkGDCMImageWriter::GetCompressionType ( )
virtual

◆ WriteSlice()

void vtkGDCMImageWriter::WriteSlice ( vtkImageData *  data)
protected

◆ WriteGDCMData()

int vtkGDCMImageWriter::WriteGDCMData ( vtkImageData *  data,
int  timeStep 
)
protected

◆ GetFileName()

virtual char * vtkGDCMImageWriter::GetFileName ( )
protectedvirtual

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