Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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 () |
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 48 of file mitkPlaneProposer.h.
mitk::PlaneProposer::PlaneProposer | ( | ) |
Definition at line 34 of file mitkPlaneProposer.cpp.
mitk::PlaneProposer::~PlaneProposer | ( | ) |
Definition at line 38 of file mitkPlaneProposer.cpp.
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 77 of file mitkPlaneProposer.cpp.
References compare(), mitkThrow, mitk::PlaneFit::New(), mitk::PointSet::New(), mitk::PlaneProposer::PlaneInfo::normal, mitk::PlaneProposer::PlaneInfo::pointOnPlane, mitk::PlaneProposer::PlaneInfo::x, and mitk::PlaneProposer::PlaneInfo::y.
Referenced by QmitkSlicesInterpolator::OnAccept3DInterpolationClicked().
std::array< std::array< double, 3 >, 3 > mitk::PlaneProposer::GetCentroids | ( | ) |
Definition at line 67 of file mitkPlaneProposer.cpp.
mitk::PlaneProposer::PlaneInfo mitk::PlaneProposer::GetProposedPlaneInfo | ( | ) |
Definition at line 72 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 57 of file mitkPlaneProposer.cpp.
void mitk::PlaneProposer::SetSliceNavigationController | ( | itk::SmartPointer< mitk::SliceNavigationController > & | snc | ) |
Definition at line 62 of file mitkPlaneProposer.cpp.
Referenced by QmitkSlicesInterpolator::OnAccept3DInterpolationClicked().
void mitk::PlaneProposer::SetUnstructuredGrids | ( | std::vector< itk::SmartPointer< mitk::UnstructuredGrid >> & | grids | ) |
Definition at line 42 of file mitkPlaneProposer.cpp.
References MITK_WARN.
Referenced by QmitkSlicesInterpolator::OnAccept3DInterpolationClicked().
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 52 of file mitkPlaneProposer.cpp.
Referenced by QmitkSlicesInterpolator::OnAccept3DInterpolationClicked().
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