Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PlaneFit Class Reference

Fits a plane to a point set using least-squares orthogonal distance regression. More...

#include <mitkPlaneFit.h>

Inheritance diagram for mitk::PlaneFit:
Collaboration diagram for mitk::PlaneFit:

Public Types

typedef mitk::PointSet::PointDataType PointDataType
 
typedef mitk::PointSet::PointDataIterator PointDataIterator
 
- Public Types inherited from mitk::GeometryDataSource
typedef mitk::GeometryData OutputType
 The output type of this source. More...
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseData OutputType
 Output data type. More...
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 Identifier type for named data objects. More...
 

Public Member Functions

 mitkClassMacro (PlaneFit, GeometryDataSource)
 
void GenerateOutputInformation () override
 Initialize the output information (time geometry, plane geometries). More...
 
void GenerateData () override
 Compute the best-fit plane for each time step. More...
 
const mitk::PointSet * GetInput ()
 Get the input point set. More...
 
virtual void SetInput (const mitk::PointSet *ps)
 
virtual const mitk::Point3D & GetCentroid (int t=0) const
 Get the centroid (center of gravity) of the point set. More...
 
virtual mitk::PlaneGeometry::Pointer GetPlaneGeometry (int t=0)
 Get the PlaneGeometry representing the best-fit plane. More...
 
virtual const mitk::Vector3D & GetPlaneNormal (int t=0) const
 Get the normal vector of the best-fit plane. More...
 
- Public Member Functions inherited from mitk::GeometryDataSource
 mitkClassMacro (GeometryDataSource, BaseDataSource)
 
mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Allocates a new output object and returns it. More...
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 Allocates a new output object by name. More...
 
- Public Member Functions inherited from mitk::BaseDataSource
 mitkClassMacroItkParent (BaseDataSource, itk::ProcessObject)
 
OutputType * GetOutput ()
 
const OutputType * GetOutput () const
 
OutputType * GetOutput (DataObjectPointerArraySizeType idx)
 
const OutputType * GetOutput (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)
 Graft the specified base data object onto a named output. More...
 
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
 Check whether the pipeline is currently executing. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::GeometryDataSource
static Pointer New ()
 

Protected Member Functions

 PlaneFit ()
 
 ~PlaneFit () override
 
void CalculateCentroid (int t=0)
 
void ProcessPointSet (int t=0)
 
void InitializePlane (int t=0)
 
- Protected Member Functions inherited from mitk::GeometryDataSource
 GeometryDataSource ()
 
 ~GeometryDataSource () override
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 Constructor. More...
 
 ~BaseDataSource () override
 Destructor. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Fits a plane to a point set using least-squares orthogonal distance regression.

This filter computes the best-fit plane for a given mitk::PointSet using Singular Value Decomposition (SVD). For each time step the centroid of the points and the normal of the least-squares plane are computed. The output is a GeometryData containing PlaneGeometry instances.

The algorithm requires at least 3 points per time step. Based on the LSPLANE method by I. M. Smith (2002).

See also
GeometryDataSource
PlaneGeometry
PointSet

Definition at line 40 of file mitkPlaneFit.h.

Member Typedef Documentation

◆ PointDataIterator

◆ PointDataType

Constructor & Destructor Documentation

◆ PlaneFit()

mitk::PlaneFit::PlaneFit ( )
protected

◆ ~PlaneFit()

mitk::PlaneFit::~PlaneFit ( )
overrideprotected

Member Function Documentation

◆ CalculateCentroid()

void mitk::PlaneFit::CalculateCentroid ( int  t = 0)
protected

Calculates the centroid of the point set. the center of gravity is calculated through the mean value of the whole point set

◆ GenerateData()

void mitk::PlaneFit::GenerateData ( )
override

Compute the best-fit plane for each time step.

◆ GenerateOutputInformation()

void mitk::PlaneFit::GenerateOutputInformation ( )
override

Initialize the output information (time geometry, plane geometries).

◆ GetCentroid()

virtual const mitk::Point3D& mitk::PlaneFit::GetCentroid ( int  t = 0) const
virtual

Get the centroid (center of gravity) of the point set.

Parameters
[in]tThe time step (default: 0).
Returns
Const reference to the centroid point.

◆ GetInput()

const mitk::PointSet* mitk::PlaneFit::GetInput ( )

Get the input point set.

Returns
Const pointer to the input PointSet, or nullptr if not set.

◆ GetPlaneGeometry()

virtual mitk::PlaneGeometry::Pointer mitk::PlaneFit::GetPlaneGeometry ( int  t = 0)
virtual

Get the PlaneGeometry representing the best-fit plane.

Parameters
[in]tThe time step (default: 0).
Returns
Smart pointer to the PlaneGeometry.

◆ GetPlaneNormal()

virtual const mitk::Vector3D& mitk::PlaneFit::GetPlaneNormal ( int  t = 0) const
virtual

Get the normal vector of the best-fit plane.

Parameters
[in]tThe time step (default: 0).
Returns
Const reference to the normal vector.

◆ InitializePlane()

void mitk::PlaneFit::InitializePlane ( int  t = 0)
protected

Initialize Plane and configuration.

◆ mitkClassMacro()

mitk::PlaneFit::mitkClassMacro ( PlaneFit  ,
GeometryDataSource   
)

◆ New()

static Pointer mitk::PlaneFit::New ( )
static

◆ ProcessPointSet()

void mitk::PlaneFit::ProcessPointSet ( int  t = 0)
protected

working with an SVD algorithm form matrix dataM. ITK supplies the vnl_svd to solve an plan fit eigentvector problem points are processed in the SVD matrix. The normal vector is the singular vector of dataM corresponding to its smalest singular value. The method uses VNL library from ITK and at least the method nullvector() to extract the normalvector.

◆ SetInput()

virtual void mitk::PlaneFit::SetInput ( const mitk::PointSet *  ps)
virtual

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