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

Filter that allows recording of processed ToF images Internally the ToFImageWriter is used for writing. More...

#include <mitkToFImageRecorderFilter.h>

Inheritance diagram for mitk::ToFImageRecorderFilter:
Collaboration diagram for mitk::ToFImageRecorderFilter:

Public Member Functions

 mitkClassMacro (ToFImageRecorderFilter, ImageToImageFilter)
 
Pointer Clone () const
 
void SetFileName (std::string fileName)
 Set file name for writing image files This filename will be appended by "_DistanceImage", "_AmplitudeImage", or "_IntensityImage" for the single images. More...
 
void SetImageType (ToFImageWriter::ToFImageType tofImageType)
 Set image type for recording. More...
 
ToFImageWriter::Pointer GetToFImageWriter ()
 Returns a pointer to the ToFImageWriter internally used. More...
 
void SetToFImageWriter (ToFImageWriter::Pointer tofImageWriter)
 Sets a pointer to the ToFImageWriter internally used. More...
 
void StartRecording ()
 start recording of data More...
 
void StopRecording ()
 stop recording of data More...
 
virtual void SetInput (Image *input)
 sets the input of this filter More...
 
virtual void SetInput (unsigned int idx, Image *input)
 sets the input of this filter at idx More...
 
ImageGetInput ()
 returns the input of this filter More...
 
ImageGetInput (unsigned int idx)
 returns the input with id idx of this filter More...
 
- Public Member Functions inherited from mitk::ImageToImageFilter
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const InputImageType *image)
 
InputImageTypeGetInput (void)
 
InputImageTypeGetInput (unsigned int idx)
 
const InputImageTypeGetInput (void) const
 
const InputImageTypeGetInput (unsigned int idx) const
 
- Public Member Functions inherited from mitk::ImageSource
Pointer Clone () const
 
OutputTypeGetOutput ()
 Get the output data of this image source object. More...
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Make a DataObject of the correct type to used as the specified output. More...
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual vtkImageData * GetVtkImageData ()
 
virtual const vtkImageData * GetVtkImageData () const
 
- Public Member Functions inherited from mitk::BaseDataSource
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Access itk::ProcessObject::m_Updating. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageToImageFilter
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageSource
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 Method for creation through the object factory. More...
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 ToFImageRecorderFilter ()
 standard constructor More...
 
 ~ToFImageRecorderFilter ()
 standard destructor More...
 
virtual void GenerateData () override
 method generating the output of this filter. Called in the updated process of the pipeline. This method generates the output of the ToFSurfaceSource: The generated surface of the 3d points More...
 
void CreateOutputsForAllInputs ()
 Create an output for each input. More...
 
- Protected Member Functions inherited from mitk::ImageToImageFilter
 ImageToImageFilter ()
 
virtual ~ImageToImageFilter ()
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void GenerateInputRequestedRegion () override
 
- Protected Member Functions inherited from mitk::ImageSource
 ImageSource ()
 
virtual ~ImageSource ()
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
 If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More...
 
virtual void PrepareOutputs () override
 This method is intentionally left blank. More...
 
virtual void AllocateOutputs ()
 The GenerateData method normally allocates the buffers for all of the outputs of a filter. More...
 
virtual void BeforeThreadedGenerateData ()
 If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More...
 
virtual void AfterThreadedGenerateData ()
 If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More...
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion)
 Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More...
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
virtual ~BaseDataSource ()
 

Protected Attributes

ToFImageWriter::Pointer m_ToFImageWriter
 image writer used for streaming input data to file More...
 
bool m_RecordingStarted
 flag indicating if filter is currently recording More...
 
std::string m_FileExtension
 

Additional Inherited Members

- Public Types inherited from mitk::ImageToImageFilter
typedef ImageToImageFilter Self
 
typedef ImageSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::OutputImageRegionType OutputImageRegionType
 
typedef mitk::Image InputImageType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::ConstPointer InputImageConstPointer
 
typedef SlicedData::RegionType InputImageRegionType
 
- Public Types inherited from mitk::ImageSource
typedef ImageSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef mitk::Image OutputImageType
 Some convenient typedefs. More...
 
typedef OutputImageType OutputType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef SlicedData::RegionType OutputImageRegionType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseDataSource Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef BaseData OutputType
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 
- Static Protected Member Functions inherited from mitk::ImageSource
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 Static function used as a "callback" by the MultiThreader. More...
 
- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Filter that allows recording of processed ToF images Internally the ToFImageWriter is used for writing.

Definition at line 32 of file mitkToFImageRecorderFilter.h.

Constructor & Destructor Documentation

mitk::ToFImageRecorderFilter::ToFImageRecorderFilter ( )
protected

standard constructor

Definition at line 28 of file mitkToFImageRecorderFilter.cpp.

References m_FileExtension.

mitk::ToFImageRecorderFilter::~ToFImageRecorderFilter ( )
protected

standard destructor

Definition at line 33 of file mitkToFImageRecorderFilter.cpp.

Member Function Documentation

Pointer mitk::ToFImageRecorderFilter::Clone ( ) const
void mitk::ToFImageRecorderFilter::CreateOutputsForAllInputs ( )
protected

Create an output for each input.

This Method sets the number of outputs to the number of inputs and creates missing outputs objects.

Warning
any additional outputs that exist before the method is called are deleted

Definition at line 158 of file mitkToFImageRecorderFilter.cpp.

void mitk::ToFImageRecorderFilter::GenerateData ( )
overrideprotectedvirtual

method generating the output of this filter. Called in the updated process of the pipeline. This method generates the output of the ToFSurfaceSource: The generated surface of the 3d points

Reimplemented from mitk::ImageSource.

Definition at line 69 of file mitkToFImageRecorderFilter.cpp.

References mitk::ImageAccessorBase::GetData().

mitk::Image * mitk::ToFImageRecorderFilter::GetInput ( void  )

returns the input of this filter

Definition at line 146 of file mitkToFImageRecorderFilter.cpp.

mitk::Image * mitk::ToFImageRecorderFilter::GetInput ( unsigned int  idx)

returns the input with id idx of this filter

Definition at line 151 of file mitkToFImageRecorderFilter.cpp.

mitk::ToFImageWriter::Pointer mitk::ToFImageRecorderFilter::GetToFImageWriter ( )

Returns a pointer to the ToFImageWriter internally used.

Returns
ToFImageWriter

Definition at line 113 of file mitkToFImageRecorderFilter.cpp.

mitk::ToFImageRecorderFilter::mitkClassMacro ( ToFImageRecorderFilter  ,
ImageToImageFilter   
)
static Pointer mitk::ToFImageRecorderFilter::New ( )
static
void mitk::ToFImageRecorderFilter::SetFileName ( std::string  fileName)

Set file name for writing image files This filename will be appended by "_DistanceImage", "_AmplitudeImage", or "_IntensityImage" for the single images.

Parameters
fileNamebase file name to save image filtes

Definition at line 37 of file mitkToFImageRecorderFilter.cpp.

References mitk::ToFNrrdImageWriter::New(), and mitk::ToFImageCsvWriter::New().

void mitk::ToFImageRecorderFilter::SetImageType ( ToFImageWriter::ToFImageType  tofImageType)

Set image type for recording.

Parameters
tofImageTypeeither 3D Volume (ToFImageType3D) or temporal image stack (ToFImageType2DPlusT)

Definition at line 64 of file mitkToFImageRecorderFilter.cpp.

void mitk::ToFImageRecorderFilter::SetInput ( mitk::Image input)
virtual

sets the input of this filter

Parameters
inputis the distance image of e.g. a ToF camera

Definition at line 123 of file mitkToFImageRecorderFilter.cpp.

void mitk::ToFImageRecorderFilter::SetInput ( unsigned int  idx,
mitk::Image input 
)
virtual

sets the input of this filter at idx

Parameters
idxnumber of the current input
inputis the distance image of e.g. a ToF camera

Definition at line 128 of file mitkToFImageRecorderFilter.cpp.

References mitk::Image::GetDimension().

void mitk::ToFImageRecorderFilter::SetToFImageWriter ( ToFImageWriter::Pointer  tofImageWriter)

Sets a pointer to the ToFImageWriter internally used.

Parameters
tofImageWriterToFImageWriter

Definition at line 118 of file mitkToFImageRecorderFilter.cpp.

void mitk::ToFImageRecorderFilter::StartRecording ( )

start recording of data

Definition at line 96 of file mitkToFImageRecorderFilter.cpp.

void mitk::ToFImageRecorderFilter::StopRecording ( )

stop recording of data

Definition at line 107 of file mitkToFImageRecorderFilter.cpp.

Member Data Documentation

std::string mitk::ToFImageRecorderFilter::m_FileExtension
protected

Definition at line 115 of file mitkToFImageRecorderFilter.h.

Referenced by ToFImageRecorderFilter().

bool mitk::ToFImageRecorderFilter::m_RecordingStarted
protected

flag indicating if filter is currently recording

Definition at line 114 of file mitkToFImageRecorderFilter.h.

ToFImageWriter::Pointer mitk::ToFImageRecorderFilter::m_ToFImageWriter
protected

image writer used for streaming input data to file

Definition at line 113 of file mitkToFImageRecorderFilter.h.


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