Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkPropertyTransience.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 mitkPropertyTransience_h
14 #define mitkPropertyTransience_h
15 
17 
18 #include <utility>
19 #include <vector>
20 
21 namespace mitk
22 {
31  {
32  public:
34  ~PropertyTransience() override;
35 
38 
39  bool IsTransient(const BaseData *data, const std::string &propertyName) const override;
40 
41  protected:
42  void InternalAddTransient(const std::string &propertyName,
43  std::function<bool(const BaseData *)> dataTypeMatcher) override;
44 
45  private:
46  std::vector<std::pair<std::string, std::function<bool(const BaseData *)>>> m_Matchers;
47  };
48 
56 }
57 
58 #endif
#define MITKCORE_EXPORT
Base class of all data objects.
Definition: mitkBaseData.h:60
Interface of the property transience service.
Implementation of the IPropertyTransience service interface.
~PropertyTransience() override
PropertyTransience(const PropertyTransience &)=delete
PropertyTransience & operator=(const PropertyTransience &)=delete
void InternalAddTransient(const std::string &propertyName, std::function< bool(const BaseData *)> dataTypeMatcher) override
Register a transient property with a data-type matcher.
bool IsTransient(const BaseData *data, const std::string &propertyName) const override
Check whether a property is transient for the given node data.
Find image slices visible on a given plane.
MITKCORE_EXPORT IPropertyTransience * CreateTestInstancePropertyTransience()
Creates an unmanaged (!) instance of PropertyTransience for testing purposes.