Tests the data entry of nodes for a specific type (given here as template parameter) AND having a TRUE BoolProperty. More...
#include <mitkDataTreeFilterFunctions.h>
Public Member Functions | |
IsBaseDataTypeWithBoolProperty (const char *propertyName) | |
virtual bool | NodeMatches (DataNode *node) const |
virtual DataTreeFilterFunction * | Clone () const |
virtual | ~IsBaseDataTypeWithBoolProperty () |
Tests the data entry of nodes for a specific type (given here as template parameter) AND having a TRUE BoolProperty.
To be used with mitk::DataTreeFilter, e.g.
treeFilter->SetFilter( mitk::IsBaseDataTypeWithBoolProperty<mitk::Image>("segmentation") );
Definition at line 116 of file mitkDataTreeFilterFunctions.h.
mitk::IsBaseDataTypeWithBoolProperty< T >::IsBaseDataTypeWithBoolProperty | ( | const char * | propertyName ) | [inline] |
Definition at line 120 of file mitkDataTreeFilterFunctions.h.
:m_PropertyName(propertyName) { }
virtual mitk::IsBaseDataTypeWithBoolProperty< T >::~IsBaseDataTypeWithBoolProperty | ( | ) | [inline, virtual] |
Definition at line 140 of file mitkDataTreeFilterFunctions.h.
{}
virtual DataTreeFilterFunction* mitk::IsBaseDataTypeWithBoolProperty< T >::Clone | ( | ) | const [inline, virtual] |
Implements mitk::DataTreeFilterFunction.
Definition at line 135 of file mitkDataTreeFilterFunctions.h.
{ return new IsBaseDataTypeWithBoolProperty<T>(m_PropertyName.c_str()); }
virtual bool mitk::IsBaseDataTypeWithBoolProperty< T >::NodeMatches | ( | DataNode * | node ) | const [inline, virtual] |
Implements mitk::DataTreeFilterFunction.
Definition at line 125 of file mitkDataTreeFilterFunctions.h.
References mitk::DataNode::GetData(), and mitk::DataNode::GetPropertyValue().
{ bool propVal(false); return ( node != NULL && node->GetData() // node is not NULL, and node->GetData is also not NULL && dynamic_cast<T*>( node->GetData() ) // data is of a certain type && node->GetPropertyValue(m_PropertyName.c_str(), propVal) // there is a certain BoolProperty && propVal ); }