Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkNodePredicateData.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,
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 #ifndef MITKNODEPREDICATEDATA_H_HEADER_INCLUDED_
18 #define MITKNODEPREDICATEDATA_H_HEADER_INCLUDED_
19 
20 #include "mitkNodePredicateBase.h"
21 
22 namespace mitk
23 {
24  class BaseData;
25 
26  //##Documentation
27  //## @brief Predicate that evaluates if the given DataNodes data object pointer equals a given pointer
28  //##
29  //## NodePredicateData(NULL) returns true if a DataNode does not have a data object (e.g. ->GetData() returns NULL).
30  //## This could return an unexpected number of nodes (e.g. the root node of the tree)
31  //## @warning NodePredicateData holds a weak pointer to a BaseData! NodePredicateData p(mitk::BaseData::New()); will
32  //not
33  // work.
34  //## Intended use is: NodePredicateData p(myDataObject); result = myDataStorage->GetSubset(p); Then work with
35  // result, do not reuse p later.
36  //##
37  //## @ingroup DataStorage
39  {
40  public:
43 
44  //##Documentation
45  //## @brief Standard Destructor
46  virtual ~NodePredicateData();
47 
48  //##Documentation
49  //## @brief Checks, if the nodes data object is of a specific data type
50  virtual bool CheckNode(const mitk::DataNode *node) const override;
51 
52  protected:
53  //##Documentation
54  //## @brief Protected constructor, use static instantiation functions instead
56 
58  };
59 } // namespace mitk
60 
61 #endif /* MITKNODEPREDICATEDATA_H_HEADER_INCLUDED_ */
#define MITKCORE_EXPORT
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
Base of all data objects.
Definition: mitkBaseData.h:39
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Predicate that evaluates if the given DataNodes data object pointer equals a given pointer...
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66