Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkNodePredicateData.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkNodePredicateData.h"
18 
19 #include "mitkDataNode.h"
20 
22 {
23  m_DataObject = d;
24 }
25 
27 {
28 }
29 
31 {
32  if (node == nullptr)
33  throw std::invalid_argument("NodePredicateData: invalid node");
34 
35  return (node->GetData() == m_DataObject);
36 }
Base of all data objects.
Definition: mitkBaseData.h:39
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
virtual bool CheckNode(const mitk::DataNode *node) const override
Checks, if the nodes data object is of a specific data type.
NodePredicateData(mitk::BaseData *d)
Protected constructor, use static instantiation functions instead.
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
virtual ~NodePredicateData()
Standard Destructor.