Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkNodePredicateData.h"
14 
15 #include "mitkDataNode.h"
16 
18 {
19  m_DataObject = d;
20 }
21 
23 {
24 }
25 
27 {
28  if (node == nullptr)
29  throw std::invalid_argument("NodePredicateData: invalid node");
30 
31  return (node->GetData() == m_DataObject);
32 }
Base of all data objects.
Definition: mitkBaseData.h:37
~NodePredicateData() override
Standard Destructor.
bool CheckNode(const mitk::DataNode *node) const override
Checks, if the nodes data object is of a specific data type.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
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:57