MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::USNavigationTargetUpdateFilter Class Reference

Calculates a score for target placement for every vertex of a given surface. The scores are calculated for placing the targets equally on the surface. It is assumed that the surface approximates a sphere. For every vertex of the surface a score between 0 and 1 is calculated. The scores are stored in the vtkSurface as a vtkFloatArray. The name of this array can be set by calling SetScalarArrayIdentifier(). More...

#include <mitkUSNavigationTargetUpdateFilter.h>

Inheritance diagram for mitk::USNavigationTargetUpdateFilter:

Public Member Functions

 mitkClassMacroItkParent (USNavigationTargetUpdateFilter, itk::Object)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
void SetTargetStructure (itk::SmartPointer< DataNode > targetStructure)
 Set the target surface for which the scores should be calculated.
 
bool SetNumberOfTargets (unsigned int numberOfTargets)
 Setter for the number of targets to be placed on the target surface. The optimal angle for placing the targets is calculated based on this number.
 
void SetOptimalAngle (double optimalAngle)
 Setter for the optimal angle between to targets on the target surface. This value overwrites the value calculated by a previous call to SetNumberOfTargets() and will be overwritten when SetNumberOfTargets() is called afterwards.
 
double GetOptimalAngle ()
 
void SetScalarArrayIdentifier (std::string scalarArrayIdentifier)
 Sets the identifier for the vtkFloatArray of scores. This array is stored as scalars of the vtkPolyData of the target surface.
 
void SetUseMaximumScore (bool useMaximumScore)
 Set whether the maximum score or the minimum score between the targets should be used. Whenever more then one target position is already set, the scores to every target position are calculated. The resulting score is the the minimum of this scores (default) or the maximum.
 
void SetControlNode (unsigned int id, itk::SmartPointer< DataNode > controlNode)
 Sets the origin of the given node for the filter. This origin is the position of an already placed target and is used to calculate the scores for the surface vertices.
 
void RemovePositionOfTarget (unsigned int id)
 Removes the position of the target with the current id from the filter.
 
void Reset ()
 Removes all target positions from the filter and resets the scores.
 

Protected Member Functions

 USNavigationTargetUpdateFilter ()
 
 ~USNavigationTargetUpdateFilter () override
 
void UpdateTargetScores ()
 
vtkSmartPointer< vtkPolyData > GetVtkPolyDataOfTarget ()
 
itk::SmartPointer< mitk::BaseGeometry > GetGeometryOfTarget ()
 

Protected Attributes

itk::SmartPointer< DataNode > m_TargetStructure
 
unsigned int m_NumberOfTargets
 
double m_OptimalAngle
 
std::string m_ScalarArrayIdentifier
 
bool m_UseMaximumScore
 
std::vector< itk::SmartPointer< DataNode > > m_ControlNodesVector
 

Detailed Description

Calculates a score for target placement for every vertex of a given surface. The scores are calculated for placing the targets equally on the surface. It is assumed that the surface approximates a sphere. For every vertex of the surface a score between 0 and 1 is calculated. The scores are stored in the vtkSurface as a vtkFloatArray. The name of this array can be set by calling SetScalarArrayIdentifier().

The target surface and the number of targets (between zero and four) or an optimal angle between the targets must be set first. The scores are then updated every time a target node is added by SetControlNode() or removed by RemovePositionOfTarget().

Definition at line 47 of file mitkUSNavigationTargetUpdateFilter.h.

Constructor & Destructor Documentation

◆ USNavigationTargetUpdateFilter()

mitk::USNavigationTargetUpdateFilter::USNavigationTargetUpdateFilter ( )
protected

Definition at line 30 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ ~USNavigationTargetUpdateFilter()

mitk::USNavigationTargetUpdateFilter::~USNavigationTargetUpdateFilter ( )
overrideprotected

Definition at line 37 of file mitkUSNavigationTargetUpdateFilter.cpp.

Member Function Documentation

◆ GetGeometryOfTarget()

mitk::BaseGeometry::Pointer mitk::USNavigationTargetUpdateFilter::GetGeometryOfTarget ( )
protected

Definition at line 246 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ GetOptimalAngle()

double mitk::USNavigationTargetUpdateFilter::GetOptimalAngle ( )
Returns
Angle calculated by SetNumberOfTargets() or explicitly set by SetOptimalAngle()

Definition at line 97 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ GetVtkPolyDataOfTarget()

vtkSmartPointer< vtkPolyData > mitk::USNavigationTargetUpdateFilter::GetVtkPolyDataOfTarget ( )
protected

Definition at line 224 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ itkCloneMacro()

mitk::USNavigationTargetUpdateFilter::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::USNavigationTargetUpdateFilter::itkFactorylessNewMacro ( Self )

◆ mitkClassMacroItkParent()

mitk::USNavigationTargetUpdateFilter::mitkClassMacroItkParent ( USNavigationTargetUpdateFilter ,
itk::Object  )

◆ RemovePositionOfTarget()

void mitk::USNavigationTargetUpdateFilter::RemovePositionOfTarget ( unsigned int id)

Removes the position of the target with the current id from the filter.

Definition at line 121 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ Reset()

void mitk::USNavigationTargetUpdateFilter::Reset ( )

Removes all target positions from the filter and resets the scores.

Definition at line 133 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetControlNode()

void mitk::USNavigationTargetUpdateFilter::SetControlNode ( unsigned int id,
itk::SmartPointer< DataNode > controlNode )

Sets the origin of the given node for the filter. This origin is the position of an already placed target and is used to calculate the scores for the surface vertices.

Parameters
idnumber of the node which position should be set or updated
controlNodeDataNode which origin should be set into the filter

Definition at line 112 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetNumberOfTargets()

bool mitk::USNavigationTargetUpdateFilter::SetNumberOfTargets ( unsigned int numberOfTargets)

Setter for the number of targets to be placed on the target surface. The optimal angle for placing the targets is calculated based on this number.

Returns
false if the number of targets is smaller than one or larger than four

Definition at line 69 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetOptimalAngle()

void mitk::USNavigationTargetUpdateFilter::SetOptimalAngle ( double optimalAngle)

Setter for the optimal angle between to targets on the target surface. This value overwrites the value calculated by a previous call to SetNumberOfTargets() and will be overwritten when SetNumberOfTargets() is called afterwards.

Definition at line 92 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetScalarArrayIdentifier()

void mitk::USNavigationTargetUpdateFilter::SetScalarArrayIdentifier ( std::string scalarArrayIdentifier)

Sets the identifier for the vtkFloatArray of scores. This array is stored as scalars of the vtkPolyData of the target surface.

Definition at line 102 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetTargetStructure()

void mitk::USNavigationTargetUpdateFilter::SetTargetStructure ( itk::SmartPointer< DataNode > targetStructure)

Set the target surface for which the scores should be calculated.

Parameters
targetStructureDataNode containing a mitk::Surface for the target structure

Definition at line 41 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ SetUseMaximumScore()

void mitk::USNavigationTargetUpdateFilter::SetUseMaximumScore ( bool useMaximumScore)

Set whether the maximum score or the minimum score between the targets should be used. Whenever more then one target position is already set, the scores to every target position are calculated. The resulting score is the the minimum of this scores (default) or the maximum.

Definition at line 107 of file mitkUSNavigationTargetUpdateFilter.cpp.

◆ UpdateTargetScores()

void mitk::USNavigationTargetUpdateFilter::UpdateTargetScores ( )
protected

Definition at line 140 of file mitkUSNavigationTargetUpdateFilter.cpp.

Member Data Documentation

◆ m_ControlNodesVector

std::vector<itk::SmartPointer<DataNode> > mitk::USNavigationTargetUpdateFilter::m_ControlNodesVector
protected

Definition at line 132 of file mitkUSNavigationTargetUpdateFilter.h.

◆ m_NumberOfTargets

unsigned int mitk::USNavigationTargetUpdateFilter::m_NumberOfTargets
protected

Definition at line 127 of file mitkUSNavigationTargetUpdateFilter.h.

◆ m_OptimalAngle

double mitk::USNavigationTargetUpdateFilter::m_OptimalAngle
protected

Definition at line 128 of file mitkUSNavigationTargetUpdateFilter.h.

◆ m_ScalarArrayIdentifier

std::string mitk::USNavigationTargetUpdateFilter::m_ScalarArrayIdentifier
protected

Definition at line 129 of file mitkUSNavigationTargetUpdateFilter.h.

◆ m_TargetStructure

itk::SmartPointer<DataNode> mitk::USNavigationTargetUpdateFilter::m_TargetStructure
protected

Definition at line 125 of file mitkUSNavigationTargetUpdateFilter.h.

◆ m_UseMaximumScore

bool mitk::USNavigationTargetUpdateFilter::m_UseMaximumScore
protected

Definition at line 130 of file mitkUSNavigationTargetUpdateFilter.h.


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