Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkIPropertyOwner.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 mitkIPropertyOwner_h
14 #define mitkIPropertyOwner_h
15 
16 #include <MitkCoreExports.h>
17 #include <mitkIPropertyProvider.h>
18 
19 namespace mitk
20 {
23  {
24  public:
25  ~IPropertyOwner() override;
26 
39  virtual BaseProperty *GetNonConstProperty(const std::string &propertyKey,
40  const std::string &contextName = "",
41  bool fallBackOnDefaultContext = true) = 0;
42 
57  virtual void SetProperty(const std::string &propertyKey,
58  BaseProperty *property,
59  const std::string &contextName = "",
60  bool fallBackOnDefaultContext = false) = 0;
61 
75  virtual void RemoveProperty(const std::string &propertyKey,
76  const std::string &contextName = "",
77  bool fallBackOnDefaultContext = false) = 0;
78 
91  virtual bool PropertyIsOwned(const std::string& propertyKey,
92  const std::string& contextName = "",
93  bool fallBackOnDefaultContext = true) const;
94  };
95 } // namespace mitk
96 
97 #endif
#define MITKCORE_EXPORT
Abstract base class for properties.
virtual bool PropertyIsOwned(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const
Checks if a certain property exists.
virtual void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0
Add new or change existent property.
~IPropertyOwner() override
virtual BaseProperty * GetNonConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true)=0
Get property by its key.
virtual void RemoveProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0
Removes a property. If the property does not exist, nothing will be done.
Find image slices visible on a given plane.