Tests the data entry of nodes for a specific type (given here as template parameter) AND having a given property. More...
#include <mitkDataTreeFilterFunctions.h>


Public Member Functions | |
| IsBaseDataTypeWithProperty (const char *propertyName) | |
| virtual bool | NodeMatches (DataNode *node) const |
| virtual DataTreeFilterFunction * | Clone () const |
| virtual | ~IsBaseDataTypeWithProperty () |
Tests the data entry of nodes for a specific type (given here as template parameter) AND having a given property.
To be used with mitk::DataTreeFilter, e.g.
treeFilter->SetFilter( mitk::IsBaseDataTypeWithProperty<mitk::Surface>("volume") );
Definition at line 78 of file mitkDataTreeFilterFunctions.h.
| mitk::IsBaseDataTypeWithProperty< T >::IsBaseDataTypeWithProperty | ( | const char * | propertyName ) | [inline] |
Definition at line 82 of file mitkDataTreeFilterFunctions.h.
:m_PropertyName(propertyName)
{
}
| virtual mitk::IsBaseDataTypeWithProperty< T >::~IsBaseDataTypeWithProperty | ( | ) | [inline, virtual] |
Definition at line 101 of file mitkDataTreeFilterFunctions.h.
{}
| virtual DataTreeFilterFunction* mitk::IsBaseDataTypeWithProperty< T >::Clone | ( | ) | const [inline, virtual] |
Implements mitk::DataTreeFilterFunction.
Definition at line 96 of file mitkDataTreeFilterFunctions.h.
{
return new IsBaseDataTypeWithProperty<T>(m_PropertyName.c_str());
}
| virtual bool mitk::IsBaseDataTypeWithProperty< T >::NodeMatches | ( | DataNode * | node ) | const [inline, virtual] |
Implements mitk::DataTreeFilterFunction.
Definition at line 87 of file mitkDataTreeFilterFunctions.h.
References mitk::DataNode::GetData(), and mitk::DataNode::GetProperty().
{
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->GetProperty(m_PropertyName.c_str())!= NULL // there is a certain property
)
);
}
1.7.2