|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Interface of the property transience service. More...
#include <mitkIPropertyTransience.h>

Public Member Functions | |
| virtual | ~IPropertyTransience () |
| template<class TData , typename = std::enable_if_t<std::is_base_of_v<BaseData, TData>>> | |
| void | AddTransient (const std::string &propertyName) |
| Declare a property transient for nodes whose data is-a TData. More... | |
| virtual bool | IsTransient (const BaseData *data, const std::string &propertyName) const =0 |
| Check whether a property is transient for the given node data. More... | |
Protected Member Functions | |
| virtual void | InternalAddTransient (const std::string &propertyName, std::function< bool(const BaseData *)> dataTypeMatcher)=0 |
| Register a transient property with a data-type matcher. More... | |
Interface of the property transience service.
This service manages which DataNode properties are transient, i.e. hold runtime or UI state (like the node "selected" flag) that must not be persisted to scene files. Although such properties live on the DataNode, transience is declared per BaseData type: a rule registered for a type applies to every node whose data is an instance of that type (or a subclass). Register against mitk::BaseData to cover all data types, including data-less nodes (data == nullptr).
At serialization time the scene serializer queries IsTransient() with the node's data to decide whether a property is excluded.
Definition at line 42 of file mitkIPropertyTransience.h.
|
virtual |
|
inline |
Declare a property transient for nodes whose data is-a TData.
| TData | BaseData or a subclass the rule applies to. Use mitk::BaseData to mark the property transient for any data type, including data-less nodes (data == nullptr). |
| [in] | propertyName | Name of the transient property. |
Definition at line 55 of file mitkIPropertyTransience.h.
|
protectedpure virtual |
Register a transient property with a data-type matcher.
Called by the public AddTransient() template.
| [in] | propertyName | Name of the transient property. |
| [in] | dataTypeMatcher | Predicate returning true if the rule applies to the passed BaseData. |
Implemented in mitk::PropertyTransience.
|
pure virtual |
Check whether a property is transient for the given node data.
| [in] | data | The node's BaseData. May be null (e.g. a data-less node); rules registered for mitk::BaseData still match, type-specific rules do not. |
| [in] | propertyName | Name of the property to check. |
Implemented in mitk::PropertyTransience.