Predicate that evaluates if the given DataNode has a specific property. If the second parameter is NULL, it will only be checked whether there is a property with the specified name. More...
#include <mitkNodePredicateProperty.h>
Public Types | |
typedef NodePredicateProperty | Self |
typedef NodePredicateBase | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual | ~NodePredicateProperty () |
Standard Destructor. | |
virtual bool | CheckNode (const mitk::DataNode *node) const |
Checks, if the nodes contains a property that is equal to m_ValidProperty. | |
Static Public Member Functions | |
static Pointer | New (const char *_arg) |
static Pointer | New (const char *_arga, mitk::BaseProperty *_argb) |
Protected Member Functions | |
NodePredicateProperty (const char *propertyName, mitk::BaseProperty *p) | |
Constructor to check for a named property. | |
NodePredicateProperty (const char *propertyName) | |
Constructor to check for the existence of a property with a given name. | |
Protected Attributes | |
mitk::BaseProperty::Pointer | m_ValidProperty |
std::string | m_ValidPropertyName |
Predicate that evaluates if the given DataNode has a specific property. If the second parameter is NULL, it will only be checked whether there is a property with the specified name.
Definition at line 35 of file mitkNodePredicateProperty.h.
typedef itk::SmartPointer<const Self> mitk::NodePredicateProperty::ConstPointer |
Reimplemented from mitk::NodePredicateBase.
Definition at line 38 of file mitkNodePredicateProperty.h.
typedef itk::SmartPointer<Self> mitk::NodePredicateProperty::Pointer |
Reimplemented from mitk::NodePredicateBase.
Definition at line 38 of file mitkNodePredicateProperty.h.
Reimplemented from mitk::NodePredicateBase.
Definition at line 38 of file mitkNodePredicateProperty.h.
Reimplemented from mitk::NodePredicateBase.
Definition at line 38 of file mitkNodePredicateProperty.h.
mitk::NodePredicateProperty::~NodePredicateProperty | ( | ) | [virtual] |
mitk::NodePredicateProperty::NodePredicateProperty | ( | const char * | propertyName, |
mitk::BaseProperty * | p | ||
) | [protected] |
Constructor to check for a named property.
Definition at line 23 of file mitkNodePredicateProperty.cpp.
: NodePredicateBase(), m_ValidProperty(p), m_ValidPropertyName(propertyName) { }
mitk::NodePredicateProperty::NodePredicateProperty | ( | const char * | propertyName ) | [protected] |
Constructor to check for the existence of a property with a given name.
Definition at line 28 of file mitkNodePredicateProperty.cpp.
: NodePredicateBase(), m_ValidProperty(NULL), m_ValidPropertyName(propertyName) { }
bool mitk::NodePredicateProperty::CheckNode | ( | const mitk::DataNode * | node ) | const [virtual] |
Checks, if the nodes contains a property that is equal to m_ValidProperty.
Implements mitk::NodePredicateBase.
Definition at line 38 of file mitkNodePredicateProperty.cpp.
References mitk::PropertyList::GetProperty(), and mitk::DataNode::GetPropertyList().
{ if (node == NULL) throw std::invalid_argument("NodePredicateProperty: invalid node"); if (m_ValidPropertyName.empty()) throw std::invalid_argument("NodePredicateProperty: invalid property name"); // check, if any of the properties of node are equal to m_ValidProperty. if (m_ValidProperty.IsNull()) //if (m_ValidProperty==NULL) { return (node->GetPropertyList()->GetProperty(m_ValidPropertyName.c_str()) != NULL); // search only for name } else { mitk::BaseProperty::Pointer p = node->GetPropertyList()->GetProperty(m_ValidPropertyName.c_str()); if (p.IsNull()) return false; return (*p == *m_ValidProperty); // search for name and property } }
virtual const char* mitk::NodePredicateProperty::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::NodePredicateBase.
static Pointer mitk::NodePredicateProperty::New | ( | const char * | _arga, |
mitk::BaseProperty * | _argb | ||
) | [inline, static] |
Definition at line 40 of file mitkNodePredicateProperty.h.
static Pointer mitk::NodePredicateProperty::New | ( | const char * | _arg ) | [inline, static] |
Definition at line 39 of file mitkNodePredicateProperty.h.
Referenced by QmitkIGTRecorderView::CreateQtPartControl(), mitk::LevelWindowManager::DataStorageRemovedNode(), mitk::PositionTracker::ExecuteAction(), QmitkBoundingObjectWidget::GetAllBoundingObjects(), mitk::DataStorage::GetNamedDerivedNode(), mitk::DataStorage::GetNamedNode(), mitk::LevelWindowManager::GetRelevantNodes(), QmitkDataManagerView::GlobalReinit(), QmitkNodeDescriptorManager::Initialize(), QmitkSimpleExampleView::initNavigators(), QmitkSegmentationView::OnSelectionChanged(), QmitkDataStorageTreeModel::QmitkDataStorageTreeModel(), QmitkToolPairNavigationView::RemoveVisualizationObjects(), QmitkFileOpenAction::Run(), QmitkExtFileSaveProjectAction::Run(), QmitkExtFileOpenAction::Run(), QmitkCloseProjectAction::Run(), mitk::LevelWindowManager::SetLevelWindowProperty(), mitk::PlanarFigureActivator::Start(), TestDataStorage(), and QmitkToolRoiDataSelectionBox::UpdateComboBoxData().
Definition at line 60 of file mitkNodePredicateProperty.h.
std::string mitk::NodePredicateProperty::m_ValidPropertyName [protected] |
Definition at line 62 of file mitkNodePredicateProperty.h.