00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKNODEPREDICATEBASE_H_HEADER_INCLUDED_ 00020 #define MITKNODEPREDICATEBASE_H_HEADER_INCLUDED_ 00021 00022 #include "mitkCommon.h" 00023 #include "itkObject.h" 00024 00025 namespace mitk { 00026 class DataNode; 00027 //##Documentation 00028 //## @brief Interface for evaluation conditions used in the DataStorage class GetSubset() method 00029 //## 00030 //## Classes that inherit this interface can be used as predicates in the GetSubset() method 00031 //## of mitk::DataStorage. By combining different predicate objects, the user can form complex 00032 //## queries like "give me all nodes that either contain a surface object or a binary segmentation 00033 //## and that are tagged as Organtype == 'Liver'". 00034 //## @warning NodePredicates are now derived from itk::Object and make thus use of the smart pointer concept. 00035 //## As a result predicates should only store raw pointers because for one thing they are not owners 00036 //## of these objects and should not keep them alive. 00037 //## 00038 //## @ingroup DataStorage 00039 class MITK_CORE_EXPORT NodePredicateBase: public itk::Object 00040 { 00041 00042 public: 00043 00044 mitkClassMacro(NodePredicateBase,itk::Object); 00045 00046 //##Documentation 00047 //## @brief Standard Destructor 00048 virtual ~NodePredicateBase(); 00049 00050 //##Documentation 00051 //## @brief This method will be used to evaluate the node. Has to be overwritten in subclasses 00052 virtual bool CheckNode(const mitk::DataNode* node) const = 0; 00053 }; 00054 00055 00056 } // namespace mitk 00057 00058 #endif /* MITKNODEPREDICATEBASE_H_HEADER_INCLUDED_ */