Medical Imaging Interaction Toolkit  2023.12.99-7a59bd54
Medical Imaging Interaction Toolkit
mitk::NodePredicateSubGeometry Class Reference

Predicate that evaluates if the given DataNode's data object has a geometry that is a sub geometry of the reference geometry. Sub geometry means that both geometries have the same voxel grid (same spacing, same axes, origin is on voxel grid), but the bounding box of the checked geometry is contained or equal to the bounding box of the reference geometry.
One can either check the whole time geometry of the data node by defining a reference time geometry or check against one given2 reference base geometry. If the predicate should check against a base geometry, you can specify the timepoint of the data's time geometry that should be checked. If no timepoint is defined the predicate will evaluate the data geometry in the first timestep. Evaluates to "false" for unsupported or undefined data objects/geometries. More...

#include <mitkNodePredicateSubGeometry.h>

Inheritance diagram for mitk::NodePredicateSubGeometry:
Collaboration diagram for mitk::NodePredicateSubGeometry:

Public Types

typedef NodePredicateSubGeometry Self
 
typedef NodePredicateBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::NodePredicateBase
typedef NodePredicateBase Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
void SetCheckPrecision (mitk::ScalarType precision)
 
virtual void SetCheckCoordinatePrecision (mitk::ScalarType _arg)
 
virtual mitk::ScalarType GetCheckCoordinatePrecision ()
 
virtual void SetCheckDirectionPrecision (mitk::ScalarType _arg)
 
virtual mitk::ScalarType GetCheckDirectionPrecision ()
 
 ~NodePredicateSubGeometry () override
 
bool CheckNode (const mitk::DataNode *node) const override
 This method will be used to evaluate the node. Has to be overwritten in subclasses. More...
 
- Public Member Functions inherited from mitk::NodePredicateBase
 ~NodePredicateBase () override
 Standard Destructor. More...
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New (const BaseGeometry *_arg)
 
static Pointer New (const BaseGeometry *_arga, TimePointType _argb)
 
- Static Public Member Functions inherited from mitk::NodePredicateBase
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 NodePredicateSubGeometry (const BaseGeometry *refGeometry)
 
 NodePredicateSubGeometry (const BaseGeometry *refGeometry, TimePointType relevantTimePoint)
 

Protected Attributes

BaseGeometry::ConstPointer m_RefGeometry
 
TimePointType m_TimePoint
 
bool m_UseTimePoint
 
mitk::ScalarType m_CheckCoordinatePrecision
 
mitk::ScalarType m_CheckDirectionPrecision
 

Detailed Description

Predicate that evaluates if the given DataNode's data object has a geometry that is a sub geometry of the reference geometry. Sub geometry means that both geometries have the same voxel grid (same spacing, same axes, origin is on voxel grid), but the bounding box of the checked geometry is contained or equal to the bounding box of the reference geometry.
One can either check the whole time geometry of the data node by defining a reference time geometry or check against one given2 reference base geometry. If the predicate should check against a base geometry, you can specify the timepoint of the data's time geometry that should be checked. If no timepoint is defined the predicate will evaluate the data geometry in the first timestep. Evaluates to "false" for unsupported or undefined data objects/geometries.

Documentation One can specify the tolerance/precision of the check via SetCheckPrecision(), SetCheckCoordinatePrecision() or SetCheckDirectionPrecision().

Remarks
The default tolerance for coordinate checks is defined by NODE_PREDICATE_GEOMETRY_DEFAULT_CHECK_COORDINATE_PRECISION. The default tolerance for direction checks is defined by NODE_PREDICATE_GEOMETRY_DEFAULT_CHECK_DIRECTION_PRECISION. Both are not as strict as mitk::eps. The reason is, that, for the typical use of the node predicate, mitk::eps would be to pedantic, as we encounter often rounding differences/errors in real world data sets. For more details, see the documentation of the aforementioned constants. We have introduced two different precision values because differences are less impactful for coordinates than for direction values. Therefore we can relax coordinate checks more then direction checks.

Definition at line 52 of file mitkNodePredicateSubGeometry.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Constructor & Destructor Documentation

◆ ~NodePredicateSubGeometry()

mitk::NodePredicateSubGeometry::~NodePredicateSubGeometry ( )
override

◆ NodePredicateSubGeometry() [1/2]

mitk::NodePredicateSubGeometry::NodePredicateSubGeometry ( const BaseGeometry refGeometry)
protected

Constructor that is used configures the predicate to check the reference geometry against the first data timepoint.

◆ NodePredicateSubGeometry() [2/2]

mitk::NodePredicateSubGeometry::NodePredicateSubGeometry ( const BaseGeometry refGeometry,
TimePointType  relevantTimePoint 
)
protected

Constructor allows to define the timepoint that should be evaluated against the reference.

Member Function Documentation

◆ CheckNode()

bool mitk::NodePredicateSubGeometry::CheckNode ( const mitk::DataNode node) const
overridevirtual

This method will be used to evaluate the node. Has to be overwritten in subclasses.

Implements mitk::NodePredicateBase.

◆ GetCheckCoordinatePrecision()

virtual mitk::ScalarType mitk::NodePredicateSubGeometry::GetCheckCoordinatePrecision ( )
virtual

◆ GetCheckDirectionPrecision()

virtual mitk::ScalarType mitk::NodePredicateSubGeometry::GetCheckDirectionPrecision ( )
virtual

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::NodePredicateSubGeometry::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::NodePredicateBase.

Definition at line 55 of file mitkNodePredicateSubGeometry.h.

◆ GetClassName()

virtual const char* mitk::NodePredicateSubGeometry::GetClassName ( ) const
virtual

Reimplemented from mitk::NodePredicateBase.

◆ GetStaticNameOfClass()

static const char* mitk::NodePredicateSubGeometry::GetStaticNameOfClass ( )
inlinestatic

Definition at line 55 of file mitkNodePredicateSubGeometry.h.

◆ New() [1/2]

static Pointer mitk::NodePredicateSubGeometry::New ( const BaseGeometry _arg)
inlinestatic

Definition at line 56 of file mitkNodePredicateSubGeometry.h.

◆ New() [2/2]

static Pointer mitk::NodePredicateSubGeometry::New ( const BaseGeometry _arga,
TimePointType  _argb 
)
inlinestatic

Definition at line 57 of file mitkNodePredicateSubGeometry.h.

◆ SetCheckCoordinatePrecision()

virtual void mitk::NodePredicateSubGeometry::SetCheckCoordinatePrecision ( mitk::ScalarType  _arg)
virtual

◆ SetCheckDirectionPrecision()

virtual void mitk::NodePredicateSubGeometry::SetCheckDirectionPrecision ( mitk::ScalarType  _arg)
virtual

◆ SetCheckPrecision()

void mitk::NodePredicateSubGeometry::SetCheckPrecision ( mitk::ScalarType  precision)

Sets CheckCoordinatePrecision and CheckDirectionPrecision to the passed value.

Member Data Documentation

◆ m_CheckCoordinatePrecision

mitk::ScalarType mitk::NodePredicateSubGeometry::m_CheckCoordinatePrecision
protected

Precision that should be used for the equal coordinate checks.

Definition at line 84 of file mitkNodePredicateSubGeometry.h.

◆ m_CheckDirectionPrecision

mitk::ScalarType mitk::NodePredicateSubGeometry::m_CheckDirectionPrecision
protected

Precision that should be used for the equal direction checks.

Definition at line 86 of file mitkNodePredicateSubGeometry.h.

◆ m_RefGeometry

BaseGeometry::ConstPointer mitk::NodePredicateSubGeometry::m_RefGeometry
protected

Definition at line 79 of file mitkNodePredicateSubGeometry.h.

◆ m_TimePoint

TimePointType mitk::NodePredicateSubGeometry::m_TimePoint
protected

Definition at line 80 of file mitkNodePredicateSubGeometry.h.

◆ m_UseTimePoint

bool mitk::NodePredicateSubGeometry::m_UseTimePoint
protected

Indicates if m_TimePoint should be regarded or always the first timestep should be used.

Definition at line 82 of file mitkNodePredicateSubGeometry.h.


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