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

The PlaneProposer creates a new plane based on an input point cloud. More...

#include <mitkPlaneProposer.h>

Classes

struct  PlaneInfo
 Encapsulates the geometrical information needed to descripe a PlaneInfo. More...
 

Public Member Functions

 PlaneProposer ()
 
 ~PlaneProposer ()
 
void SetUnstructuredGrids (std::vector< itk::SmartPointer< mitk::UnstructuredGrid >> &grids)
 
void SetUseDistances (bool)
 If true, the three clusters with the biggest mean distances are used for plane proposal Required the distance for each point to be set in PointData scalars. More...
 
void SetUseLeastSquares (bool)
 Tells the proposer to use least squares method for plane creating. More...
 
void SetNumberOfClustersToUse (unsigned int)
 Sets the number of the clusters to be used for plane creation (default=3) More...
 
void SetSliceNavigationController (itk::SmartPointer< mitk::SliceNavigationController > &snc)
 
void CreatePlaneInfo ()
 Creates the actual plane proposal. More...
 
PlaneInfo GetProposedPlaneInfo ()
 
std::array< std::array< double, 3 >, 3 > GetCentroids ()
 

Detailed Description

The PlaneProposer creates a new plane based on an input point cloud.

The proposal is either created by using the lease squares in order to fit a plane to the provided point cloud or by using the centroid of three clusters

If less than three clusters are provided, least squares is chosen automatically. If the centroid method is chosed either the three biggest clusters are chosen by default. If the users sets PlaneProposer::SetUseDistances(true) the three clusters with the biggerst mean distance of all points are chosen. The latter requires the distances to be set as PointData scalar to the underlying VTK object.

The user can either take the plane information or he can set a mitk::SliceNavigationController which will be used to automatically rotate to the suggested position.

Definition at line 52 of file mitkPlaneProposer.h.

Constructor & Destructor Documentation

mitk::PlaneProposer::PlaneProposer ( )

Definition at line 38 of file mitkPlaneProposer.cpp.

mitk::PlaneProposer::~PlaneProposer ( )

Definition at line 42 of file mitkPlaneProposer.cpp.

Member Function Documentation

void mitk::PlaneProposer::CreatePlaneInfo ( )

Creates the actual plane proposal.

Is less than three clusters are provide the least squares method will be chosen automatically The result will either be executed on a mitk::SliceNavigationController if provided or can be retrieved by calling mitk::PlaneProposer::GetProposedPlaneInfo()

Definition at line 81 of file mitkPlaneProposer.cpp.

References compare().

std::array< std::array< double, 3 >, 3 > mitk::PlaneProposer::GetCentroids ( )

Definition at line 71 of file mitkPlaneProposer.cpp.

mitk::PlaneProposer::PlaneInfo mitk::PlaneProposer::GetProposedPlaneInfo ( )

Definition at line 76 of file mitkPlaneProposer.cpp.

void mitk::PlaneProposer::SetNumberOfClustersToUse ( unsigned int  num)

Sets the number of the clusters to be used for plane creation (default=3)

Definition at line 61 of file mitkPlaneProposer.cpp.

void mitk::PlaneProposer::SetSliceNavigationController ( itk::SmartPointer< mitk::SliceNavigationController > &  snc)

Definition at line 66 of file mitkPlaneProposer.cpp.

void mitk::PlaneProposer::SetUnstructuredGrids ( std::vector< itk::SmartPointer< mitk::UnstructuredGrid >> &  grids)

Definition at line 46 of file mitkPlaneProposer.cpp.

References MITK_WARN.

void mitk::PlaneProposer::SetUseDistances ( bool  status)

If true, the three clusters with the biggest mean distances are used for plane proposal Required the distance for each point to be set in PointData scalars.

Definition at line 56 of file mitkPlaneProposer.cpp.

void mitk::PlaneProposer::SetUseLeastSquares ( bool  )

Tells the proposer to use least squares method for plane creating.

This will eb chosen automatically if less than three point clusters are provided


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