MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
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:

Public Member Functions

 mitkClassMacro (ToFDistanceImageToPointSetFilter, PointSetSource)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
 itkSetMacro (CameraIntrinsics, mitk::CameraIntrinsics::Pointer)
 
 itkGetMacro (CameraIntrinsics, mitk::CameraIntrinsics::Pointer)
 
 itkSetMacro (InterPixelDistance, mitk::ToFProcessingCommon::ToFPoint2D)
 
 itkGetMacro (InterPixelDistance, mitk::ToFProcessingCommon::ToFPoint2D)
 
virtual void SetInput (const Image *distanceImage)
 Sets the input of this filter.
 
virtual void SetInput (unsigned int idx, const Image *distanceImage)
 Sets the input of this filter at idx.
 
Image * GetInput ()
 Returns the input of this filter.
 
Image * GetInput (unsigned int idx)
 Returns the input with id idx of this filter.
 
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.
 
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.
 
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)
 
bool GetReconstructionMode ()
 Returns the reconstruction mode.
 

Protected Member Functions

 ToFDistanceImageToPointSetFilter ()
 Standard constructor.
 
 ~ToFDistanceImageToPointSetFilter () override
 Standard destructor.
 
void GenerateOutputInformation () override
 
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.
 
void CreateOutputsForAllInputs ()
 Create an output for each input.
 

Protected Attributes

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

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

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

Definition at line 43 of file mitkToFDistanceImageToPointSetFilter.h.

Constructor & Destructor Documentation

◆ ToFDistanceImageToPointSetFilter()

mitk::ToFDistanceImageToPointSetFilter::ToFDistanceImageToPointSetFilter ( )
protected

Standard constructor.

Definition at line 20 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ ~ToFDistanceImageToPointSetFilter()

mitk::ToFDistanceImageToPointSetFilter::~ToFDistanceImageToPointSetFilter ( )
overrideprotected

Standard destructor.

Definition at line 31 of file mitkToFDistanceImageToPointSetFilter.cpp.

Member Function Documentation

◆ CreateOutputsForAllInputs()

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 195 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ GenerateData()

void mitk::ToFDistanceImageToPointSetFilter::GenerateData ( )
overrideprotected

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 115 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ GenerateOutputInformation()

void mitk::ToFDistanceImageToPointSetFilter::GenerateOutputInformation ( )
overrideprotected

Definition at line 207 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ GetInput() [1/2]

mitk::Image * mitk::ToFDistanceImageToPointSetFilter::GetInput ( )

Returns the input of this filter.

Definition at line 53 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ GetInput() [2/2]

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

Returns the input with id idx of this filter.

Definition at line 58 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ GetReconstructionMode()

bool mitk::ToFDistanceImageToPointSetFilter::GetReconstructionMode ( )

Returns the reconstruction mode.

Definition at line 218 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ itkCloneMacro()

mitk::ToFDistanceImageToPointSetFilter::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::ToFDistanceImageToPointSetFilter::itkFactorylessNewMacro ( Self )

◆ itkGetMacro() [1/2]

mitk::ToFDistanceImageToPointSetFilter::itkGetMacro ( CameraIntrinsics ,
mitk::CameraIntrinsics::Pointer  )

◆ itkGetMacro() [2/2]

mitk::ToFDistanceImageToPointSetFilter::itkGetMacro ( InterPixelDistance ,
mitk::ToFProcessingCommon::ToFPoint2D  )

◆ itkSetMacro() [1/2]

mitk::ToFDistanceImageToPointSetFilter::itkSetMacro ( CameraIntrinsics ,
mitk::CameraIntrinsics::Pointer  )

◆ itkSetMacro() [2/2]

mitk::ToFDistanceImageToPointSetFilter::itkSetMacro ( InterPixelDistance ,
mitk::ToFProcessingCommon::ToFPoint2D  )

◆ mitkClassMacro()

mitk::ToFDistanceImageToPointSetFilter::mitkClassMacro ( ToFDistanceImageToPointSetFilter ,
PointSetSource  )

◆ SetInput() [1/2]

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 35 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ SetInput() [2/2]

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 40 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ SetReconstructionMode()

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 213 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ SetSubset() [1/2]

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 100 of file mitkToFDistanceImageToPointSetFilter.cpp.

◆ SetSubset() [2/2]

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 66 of file mitkToFDistanceImageToPointSetFilter.cpp.

Member Data Documentation

◆ m_CameraIntrinsics

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

Member holding the intrinsic parameters needed for PointSet calculation.

Definition at line 130 of file mitkToFDistanceImageToPointSetFilter.h.

◆ m_InterPixelDistance

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

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

Definition at line 131 of file mitkToFDistanceImageToPointSetFilter.h.

◆ m_ReconstructionMode

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 132 of file mitkToFDistanceImageToPointSetFilter.h.

◆ m_Subset

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 129 of file mitkToFDistanceImageToPointSetFilter.h.


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