|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Central node class of the MITK data tree, associating a data object with properties and mappers. More...
#include <mitkDataNode.h>


Public Types | |
| typedef mitk::Geometry3D::Pointer | Geometry3DPointer |
| Smart pointer type for Geometry3D. More... | |
| typedef std::vector< itk::SmartPointer< Mapper > > | MapperVector |
| Vector of Mapper smart pointers, indexed by MapperSlotId. More... | |
| typedef std::map< std::string, mitk::PropertyList::Pointer > | MapOfPropertyLists |
| Map from renderer name strings to renderer-specific PropertyList instances. More... | |
| typedef std::vector< MapOfPropertyLists::key_type > | PropertyListKeyNames |
| Vector of renderer name keys used in the MapOfPropertyLists. More... | |
| typedef std::set< std::string > | GroupTagList |
| Set of group tag name strings (keys of GroupTagProperty entries). More... | |
Public Member Functions | |
| mitkClassMacroItkParent (DataNode, itk::DataObject) | |
| BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
| Retrieve a property as a const pointer (IPropertyProvider interface). More... | |
| std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
| Retrieve all property keys for a given context (IPropertyProvider interface). More... | |
| std::vector< std::string > | GetPropertyContextNames () const override |
| Retrieve all available property context names (IPropertyProvider interface). More... | |
| BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
| Retrieve a mutable property pointer (IPropertyOwner interface). More... | |
| void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Set a property in the given context (IPropertyOwner interface). More... | |
| void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Remove a property from the given context (IPropertyOwner interface). More... | |
| mitk::Mapper * | GetMapper (MapperSlotId id) const |
| Get the Mapper for the given mapper slot, creating it on demand if necessary. More... | |
| BaseData * | GetData () const |
| Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode. More... | |
| template<typename T > | |
| T * | GetDataAs () const |
| Convenience method to get the data object cast to a specific type. More... | |
| vtkLinearTransform * | GetVtkTransform (int t=0) const |
| Get the transformation applied prior to displaying the data as a vtkTransform. More... | |
| virtual void | SetData (mitk::BaseData *baseData) |
| Set the data object (instance of BaseData, e.g., an Image) managed by this DataNode. More... | |
| virtual void | SetDataInteractor (const DataInteractor::Pointer interactor) |
| Set the DataInteractor associated with this node. More... | |
| virtual DataInteractor::Pointer | GetDataInteractor () const |
| Get the DataInteractor associated with this node. More... | |
| mitk::DataNode & | operator= (const DataNode &right) |
| Assignment operator. Creates a new DataNode with the data from right. More... | |
| mitk::DataNode & | operator= (BaseData *right) |
| Assignment operator. Creates a new DataNode with the given BaseData. More... | |
| virtual void | SetMapper (MapperSlotId id, mitk::Mapper *mapper) |
| Set a specific Mapper for the given mapper slot. More... | |
| void | UpdateOutputInformation () override |
| Update the output information by calling the source's UpdateOutputInformation(). More... | |
| void | SetRequestedRegionToLargestPossibleRegion () override |
| Set the requested region to the largest possible region (no-op for DataNode). More... | |
| bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
| Check if the requested region is outside of the buffered region. More... | |
| bool | VerifyRequestedRegion () override |
| Verify that the requested region is valid. More... | |
| void | SetRequestedRegion (const itk::DataObject *data) override |
| Set the requested region from another data object (no-op for DataNode). More... | |
| void | CopyInformation (const itk::DataObject *data) override |
| Copy information from another data object (no-op for DataNode). More... | |
| PropertyListKeyNames | GetPropertyListNames () const |
| The "names" used for (renderer-specific) PropertyLists in GetPropertyList(string). More... | |
| void | SetProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr) |
| Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value. More... | |
| void | ReplaceProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr) |
| Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-reference. More... | |
| void | AddProperty (const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr, bool overwrite=false) |
| Add the property (instance of BaseProperty) if it does not exist (or always ifoverwrite istrue) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value. More... | |
| mitk::PropertyList * | GetPropertyList (const mitk::BaseRenderer *renderer=nullptr) const |
| Get the PropertyList of the renderer. If renderer is nullptr, the BaseRenderer-independent PropertyList of this DataNode is returned. More... | |
| mitk::PropertyList * | GetPropertyList (const std::string &rendererName) const |
| Get the PropertyList for a renderer identified by name. More... | |
| void | ConcatenatePropertyList (PropertyList *pList, bool replace=false) |
| Add values from another PropertyList. More... | |
| mitk::BaseProperty * | GetProperty (const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr, bool fallBackOnDataProperties=true) const |
| Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
| template<typename T > | |
| bool | GetProperty (itk::SmartPointer< T > &property, const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr) const |
| Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
| template<typename T > | |
| bool | GetProperty (T *&property, const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr) const |
| Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
| template<typename T > | |
| bool | GetPropertyValue (const char *propertyKey, T &value, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for GenericProperty<T> properties. More... | |
| GroupTagList | GetGroupTags () const |
| Get a set of all group tags from this node's property list. More... | |
| bool | GetBoolProperty (const char *propertyKey, bool &boolValue, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for bool properties (instances of BoolProperty). More... | |
| bool | GetIntProperty (const char *propertyKey, int &intValue, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for int properties (instances of IntProperty). More... | |
| bool | GetFloatProperty (const char *propertyKey, float &floatValue, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for float properties (instances of FloatProperty). More... | |
| bool | GetDoubleProperty (const char *propertyKey, double &doubleValue, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for double properties (instances of DoubleProperty). More... | |
| bool | GetStringProperty (const char *propertyKey, std::string &string, const mitk::BaseRenderer *renderer=nullptr) const |
| Convenience access method for string properties (instances of StringProperty). More... | |
| bool | GetColor (float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") const |
| Convenience access method for color properties (instances of ColorProperty). More... | |
| bool | GetLevelWindow (mitk::LevelWindow &levelWindow, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="levelwindow") const |
| Convenience access method for level-window properties (instances of LevelWindowProperty). More... | |
| void | SetSelected (bool selected, const mitk::BaseRenderer *renderer=nullptr) |
| Set the selection state of this node. More... | |
| bool | IsSelected (const mitk::BaseRenderer *renderer=nullptr) |
| Query whether this node is currently selected. More... | |
| bool | GetName (std::string &nodeName, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="name") const |
| Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name") More... | |
| virtual std::string | GetName () const |
| Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name"). More... | |
| virtual void | SetName (const char *name) |
| Extra convenience access method to set the name of an object. More... | |
| virtual void | SetName (const std::string &name) |
| Extra convenience access method to set the name of an object. More... | |
| bool | GetVisibility (bool &visible, const mitk::BaseRenderer *renderer, const char *propertyKey="visible") const |
| Convenience access method for visibility properties (instances of BoolProperty with property-key "visible") More... | |
| bool | GetOpacity (float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const |
| Convenience access method for opacity properties (instances of FloatProperty). More... | |
| bool | IsOn (const char *propertyKey, const mitk::BaseRenderer *renderer, bool defaultIsOn=true) const |
| Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned. More... | |
| bool | IsVisible (const mitk::BaseRenderer *renderer, const char *propertyKey="visible", bool defaultIsOn=true) const |
| Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found. More... | |
| void | SetColor (const mitk::Color &color, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") |
| Convenience method for setting color properties (instances of ColorProperty). More... | |
| void | SetColor (float red, float green, float blue, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") |
| Convenience method for setting color properties from individual RGB components. More... | |
| void | SetColor (const float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") |
| Convenience method for setting color properties from a float array. More... | |
| void | SetVisibility (bool visible, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="visible") |
| Convenience method for setting visibility properties (instances of BoolProperty) More... | |
| void | SetOpacity (float opacity, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="opacity") |
| Convenience method for setting opacity properties (instances of FloatProperty). More... | |
| void | SetLevelWindow (mitk::LevelWindow levelWindow, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="levelwindow") |
| Convenience method for setting level-window properties (instances of LevelWindowProperty). More... | |
| void | SetIntProperty (const char *propertyKey, int intValue, const mitk::BaseRenderer *renderer=nullptr) |
| Convenience method for setting int properties (instances of IntProperty). More... | |
| void | SetBoolProperty (const char *propertyKey, bool boolValue, const mitk::BaseRenderer *renderer=nullptr) |
| Convenience method for setting boolean properties (instances of BoolProperty). More... | |
| void | SetFloatProperty (const char *propertyKey, float floatValue, const mitk::BaseRenderer *renderer=nullptr) |
| Convenience method for setting float properties (instances of FloatProperty). More... | |
| void | SetDoubleProperty (const char *propertyKey, double doubleValue, const mitk::BaseRenderer *renderer=nullptr) |
| Convenience method for setting double properties (instances of DoubleProperty). More... | |
| void | SetStringProperty (const char *propertyKey, const char *string, const mitk::BaseRenderer *renderer=nullptr) |
| Convenience method for setting string properties (instances of StringProperty). More... | |
| itk::ModifiedTimeType | GetMTime () const override |
| Get the timestamp of the last change of the contents of this node or the referenced BaseData. More... | |
| unsigned long | GetDataReferenceChangedTime () const |
| Get the timestamp of the last change of the reference to the BaseData. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
| ~IPropertyOwner () override | |
| virtual bool | PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const |
| Checks if a certain property exists. More... | |
Public Member Functions inherited from mitk::IPropertyProvider | |
| virtual | ~IPropertyProvider () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static Pointer | New () |
| static std::string | NO_NAME_VALUE () |
| Sentinel value indicating that a node name has not been set yet. More... | |
Protected Member Functions | |
| DataNode () | |
| ~DataNode () override | |
| virtual void | PropertyListModified (const itk::Object *caller, const itk::EventObject &event) |
| Invoked when the property list was modified. Calls Modified() of the DataNode. More... | |
Protected Attributes | |
| MapperVector | m_Mappers |
| Mapper-slots. More... | |
| BaseData::Pointer | m_Data |
| The data object (instance of BaseData, e.g., an Image) managed by this DataNode. More... | |
| PropertyList::Pointer | m_PropertyList |
| BaseRenderer-independent PropertyList. More... | |
| MapOfPropertyLists | m_MapOfPropertyLists |
| Map associating each BaseRenderer with its own PropertyList. More... | |
| DataInteractor::Pointer | m_DataInteractor |
| itk::TimeStamp | m_DataReferenceChangedTime |
| Timestamp of the last change of m_Data. More... | |
| unsigned long | m_PropertyListModifiedObserverTag |
Central node class of the MITK data tree, associating a data object with properties and mappers.
A DataNode holds a reference to a BaseData object (e.g., an Image, Surface, or PointSet) along with a set of properties that control visualization and application behavior. Each DataNode can carry renderer-specific property lists in addition to its default (renderer-independent) PropertyList, enabling per-renderer customization of rendering parameters such as visibility, color, and opacity.
Mappers are created on demand for each mapper slot (e.g., 2D mapper, 3D mapper) via the CoreObjectFactory and are responsible for translating the node's data and properties into visual representations.
DataNodes are managed by a DataStorage, which organizes them in a directed acyclic graph with parent-child ("was created by") relationships.
SetProperty( "key", new SomeProperty("value") ). Definition at line 71 of file mitkDataNode.h.
| typedef mitk::Geometry3D::Pointer mitk::DataNode::Geometry3DPointer |
Smart pointer type for Geometry3D.
Definition at line 75 of file mitkDataNode.h.
| typedef std::set<std::string> mitk::DataNode::GroupTagList |
Set of group tag name strings (keys of GroupTagProperty entries).
Definition at line 83 of file mitkDataNode.h.
| typedef std::map<std::string, mitk::PropertyList::Pointer> mitk::DataNode::MapOfPropertyLists |
Map from renderer name strings to renderer-specific PropertyList instances.
Definition at line 79 of file mitkDataNode.h.
| typedef std::vector<itk::SmartPointer<Mapper> > mitk::DataNode::MapperVector |
Vector of Mapper smart pointers, indexed by MapperSlotId.
Definition at line 77 of file mitkDataNode.h.
| typedef std::vector<MapOfPropertyLists::key_type> mitk::DataNode::PropertyListKeyNames |
Vector of renderer name keys used in the MapOfPropertyLists.
Definition at line 81 of file mitkDataNode.h.
|
protected |
|
overrideprotected |
| void mitk::DataNode::AddProperty | ( | const char * | propertyKey, |
| BaseProperty * | property, | ||
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| bool | overwrite = false |
||
| ) |
Add the property (instance of BaseProperty) if it does not exist (or always ifoverwrite istrue) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value.
Foroverwrite ==false the property isnot changed if it already exists. Foroverwrite ==true the method is identical to SetProperty.
| void mitk::DataNode::ConcatenatePropertyList | ( | PropertyList * | pList, |
| bool | replace = false |
||
| ) |
Add values from another PropertyList.
Overwrites values in m_PropertyList only when possible (i.e. when types are compatible). If you want to allow for object type changes (replacing a "visible":BoolProperty with "visible":IntProperty, set replace .
| replace | true: if |
| pList | contains a property "visible" of type ColorProperty and our m_PropertyList also has a "visible" property of a different type (e.g. BoolProperty), change the type, i.e. replace the objects behind the pointer. |
|
override |
Copy information from another data object (no-op for DataNode).
| [in] | data | The data object to copy information from. |
| bool mitk::DataNode::GetBoolProperty | ( | const char * | propertyKey, |
| bool & | boolValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) | const |
Convenience access method for bool properties (instances of BoolProperty).
| [in] | propertyKey | The key of the BoolProperty. |
| [out] | boolValue | Receives the boolean value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| bool mitk::DataNode::GetColor | ( | float | rgb[3], |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "color" |
||
| ) | const |
Convenience access method for color properties (instances of ColorProperty).
| [out] | rgb | Array of 3 floats receiving the RGB color values. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| [in] | propertyKey | The key of the ColorProperty (default: "color"). |
|
overridevirtual |
Retrieve a property as a const pointer (IPropertyProvider interface).
Looks up the property first in the context-specific PropertyList identified by contextName (i.e., a renderer name). If not found and fallBackOnDefaultContext is true (or contextName is empty), the default PropertyList and then the data object's properties are searched.
| [in] | propertyKey | The key of the property to retrieve. |
| [in] | contextName | Renderer name context. Empty string means the default context. |
| [in] | fallBackOnDefaultContext | If true, falls back to the default PropertyList when the property is not found in the specified context. |
Implements mitk::IPropertyProvider.
| BaseData* mitk::DataNode::GetData | ( | ) | const |
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Referenced by mitk::TNodePredicateDataType< T >::CheckNode(), mitk::DataStorage::GetNamedDerivedObject(), and mitk::DataStorage::GetNamedObject().
|
inline |
Convenience method to get the data object cast to a specific type.
Performs a dynamic_cast of the data returned by GetData() to the requested type.
| T | The target data type (must inherit from BaseData). |
Definition at line 196 of file mitkDataNode.h.
|
virtual |
Get the DataInteractor associated with this node.
|
inline |
Get the timestamp of the last change of the reference to the BaseData.
Definition at line 845 of file mitkDataNode.h.
| bool mitk::DataNode::GetDoubleProperty | ( | const char * | propertyKey, |
| double & | doubleValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) | const |
Convenience access method for double properties (instances of DoubleProperty).
If there is no DoubleProperty for the given propertyKey, the method falls back to looking for a corresponding FloatProperty instance and promoting its value to double.
| [in] | propertyKey | The key of the DoubleProperty (or FloatProperty). |
| [out] | doubleValue | Receives the double value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| bool mitk::DataNode::GetFloatProperty | ( | const char * | propertyKey, |
| float & | floatValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) | const |
Convenience access method for float properties (instances of FloatProperty).
| [in] | propertyKey | The key of the FloatProperty. |
| [out] | floatValue | Receives the float value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| GroupTagList mitk::DataNode::GetGroupTags | ( | ) | const |
Get a set of all group tags from this node's property list.
| bool mitk::DataNode::GetIntProperty | ( | const char * | propertyKey, |
| int & | intValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) | const |
Convenience access method for int properties (instances of IntProperty).
| [in] | propertyKey | The key of the IntProperty. |
| [out] | intValue | Receives the integer value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| bool mitk::DataNode::GetLevelWindow | ( | mitk::LevelWindow & | levelWindow, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "levelwindow" |
||
| ) | const |
Convenience access method for level-window properties (instances of LevelWindowProperty).
| [out] | levelWindow | Receives the LevelWindow value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
| [in] | propertyKey | The key of the LevelWindowProperty (default: "levelwindow"). |
| mitk::Mapper* mitk::DataNode::GetMapper | ( | MapperSlotId | id | ) | const |
Get the Mapper for the given mapper slot, creating it on demand if necessary.
Each mapper slot corresponds to a specific rendering context (e.g., 2D or 3D). If no mapper exists yet for the given slot, one is created via CoreObjectFactory.
| [in] | id | The mapper slot identifier. |
|
override |
Get the timestamp of the last change of the contents of this node or the referenced BaseData.
|
inlinevirtual |
Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name").
This method does not take the renderer specific propertylists into account, because the name of an object should never be renderer specific.
Definition at line 601 of file mitkDataNode.h.
References mitk::StringProperty::GetValue().
|
inline |
Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name")
Definition at line 585 of file mitkDataNode.h.
|
overridevirtual |
Retrieve a mutable property pointer (IPropertyOwner interface).
Behaves like GetConstProperty() but returns a non-const pointer.
| [in] | propertyKey | The key of the property to retrieve. |
| [in] | contextName | Renderer name context. Empty string means the default context. |
| [in] | fallBackOnDefaultContext | If true, falls back to the default PropertyList when the property is not found in the specified context. |
Implements mitk::IPropertyOwner.
| bool mitk::DataNode::GetOpacity | ( | float & | opacity, |
| const mitk::BaseRenderer * | renderer, | ||
| const char * | propertyKey = "opacity" |
||
| ) | const |
Convenience access method for opacity properties (instances of FloatProperty).
| [out] | opacity | Receives the opacity value (0.0 to 1.0) if the property is found. |
| [in] | renderer | The renderer whose PropertyList is checked first. |
| [in] | propertyKey | The key of the FloatProperty (default: "opacity"). |
| mitk::BaseProperty* mitk::DataNode::GetProperty | ( | const char * | propertyKey, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| bool | fallBackOnDataProperties = true |
||
| ) | const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.
If fallBackOnDataProperties is true, the data property list is queried as a last resort.
|
inline |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.
Definition at line 418 of file mitkDataNode.h.
|
inline |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this DataNode is queried.
Definition at line 438 of file mitkDataNode.h.
|
overridevirtual |
Retrieve all available property context names (IPropertyProvider interface).
Returns the names of all renderer-specific PropertyLists that have been created for this node. These names correspond to BaseRenderer names.
Implements mitk::IPropertyProvider.
|
overridevirtual |
Retrieve all property keys for a given context (IPropertyProvider interface).
| [in] | contextName | Renderer name context. Empty string returns keys from the default PropertyList. |
| [in] | includeDefaultContext | If true, keys from the default PropertyList are included in addition to the context-specific keys. |
Implements mitk::IPropertyProvider.
| mitk::PropertyList* mitk::DataNode::GetPropertyList | ( | const mitk::BaseRenderer * | renderer = nullptr | ) | const |
Get the PropertyList of the renderer. If renderer is nullptr, the BaseRenderer-independent PropertyList of this DataNode is returned.
| mitk::PropertyList* mitk::DataNode::GetPropertyList | ( | const std::string & | rendererName | ) | const |
Get the PropertyList for a renderer identified by name.
If rendererName is empty, the BaseRenderer-independent PropertyList is returned. If no PropertyList exists yet for the given renderer name, a new empty one is created.
| [in] | rendererName | The name of the renderer. Empty string returns the default list. |
| PropertyListKeyNames mitk::DataNode::GetPropertyListNames | ( | ) | const |
The "names" used for (renderer-specific) PropertyLists in GetPropertyList(string).
All possible values for the "renderer" parameters of the diverse GetProperty/List() methods.
|
inline |
Convenience access method for GenericProperty<T> properties.
Retrieves the value of a GenericProperty<T> identified by propertyKey.
| T | The value type of the GenericProperty. |
| [in] | propertyKey | The key of the property to look up. |
| [out] | value | Receives the property value if found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
Definition at line 456 of file mitkDataNode.h.
References mitk::GenericProperty< T >::GetValue().
| bool mitk::DataNode::GetStringProperty | ( | const char * | propertyKey, |
| std::string & | string, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) | const |
Convenience access method for string properties (instances of StringProperty).
| [in] | propertyKey | The key of the StringProperty. |
| [out] | string | Receives the string value if the property is found. |
| [in] | renderer | If non-null, the renderer-specific PropertyList is checked first. |
|
inline |
Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")
Definition at line 661 of file mitkDataNode.h.
| vtkLinearTransform* mitk::DataNode::GetVtkTransform | ( | int | t = 0 | ) | const |
Get the transformation applied prior to displaying the data as a vtkTransform.
Convenience shortcut for GetData()->GetGeometry(t)->GetVtkTransform().
|
inline |
Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned.
Thus, the return value has a different meaning than in the GetBoolProperty method!
Definition at line 686 of file mitkDataNode.h.
| bool mitk::DataNode::IsSelected | ( | const mitk::BaseRenderer * | renderer = nullptr | ) |
Query whether this node is currently selected.
| [in] | renderer | If non-null, the renderer-specific "selected" property is checked. |
|
inline |
Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found.
Thus, the return value has a different meaning than in the GetVisibility method!
Definition at line 705 of file mitkDataNode.h.
| mitk::DataNode::mitkClassMacroItkParent | ( | DataNode | , |
| itk::DataObject | |||
| ) |
|
static |
|
inlinestatic |
Sentinel value indicating that a node name has not been set yet.
Definition at line 613 of file mitkDataNode.h.
| mitk::DataNode& mitk::DataNode::operator= | ( | BaseData * | right | ) |
| mitk::DataNode& mitk::DataNode::operator= | ( | const DataNode & | right | ) |
|
protectedvirtual |
Invoked when the property list was modified. Calls Modified() of the DataNode.
|
overridevirtual |
Remove a property from the given context (IPropertyOwner interface).
| [in] | propertyKey | The key of the property to remove. Must not be empty. |
| [in] | contextName | Renderer name context. Empty string targets the default PropertyList. |
| [in] | fallBackOnDefaultContext | If true, falls back to the default PropertyList when the specified context is not found. |
| mitk::Exception | if propertyKey is empty or the context is unknown and fallBackOnDefaultContext is false. |
Implements mitk::IPropertyOwner.
| void mitk::DataNode::ReplaceProperty | ( | const char * | propertyKey, |
| BaseProperty * | property, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-reference.
If renderer is nullptr the property is set in the BaseRenderer-independent PropertyList of this DataNode.
|
override |
Check if the requested region is outside of the buffered region.
| void mitk::DataNode::SetBoolProperty | ( | const char * | propertyKey, |
| bool | boolValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Convenience method for setting boolean properties (instances of BoolProperty).
| [in] | propertyKey | The key of the BoolProperty. |
| [in] | boolValue | The boolean value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetColor | ( | const float | rgb[3], |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "color" |
||
| ) |
Convenience method for setting color properties from a float array.
| [in] | rgb | Array of 3 floats (red, green, blue), each in range 0.0 to 1.0. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| [in] | propertyKey | The key of the ColorProperty (default: "color"). |
| void mitk::DataNode::SetColor | ( | const mitk::Color & | color, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "color" |
||
| ) |
Convenience method for setting color properties (instances of ColorProperty).
| [in] | color | The color value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| [in] | propertyKey | The key of the ColorProperty (default: "color"). |
| void mitk::DataNode::SetColor | ( | float | red, |
| float | green, | ||
| float | blue, | ||
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "color" |
||
| ) |
Convenience method for setting color properties from individual RGB components.
| [in] | red | Red component (0.0 to 1.0). |
| [in] | green | Green component (0.0 to 1.0). |
| [in] | blue | Blue component (0.0 to 1.0). |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| [in] | propertyKey | The key of the ColorProperty (default: "color"). |
|
virtual |
Set the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Prior set properties are kept if previous data of the node already exists and has the same type as the new data to be set. Otherwise, the default properties are used. In case that previous data already exists, the property list of the data node is cleared before setting new default properties.
|
virtual |
Set the DataInteractor associated with this node.
Replaces any previously set interactor and fires an InteractorChangedEvent.
| [in] | interactor | The new DataInteractor, or nullptr to clear the interactor. |
| void mitk::DataNode::SetDoubleProperty | ( | const char * | propertyKey, |
| double | doubleValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Convenience method for setting double properties (instances of DoubleProperty).
| [in] | propertyKey | The key of the DoubleProperty. |
| [in] | doubleValue | The double value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetFloatProperty | ( | const char * | propertyKey, |
| float | floatValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Convenience method for setting float properties (instances of FloatProperty).
| [in] | propertyKey | The key of the FloatProperty. |
| [in] | floatValue | The float value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetIntProperty | ( | const char * | propertyKey, |
| int | intValue, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Convenience method for setting int properties (instances of IntProperty).
| [in] | propertyKey | The key of the IntProperty. |
| [in] | intValue | The integer value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetLevelWindow | ( | mitk::LevelWindow | levelWindow, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "levelwindow" |
||
| ) |
Convenience method for setting level-window properties (instances of LevelWindowProperty).
| [in] | levelWindow | The LevelWindow value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| [in] | propertyKey | The key of the LevelWindowProperty (default: "levelwindow"). |
|
virtual |
|
inlinevirtual |
Extra convenience access method to set the name of an object.
If the data has already a "name" property, the name will be stored in it. Otherwise, the name will be stored in the non-renderer-specific PropertyList in a StringProperty named "name".
Definition at line 624 of file mitkDataNode.h.
References mitk::StringProperty::SetValue().
|
inlinevirtual |
Extra convenience access method to set the name of an object.
Definition at line 654 of file mitkDataNode.h.
References SetName().
Referenced by SetName().
| void mitk::DataNode::SetOpacity | ( | float | opacity, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "opacity" |
||
| ) |
Convenience method for setting opacity properties (instances of FloatProperty).
| [in] | opacity | The opacity value (0.0 fully transparent to 1.0 fully opaque). |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| [in] | propertyKey | The key of the FloatProperty (default: "opacity"). |
| void mitk::DataNode::SetProperty | ( | const char * | propertyKey, |
| BaseProperty * | property, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value.
SetProperty( "key", new SomeProperty("value") ).
|
overridevirtual |
Set a property in the given context (IPropertyOwner interface).
| [in] | propertyKey | The key under which to store the property. Must not be empty. |
| [in] | property | The property instance to store. |
| [in] | contextName | Renderer name context. Empty string targets the default PropertyList. |
| [in] | fallBackOnDefaultContext | If true, falls back to the default PropertyList when the specified context is not found. |
| mitk::Exception | if propertyKey is empty or the context is unknown and fallBackOnDefaultContext is false. |
Implements mitk::IPropertyOwner.
|
override |
Set the requested region from another data object (no-op for DataNode).
| [in] | data | The data object to copy the requested region from. |
|
override |
Set the requested region to the largest possible region (no-op for DataNode).
| void mitk::DataNode::SetSelected | ( | bool | selected, |
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Set the selection state of this node.
Sets the "selected" BoolProperty. If it does not exist, it is created. A ModifiedEvent is invoked if the selection state changes.
| [in] | selected | The new selection state. |
| [in] | renderer | If non-null, the property is set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetStringProperty | ( | const char * | propertyKey, |
| const char * | string, | ||
| const mitk::BaseRenderer * | renderer = nullptr |
||
| ) |
Convenience method for setting string properties (instances of StringProperty).
| [in] | propertyKey | The key of the StringProperty. |
| [in] | string | The string value to set. |
| [in] | renderer | If non-null, set in the renderer-specific PropertyList. |
| void mitk::DataNode::SetVisibility | ( | bool | visible, |
| const mitk::BaseRenderer * | renderer = nullptr, |
||
| const char * | propertyKey = "visible" |
||
| ) |
Convenience method for setting visibility properties (instances of BoolProperty)
| visible | If set to true, the data will be rendered. If false, the render will skip this data. |
| renderer | Specify a renderer if the visibility shall be specific to a renderer |
| propertyKey | Can be used to specify a user defined name of the visibility property. |
|
override |
Update the output information by calling the source's UpdateOutputInformation().
|
override |
Verify that the requested region is valid.
|
protected |
The data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Definition at line 862 of file mitkDataNode.h.
|
protected |
Definition at line 875 of file mitkDataNode.h.
|
protected |
Timestamp of the last change of m_Data.
Definition at line 878 of file mitkDataNode.h.
|
mutableprotected |
Map associating each BaseRenderer with its own PropertyList.
Definition at line 873 of file mitkDataNode.h.
|
mutableprotected |
Mapper-slots.
Definition at line 856 of file mitkDataNode.h.
|
protected |
BaseRenderer-independent PropertyList.
Properties herein can be overwritten specifically for each BaseRenderer by the BaseRenderer-specific properties defined in m_MapOfPropertyLists.
Definition at line 870 of file mitkDataNode.h.
|
protected |
Definition at line 880 of file mitkDataNode.h.