Medical Imaging Interaction Toolkit  2022.10.99-eeb2f471
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
14 #define mitkNodePredicateSource_h
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
mitkDataStorage.h
mitk::NodePredicateBase
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Definition: mitkNodePredicateBase.h:35
mitkNodePredicateBase.h
mitkNewMacro3Param
#define mitkNewMacro3Param(classname, typea, typeb, typec)
Definition: mitkCommon.h:94
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::NodePredicateSource::m_SearchAllSources
bool m_SearchAllSources
Definition: mitkNodePredicateSource.h:50
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
mitkDataNode.h
mitkWeakPointer.h
mitk::NodePredicateSource::m_DataStorage
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
Definition: mitkNodePredicateSource.h:51
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::WeakPointer< mitk::DataNode >
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitk::NodePredicateSource::m_BaseNode
mitk::WeakPointer< mitk::DataNode > m_BaseNode
Definition: mitkNodePredicateSource.h:49
mitk::NodePredicateSource
Predicate that evaluates if the given node is a direct or indirect source node of a specific node.
Definition: mitkNodePredicateSource.h:30