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

Predicate that evaluates if the given DataNode's data object is of a specific data type. More...

#include <mitkNodePredicateDataType.h>

Inheritance diagram for mitk::NodePredicateDataType:
Collaboration diagram for mitk::NodePredicateDataType:

Public Member Functions

 mitkClassMacro (NodePredicateDataType, NodePredicateBase)
 
 mitkNewMacro1Param (NodePredicateDataType, const char *)
 
 ~NodePredicateDataType () override
 Standard Destructor. More...
 
bool CheckNode (const mitk::DataNode *node) const override
 Checks if the node's data object is of the specified data type. More...
 
- Public Member Functions inherited from mitk::NodePredicateBase
 mitkClassMacroItkParent (NodePredicateBase, itk::Object)
 
 ~NodePredicateBase () override
 Virtual destructor. More...
 

Protected Member Functions

 NodePredicateDataType (const char *datatype)
 Protected constructor, use static instantiation functions instead. More...
 

Protected Attributes

std::string m_ValidDataType
 

Detailed Description

Predicate that evaluates if the given DataNode's data object is of a specific data type.

The data type must be specified in the constructor as a string. The string must equal the result value of the requested data type's GetNameOfClass() method. This predicate performs exact type matching. For type-compatible matching (including derived types), use TNodePredicateDataType.

Definition at line 31 of file mitkNodePredicateDataType.h.

Constructor & Destructor Documentation

◆ ~NodePredicateDataType()

mitk::NodePredicateDataType::~NodePredicateDataType ( )
override

Standard Destructor.

◆ NodePredicateDataType()

mitk::NodePredicateDataType::NodePredicateDataType ( const char *  datatype)
protected

Protected constructor, use static instantiation functions instead.

Parameters
datatypeThe class name string to match (must not be nullptr).

Member Function Documentation

◆ CheckNode()

bool mitk::NodePredicateDataType::CheckNode ( const mitk::DataNode *  node) const
overridevirtual

Checks if the node's data object is of the specified data type.

Compares GetNameOfClass() of the data object against the stored type string. Returns false if the node has no data object.

Parameters
nodeThe DataNode to check.
Returns
True if the data object type matches the stored type string.

Implements mitk::NodePredicateBase.

◆ mitkClassMacro()

mitk::NodePredicateDataType::mitkClassMacro ( NodePredicateDataType  ,
NodePredicateBase   
)

◆ mitkNewMacro1Param()

mitk::NodePredicateDataType::mitkNewMacro1Param ( NodePredicateDataType  ,
const char *   
)

Member Data Documentation

◆ m_ValidDataType

std::string mitk::NodePredicateDataType::m_ValidDataType
protected

Definition at line 57 of file mitkNodePredicateDataType.h.


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