Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ToFImageWriter Class Reference

Writer class for ToF images. More...

#include <mitkToFImageWriter.h>

Inheritance diagram for mitk::ToFImageWriter:
Collaboration diagram for mitk::ToFImageWriter:

Public Types

enum  ToFImageType { ToFImageType3D, ToFImageType2DPlusT }
 

Public Member Functions

 ToFImageWriter ()
 
 ~ToFImageWriter ()
 
 mitkClassMacroItkParent (ToFImageWriter, itk::Object)
 
Pointer Clone () const
 
virtual std::string GetDistanceImageFileName ()
 
virtual std::string GetAmplitudeImageFileName ()
 
virtual std::string GetIntensityImageFileName ()
 
virtual std::string GetRGBImageFileName ()
 
virtual std::string GetExtension ()
 
virtual int GetToFCaptureWidth ()
 
virtual int GetToFCaptureHeight ()
 
virtual int GetRGBCaptureWidth ()
 
virtual int GetRGBCaptureHeight ()
 
virtual bool GetDistanceImageSelected ()
 
virtual bool GetAmplitudeImageSelected ()
 
virtual bool GetIntensityImageSelected ()
 
virtual bool GetRGBImageSelected ()
 
virtual void SetDistanceImageFileName (std::string _arg)
 
virtual void SetAmplitudeImageFileName (std::string _arg)
 
virtual void SetIntensityImageFileName (std::string _arg)
 
virtual void SetRGBImageFileName (std::string _arg)
 
virtual void SetExtension (std::string _arg)
 
virtual void SetToFCaptureWidth (int _arg)
 
virtual void SetToFCaptureHeight (int _arg)
 
virtual void SetRGBCaptureWidth (int _arg)
 
virtual void SetRGBCaptureHeight (int _arg)
 
virtual void SetDistanceImageSelected (bool _arg)
 
virtual void SetAmplitudeImageSelected (bool _arg)
 
virtual void SetIntensityImageSelected (bool _arg)
 
virtual void SetRGBImageSelected (bool _arg)
 
ToFImageWriter::ToFImageType GetToFImageType ()
 Get the type of image to be written. More...
 
void SetToFImageType (ToFImageWriter::ToFImageType toFImageType)
 Set the type of image to be written. More...
 
virtual void Open ()
 Open file(s) for writing. More...
 
virtual void Close ()
 Close file(s) add .pic header and write. More...
 
virtual void Add (float *distanceFloatData, float *amplitudeFloatData, float *intensityFloatData, unsigned char *rgbData=0)
 Add new data to file. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

void CheckForFileExtension (std::string &fileName)
 Checks file name if file extension exists. If not an error message is returned. More...
 

Protected Attributes

std::string m_DistanceImageFileName
 file name for saving the distance image More...
 
std::string m_AmplitudeImageFileName
 file name for saving the amplitude image More...
 
std::string m_IntensityImageFileName
 file name for saving the intensity image More...
 
std::string m_RGBImageFileName
 file name for saving the RGB image More...
 
std::string m_Extension
 file extension used for saving images More...
 
int m_ToFCaptureWidth
 width (x-dimension) of the images to record. More...
 
int m_ToFCaptureHeight
 height (y-dimension) of the images to record. More...
 
int m_ToFPixelNumber
 number of pixels (widht*height) of the images to record More...
 
int m_ToFImageSizeInBytes
 size of the image to save in bytes More...
 
int m_RGBCaptureWidth
 width (x-dimension) of the images to record. More...
 
int m_RGBCaptureHeight
 height (y-dimension) of the images to record. More...
 
int m_RGBPixelNumber
 number of pixels (widht*height) of the images to record More...
 
int m_RGBImageSizeInBytes
 size of the image to save in bytes More...
 
int m_NumOfFrames
 number of frames written to the image. Used for pic header. More...
 
ToFImageWriter::ToFImageType m_ToFImageType
 type of image to be recorded: ToFImageType3D (0) or ToFImageType2DPlusT (1) More...
 
bool m_DistanceImageSelected
 flag indicating if distance image should be recorded More...
 
bool m_AmplitudeImageSelected
 flag indicating if amplitude image should be recorded More...
 
bool m_IntensityImageSelected
 flag indicating if intensity image should be recorded More...
 
bool m_RGBImageSelected
 flag indicating if RGB image should be recorded More...
 

Detailed Description

Writer class for ToF images.

This writer class allows streaming of ToF data into a file. The .pic file format is used for writing the data. Image information is included in the header of the pic file. Writer can simultaneously save "distance", "intensity" and "amplitude" image. Images can be written as 3D volume (ToFImageType::ToFImageType3D) or temporal image stack (ToFImageType::ToFImageType2DPlusT)

Definition at line 38 of file mitkToFImageWriter.h.

Member Enumeration Documentation

Enumerator
ToFImageType3D 
ToFImageType2DPlusT 

Definition at line 79 of file mitkToFImageWriter.h.

Constructor & Destructor Documentation

mitk::ToFImageWriter::ToFImageWriter ( )

Definition at line 24 of file mitkToFImageWriter.cpp.

mitk::ToFImageWriter::~ToFImageWriter ( )

Definition at line 35 of file mitkToFImageWriter.cpp.

Member Function Documentation

virtual void mitk::ToFImageWriter::Add ( float *  distanceFloatData,
float *  amplitudeFloatData,
float *  intensityFloatData,
unsigned char *  rgbData = 0 
)
inlinevirtual

Add new data to file.

Reimplemented in mitk::ToFImageCsvWriter, and mitk::ToFNrrdImageWriter.

Definition at line 101 of file mitkToFImageWriter.h.

void mitk::ToFImageWriter::CheckForFileExtension ( std::string &  fileName)
protected

Checks file name if file extension exists. If not an error message is returned.

Definition at line 39 of file mitkToFImageWriter.cpp.

References m_Extension, and MITK_ERROR.

Referenced by mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

Pointer mitk::ToFImageWriter::Clone ( ) const
virtual void mitk::ToFImageWriter::Close ( )
inlinevirtual

Close file(s) add .pic header and write.

Reimplemented in mitk::ToFImageCsvWriter, and mitk::ToFNrrdImageWriter.

Definition at line 97 of file mitkToFImageWriter.h.

virtual std::string mitk::ToFImageWriter::GetAmplitudeImageFileName ( )
virtual
virtual bool mitk::ToFImageWriter::GetAmplitudeImageSelected ( )
virtual
virtual std::string mitk::ToFImageWriter::GetDistanceImageFileName ( )
virtual
virtual bool mitk::ToFImageWriter::GetDistanceImageSelected ( )
virtual
virtual std::string mitk::ToFImageWriter::GetExtension ( )
virtual
virtual std::string mitk::ToFImageWriter::GetIntensityImageFileName ( )
virtual
virtual bool mitk::ToFImageWriter::GetIntensityImageSelected ( )
virtual
virtual int mitk::ToFImageWriter::GetRGBCaptureHeight ( )
virtual
virtual int mitk::ToFImageWriter::GetRGBCaptureWidth ( )
virtual
virtual std::string mitk::ToFImageWriter::GetRGBImageFileName ( )
virtual
virtual bool mitk::ToFImageWriter::GetRGBImageSelected ( )
virtual
virtual int mitk::ToFImageWriter::GetToFCaptureHeight ( )
virtual
virtual int mitk::ToFImageWriter::GetToFCaptureWidth ( )
virtual
ToFImageWriter::ToFImageType mitk::ToFImageWriter::GetToFImageType ( )

Get the type of image to be written.

Returns
ToF image type: ToFImageType3D (0) or ToFImageType2DPlusT (1)

Definition at line 60 of file mitkToFImageWriter.cpp.

References m_ToFImageType.

mitk::ToFImageWriter::mitkClassMacroItkParent ( ToFImageWriter  ,
itk::Object   
)
static Pointer mitk::ToFImageWriter::New ( )
static
virtual void mitk::ToFImageWriter::Open ( )
inlinevirtual

Open file(s) for writing.

Reimplemented in mitk::ToFImageCsvWriter, and mitk::ToFNrrdImageWriter.

Definition at line 93 of file mitkToFImageWriter.h.

virtual void mitk::ToFImageWriter::SetAmplitudeImageFileName ( std::string  _arg)
virtual
virtual void mitk::ToFImageWriter::SetAmplitudeImageSelected ( bool  _arg)
virtual
virtual void mitk::ToFImageWriter::SetDistanceImageFileName ( std::string  _arg)
virtual
virtual void mitk::ToFImageWriter::SetDistanceImageSelected ( bool  _arg)
virtual
virtual void mitk::ToFImageWriter::SetExtension ( std::string  _arg)
virtual
virtual void mitk::ToFImageWriter::SetIntensityImageFileName ( std::string  _arg)
virtual
virtual void mitk::ToFImageWriter::SetIntensityImageSelected ( bool  _arg)
virtual
virtual void mitk::ToFImageWriter::SetRGBCaptureHeight ( int  _arg)
virtual
virtual void mitk::ToFImageWriter::SetRGBCaptureWidth ( int  _arg)
virtual
virtual void mitk::ToFImageWriter::SetRGBImageFileName ( std::string  _arg)
virtual
virtual void mitk::ToFImageWriter::SetRGBImageSelected ( bool  _arg)
virtual
virtual void mitk::ToFImageWriter::SetToFCaptureHeight ( int  _arg)
virtual
virtual void mitk::ToFImageWriter::SetToFCaptureWidth ( int  _arg)
virtual
void mitk::ToFImageWriter::SetToFImageType ( ToFImageWriter::ToFImageType  toFImageType)

Set the type of image to be written.

Parameters
toFImageTypetype of the ToF image: ToFImageType3D (0) or ToFImageType2DPlusT (1)

Definition at line 65 of file mitkToFImageWriter.cpp.

References m_ToFImageType.

Member Data Documentation

std::string mitk::ToFImageWriter::m_AmplitudeImageFileName
protected

file name for saving the amplitude image

Definition at line 112 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Close(), mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

bool mitk::ToFImageWriter::m_AmplitudeImageSelected
protected
std::string mitk::ToFImageWriter::m_DistanceImageFileName
protected

file name for saving the distance image

Definition at line 111 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Close(), mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

bool mitk::ToFImageWriter::m_DistanceImageSelected
protected
std::string mitk::ToFImageWriter::m_Extension
protected

file extension used for saving images

Definition at line 115 of file mitkToFImageWriter.h.

Referenced by CheckForFileExtension(), and mitk::ToFImageCsvWriter::ToFImageCsvWriter().

std::string mitk::ToFImageWriter::m_IntensityImageFileName
protected

file name for saving the intensity image

Definition at line 113 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Close(), mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

bool mitk::ToFImageWriter::m_IntensityImageSelected
protected
int mitk::ToFImageWriter::m_NumOfFrames
protected

number of frames written to the image. Used for pic header.

Definition at line 125 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Add(), mitk::ToFImageCsvWriter::Add(), mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

int mitk::ToFImageWriter::m_RGBCaptureHeight
protected

height (y-dimension) of the images to record.

Definition at line 122 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open().

int mitk::ToFImageWriter::m_RGBCaptureWidth
protected

width (x-dimension) of the images to record.

Definition at line 121 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open().

std::string mitk::ToFImageWriter::m_RGBImageFileName
protected

file name for saving the RGB image

Definition at line 114 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Close(), and mitk::ToFNrrdImageWriter::Open().

bool mitk::ToFImageWriter::m_RGBImageSelected
protected

flag indicating if RGB image should be recorded

Definition at line 131 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Add(), mitk::ToFNrrdImageWriter::Close(), and mitk::ToFNrrdImageWriter::Open().

int mitk::ToFImageWriter::m_RGBImageSizeInBytes
protected

size of the image to save in bytes

Definition at line 124 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Add(), and mitk::ToFNrrdImageWriter::Open().

int mitk::ToFImageWriter::m_RGBPixelNumber
protected

number of pixels (widht*height) of the images to record

Definition at line 123 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open().

int mitk::ToFImageWriter::m_ToFCaptureHeight
protected

height (y-dimension) of the images to record.

Definition at line 118 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

int mitk::ToFImageWriter::m_ToFCaptureWidth
protected

width (x-dimension) of the images to record.

Definition at line 117 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

int mitk::ToFImageWriter::m_ToFImageSizeInBytes
protected

size of the image to save in bytes

Definition at line 120 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Add(), mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().

ToFImageWriter::ToFImageType mitk::ToFImageWriter::m_ToFImageType
protected

type of image to be recorded: ToFImageType3D (0) or ToFImageType2DPlusT (1)

Definition at line 126 of file mitkToFImageWriter.h.

Referenced by GetToFImageType(), and SetToFImageType().

int mitk::ToFImageWriter::m_ToFPixelNumber
protected

number of pixels (widht*height) of the images to record

Definition at line 119 of file mitkToFImageWriter.h.

Referenced by mitk::ToFNrrdImageWriter::Open(), and mitk::ToFImageCsvWriter::Open().


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