Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkNodePredicateSource.h
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 #ifndef MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_
14 #define MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_
15 
16 #include "mitkDataNode.h"
17 #include "mitkDataStorage.h"
18 #include "mitkNodePredicateBase.h"
19 #include "mitkWeakPointer.h"
20 
21 namespace mitk
22 {
23  //##Documentation
24  //## @brief Predicate that evaluates if the given node is a direct or indirect source node of a specific node
25  //##
26  //## @warning Calling CheckNode() can be computationally quite expensive for a large DataStorage.
27  //## Alternatively mitk::StandaloneDataStorage::GetSources() can be used
28  //##
29  //## @ingroup DataStorage
31  {
32  public:
35 
36  //##Documentation
37  //## @brief Standard Destructor
38  ~NodePredicateSource() override;
39 
40  //##Documentation
41  //## @brief Checks, if m_BaseNode is a source node of childNode (e.g. if childNode "was created from" m_BaseNode)
42  bool CheckNode(const mitk::DataNode *childNode) const override;
43 
44  protected:
45  //##Documentation
46  //## @brief Constructor - This class can either search only for direct source objects or for all source objects
47  NodePredicateSource(mitk::DataNode *n, bool allsources, mitk::DataStorage *ds);
48 
52  };
53 
54 } // namespace mitk
55 
56 #endif /* MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_ */
Data management class that handles 'was created by' relations.
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
mitk::WeakPointer< mitk::DataNode > m_BaseNode
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Predicate that evaluates if the given node is a direct or indirect source node of a specific node...
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
#define mitkNewMacro3Param(classname, typea, typeb, typec)
Definition: mitkCommon.h:98
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57