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

Converts a Time-of-Flight (ToF) distance image to a PointSet using the pinhole camera model for coordinate computation. The intrinsic parameters of the camera (FocalLength, PrincipalPoint, InterPixelDistance) are set via SetIntrinsicParameters(). The measured distance for each pixel corresponds to the distance between the object point and the corresponding image point on the image plane. If a subset of indizes of the image is defined via SetSubset(), the output PointSet will only contain the cartesian coordinates of the corresponding 3D points. More...

#include <mitkToFDistanceImageToPointSetFilter.h>

Inheritance diagram for mitk::ToFDistanceImageToPointSetFilter:
Collaboration diagram for mitk::ToFDistanceImageToPointSetFilter:

Public Member Functions

 mitkClassMacro (ToFDistanceImageToPointSetFilter, PointSetSource)
 
Pointer Clone () const
 
virtual void SetCameraIntrinsics (mitk::CameraIntrinsics::Pointer _arg)
 
virtual mitk::CameraIntrinsics::Pointer GetCameraIntrinsics ()
 
virtual void SetInterPixelDistance (mitk::ToFProcessingCommon::ToFPoint2D _arg)
 
virtual mitk::ToFProcessingCommon::ToFPoint2D GetInterPixelDistance ()
 
virtual void SetInput (const Image *distanceImage)
 Sets the input of this filter. More...
 
virtual void SetInput (unsigned int idx, const Image *distanceImage)
 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...
 
void SetSubset (std::vector< itk::Index< 3 > > subset)
 If this subset is defined, the cartesian coordinates are only computed for the contained indizes. Make sure the indizes are contained in the input image. More...
 
void SetSubset (mitk::PointSet::Pointer pointSet)
 Sets the subset of indizes used for caluclation of output PointSet as a PointSet. Warning: make sure the points in your PointSet are index coordinates. More...
 
void SetReconstructionMode (bool withoutInterpixdist=true)
 Sets the reconstruction mode, if using no interpixeldistances and focal lenghts in pixel units (=true) or interpixeldistances and focal length in mm (=false) More...
 
bool GetReconstructionMode ()
 Returns the reconstruction mode. More...
 
- Public Member Functions inherited from mitk::PointSetSource
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
- 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::PointSetSource
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 ToFDistanceImageToPointSetFilter ()
 Standard constructor. More...
 
 ~ToFDistanceImageToPointSetFilter ()
 Standard destructor. More...
 
virtual void GenerateOutputInformation () override
 
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::PointSetSource
 PointSetSource ()
 
virtual ~PointSetSource ()
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
virtual ~BaseDataSource ()
 

Protected Attributes

std::vector< itk::Index< 3 > > m_Subset
 If this subset is specified only the contained indizes are converted to cartesian coordinates. More...
 
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
 Member holding the intrinsic parameters needed for PointSet calculation. More...
 
ToFProcessingCommon::ToFPoint2D m_InterPixelDistance
 distance in mm between two adjacent pixels on the ToF camera chip More...
 
bool m_ReconstructionMode
 true = Reconstruction without interpixeldistance and with focal lengths in pixel units. false = Reconstruction with interpixeldistance and with focal length in mm. More...
 

Additional Inherited Members

- Public Types inherited from mitk::PointSetSource
typedef PointSetSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef PointSet OutputType
 
typedef OutputType::Pointer OutputTypePointer
 
- 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::BaseDataSource
static Pointer New ()
 

Detailed Description

Converts a Time-of-Flight (ToF) distance image to a PointSet using the pinhole camera model for coordinate computation. The intrinsic parameters of the camera (FocalLength, PrincipalPoint, InterPixelDistance) are set via SetIntrinsicParameters(). The measured distance for each pixel corresponds to the distance between the object point and the corresponding image point on the image plane. If a subset of indizes of the image is defined via SetSubset(), the output PointSet will only contain the cartesian coordinates of the corresponding 3D points.

The coordinate conversion follows the model of a common pinhole camera where the origin of the camera coordinate system (world coordinates) is at the pinhole

PinholeCameraModel.png

The definition of the image plane and its coordinate systems (pixel and mm) is depicted in the following image

ImagePlane.png

Definition at line 47 of file mitkToFDistanceImageToPointSetFilter.h.

Constructor & Destructor Documentation

mitk::ToFDistanceImageToPointSetFilter::ToFDistanceImageToPointSetFilter ( )
protected
mitk::ToFDistanceImageToPointSetFilter::~ToFDistanceImageToPointSetFilter ( )
protected

Standard destructor.

Definition at line 35 of file mitkToFDistanceImageToPointSetFilter.cpp.

Member Function Documentation

Pointer mitk::ToFDistanceImageToPointSetFilter::Clone ( ) const
void mitk::ToFDistanceImageToPointSetFilter::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 192 of file mitkToFDistanceImageToPointSetFilter.cpp.

void mitk::ToFDistanceImageToPointSetFilter::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.

Definition at line 117 of file mitkToFDistanceImageToPointSetFilter.cpp.

References mitk::eps, mitk::ToFProcessingCommon::IndexToCartesianCoordinates(), and mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist().

void mitk::ToFDistanceImageToPointSetFilter::GenerateOutputInformation ( void  )
overrideprotectedvirtual

Definition at line 204 of file mitkToFDistanceImageToPointSetFilter.cpp.

virtual mitk::CameraIntrinsics::Pointer mitk::ToFDistanceImageToPointSetFilter::GetCameraIntrinsics ( )
virtual
mitk::Image * mitk::ToFDistanceImageToPointSetFilter::GetInput ( void  )

Returns the input of this filter.

Definition at line 57 of file mitkToFDistanceImageToPointSetFilter.cpp.

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

Returns the input with id idx of this filter.

Definition at line 62 of file mitkToFDistanceImageToPointSetFilter.cpp.

virtual mitk::ToFProcessingCommon::ToFPoint2D mitk::ToFDistanceImageToPointSetFilter::GetInterPixelDistance ( )
virtual
bool mitk::ToFDistanceImageToPointSetFilter::GetReconstructionMode ( )

Returns the reconstruction mode.

Definition at line 215 of file mitkToFDistanceImageToPointSetFilter.cpp.

mitk::ToFDistanceImageToPointSetFilter::mitkClassMacro ( ToFDistanceImageToPointSetFilter  ,
PointSetSource   
)
static Pointer mitk::ToFDistanceImageToPointSetFilter::New ( )
static
virtual void mitk::ToFDistanceImageToPointSetFilter::SetCameraIntrinsics ( mitk::CameraIntrinsics::Pointer  _arg)
virtual
void mitk::ToFDistanceImageToPointSetFilter::SetInput ( const Image distanceImage)
virtual

Sets the input of this filter.

Parameters
distanceImageinput is the distance image of e.g. a ToF camera

Definition at line 39 of file mitkToFDistanceImageToPointSetFilter.cpp.

void mitk::ToFDistanceImageToPointSetFilter::SetInput ( unsigned int  idx,
const Image distanceImage 
)
virtual

Sets the input of this filter at idx.

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

Definition at line 44 of file mitkToFDistanceImageToPointSetFilter.cpp.

virtual void mitk::ToFDistanceImageToPointSetFilter::SetInterPixelDistance ( mitk::ToFProcessingCommon::ToFPoint2D  _arg)
virtual
void mitk::ToFDistanceImageToPointSetFilter::SetReconstructionMode ( bool  withoutInterpixdist = true)

Sets the reconstruction mode, if using no interpixeldistances and focal lenghts in pixel units (=true) or interpixeldistances and focal length in mm (=false)

Definition at line 210 of file mitkToFDistanceImageToPointSetFilter.cpp.

void mitk::ToFDistanceImageToPointSetFilter::SetSubset ( std::vector< itk::Index< 3 > >  subset)

If this subset is defined, the cartesian coordinates are only computed for the contained indizes. Make sure the indizes are contained in the input image.

Parameters
subsetindex subset specified in index coordinates.

Definition at line 70 of file mitkToFDistanceImageToPointSetFilter.cpp.

References MITK_ERROR.

void mitk::ToFDistanceImageToPointSetFilter::SetSubset ( mitk::PointSet::Pointer  pointSet)

Sets the subset of indizes used for caluclation of output PointSet as a PointSet. Warning: make sure the points in your PointSet are index coordinates.

Parameters
PointSetspecified in index coordinates.

Definition at line 102 of file mitkToFDistanceImageToPointSetFilter.cpp.

Member Data Documentation

mitk::CameraIntrinsics::Pointer mitk::ToFDistanceImageToPointSetFilter::m_CameraIntrinsics
protected

Member holding the intrinsic parameters needed for PointSet calculation.

Definition at line 134 of file mitkToFDistanceImageToPointSetFilter.h.

Referenced by ToFDistanceImageToPointSetFilter().

ToFProcessingCommon::ToFPoint2D mitk::ToFDistanceImageToPointSetFilter::m_InterPixelDistance
protected

distance in mm between two adjacent pixels on the ToF camera chip

Definition at line 135 of file mitkToFDistanceImageToPointSetFilter.h.

Referenced by ToFDistanceImageToPointSetFilter().

bool mitk::ToFDistanceImageToPointSetFilter::m_ReconstructionMode
protected

true = Reconstruction without interpixeldistance and with focal lengths in pixel units. false = Reconstruction with interpixeldistance and with focal length in mm.

Definition at line 136 of file mitkToFDistanceImageToPointSetFilter.h.

Referenced by ToFDistanceImageToPointSetFilter().

std::vector<itk::Index<3> > mitk::ToFDistanceImageToPointSetFilter::m_Subset
protected

If this subset is specified only the contained indizes are converted to cartesian coordinates.

Definition at line 133 of file mitkToFDistanceImageToPointSetFilter.h.


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