Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::DataNode Class Reference

Class for nodes of the DataTree. More...

#include <mitkDataNode.h>

Inheritance diagram for mitk::DataNode:
Collaboration diagram for mitk::DataNode:

Public Types

typedef mitk::Geometry3D::Pointer Geometry3DPointer
 
typedef std::vector< itk::SmartPointer< Mapper > > MapperVector
 
typedef std::map< std::string, mitk::PropertyList::PointerMapOfPropertyLists
 
typedef std::vector< MapOfPropertyLists::key_type > PropertyListKeyNames
 
typedef std::set< std::string > GroupTagList
 
typedef DataNode Self
 
typedef itk::DataObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
 Get property by its key. More...
 
std::vector< std::string > GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override
 Query keys of existing properties. More...
 
std::vector< std::string > GetPropertyContextNames () const override
 Query names of existing contexts. More...
 
BasePropertyGetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
 Get property by its key. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Add new or change existent property. More...
 
void RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Removes a property. If the property does not exist, nothing will be done. More...
 
mitk::MapperGetMapper (MapperSlotId id) const
 
BaseDataGetData () const
 Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode. 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 Interactor. More...
 
virtual DataInteractor::Pointer GetDataInteractor () const
 
mitk::DataNodeoperator= (const DataNode &right)
 
mitk::DataNodeoperator= (BaseData *right)
 
virtual void SetMapper (MapperSlotId id, mitk::Mapper *mapper)
 
void UpdateOutputInformation () override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
bool VerifyRequestedRegion () override
 
void SetRequestedRegion (const itk::DataObject *data) override
 
void CopyInformation (const itk::DataObject *data) override
 
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::PropertyListGetPropertyList (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::PropertyListGetPropertyList (const std::string &rendererName) const
 
void ConcatenatePropertyList (PropertyList *pList, bool replace=false)
 Add values from another PropertyList. More...
 
mitk::BasePropertyGetProperty (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 (T being the type of the second parameter) 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 node as selected More...
 
bool IsSelected (const mitk::BaseRenderer *renderer=nullptr)
 set the node as 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 (instances of ColorProperty) More...
 
void SetColor (const float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty) 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
 
- Public Member Functions inherited from mitk::IPropertyProvider
virtual ~IPropertyProvider ()
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
static std::string NO_NAME_VALUE ()
 

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
 

Detailed Description

Class for nodes of the DataTree.

Contains the data (instance of BaseData), a list of mappers, which can draw the data, a transform (vtkTransform) and a list of properties (PropertyList).

Warning
Change in semantics of SetProperty() since Aug 25th 2006. Check your usage of this method if you do more with properties than just call SetProperty( "key", new SomeProperty("value") ).

Definition at line 63 of file mitkDataNode.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 72 of file mitkDataNode.h.

◆ Geometry3DPointer

◆ GroupTagList

typedef std::set<std::string> mitk::DataNode::GroupTagList

Definition at line 70 of file mitkDataNode.h.

◆ MapOfPropertyLists

Definition at line 68 of file mitkDataNode.h.

◆ MapperVector

Definition at line 67 of file mitkDataNode.h.

◆ Pointer

Definition at line 72 of file mitkDataNode.h.

◆ PropertyListKeyNames

typedef std::vector<MapOfPropertyLists::key_type> mitk::DataNode::PropertyListKeyNames

Definition at line 69 of file mitkDataNode.h.

◆ Self

Definition at line 72 of file mitkDataNode.h.

◆ Superclass

typedef itk::DataObject mitk::DataNode::Superclass

Definition at line 72 of file mitkDataNode.h.

Constructor & Destructor Documentation

◆ DataNode()

mitk::DataNode::DataNode ( )
protected

◆ ~DataNode()

mitk::DataNode::~DataNode ( )
overrideprotected

Member Function Documentation

◆ AddProperty()

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.

See also
SetProperty
GetProperty
m_PropertyList
m_MapOfPropertyLists

◆ ConcatenatePropertyList()

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 .

Parameters
replacetrue: if
pListcontains 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.
See also
SetProperty
ReplaceProperty
m_PropertyList

◆ CopyInformation()

void mitk::DataNode::CopyInformation ( const itk::DataObject *  data)
override

◆ GetBoolProperty()

bool mitk::DataNode::GetBoolProperty ( const char *  propertyKey,
bool &  boolValue,
const mitk::BaseRenderer renderer = nullptr 
) const

Convenience access method for bool properties (instances of BoolProperty)

Returns
true property was found

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::DataNode::GetClassHierarchy ( ) const
inlinevirtual

Definition at line 72 of file mitkDataNode.h.

◆ GetClassName()

virtual const char* mitk::DataNode::GetClassName ( ) const
virtual

◆ GetColor()

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)

Returns
true property was found

◆ GetConstProperty()

BaseProperty::ConstPointer mitk::DataNode::GetConstProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = true 
) const
overridevirtual

Get property by its key.

Parameters
[in]propertyKeyKey of property.
[in]contextNameOptional, default is empty string (default context). Search in specified context.
[in]fallBackOnDefaultContextOptional, default is true. Also search in default context if property was not found in given context.
Returns
Found property, nullptr otherwise.

Implements mitk::IPropertyProvider.

◆ GetData()

BaseData* mitk::DataNode::GetData ( ) const

◆ GetDataInteractor()

virtual DataInteractor::Pointer mitk::DataNode::GetDataInteractor ( ) const
virtual

◆ GetDataReferenceChangedTime()

unsigned long mitk::DataNode::GetDataReferenceChangedTime ( ) const
inline

Get the timestamp of the last change of the reference to the BaseData.

Definition at line 576 of file mitkDataNode.h.

◆ GetDoubleProperty()

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 givenpropertyKey argument, the method looks for a corresponding FloatProperty instance.

Returns
true property was found

◆ GetFloatProperty()

bool mitk::DataNode::GetFloatProperty ( const char *  propertyKey,
float &  floatValue,
const mitk::BaseRenderer renderer = nullptr 
) const

Convenience access method for float properties (instances of FloatProperty)

Returns
true property was found

◆ GetGroupTags()

GroupTagList mitk::DataNode::GetGroupTags ( ) const

Get a set of all group tags from this node's property list.

◆ GetIntProperty()

bool mitk::DataNode::GetIntProperty ( const char *  propertyKey,
int &  intValue,
const mitk::BaseRenderer renderer = nullptr 
) const

Convenience access method for int properties (instances of IntProperty)

Returns
true property was found

◆ GetLevelWindow()

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)

Returns
true property was found

◆ GetMapper()

mitk::Mapper* mitk::DataNode::GetMapper ( MapperSlotId  id) const

◆ GetMTime()

itk::ModifiedTimeType mitk::DataNode::GetMTime ( ) const
override

Get the timestamp of the last change of the contents of this node or the referenced BaseData.

◆ GetName() [1/2]

virtual std::string mitk::DataNode::GetName ( ) const
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.

Returns
a std::string with the name of the object (content of "name" Property). If there is no "name" Property, an empty string will be returned.

Definition at line 385 of file mitkDataNode.h.

References mitk::StringProperty::GetValue().

◆ GetName() [2/2]

bool mitk::DataNode::GetName ( std::string &  nodeName,
const mitk::BaseRenderer renderer = nullptr,
const char *  propertyKey = "name" 
) const
inline

Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name")

Returns
true property was found

Definition at line 369 of file mitkDataNode.h.

◆ GetNonConstProperty()

BaseProperty* mitk::DataNode::GetNonConstProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = true 
)
overridevirtual

Get property by its key.

Parameters
[in]propertyKeyKey of property.
[in]contextNameOptional, default is empty string (default context). Search in specified context.
[in]fallBackOnDefaultContextOptional, default is true. Also search in default context if property was not found in given context.
Returns
Found property, nullptr otherwise.

Implements mitk::IPropertyOwner.

◆ GetOpacity()

bool mitk::DataNode::GetOpacity ( float &  opacity,
const mitk::BaseRenderer renderer,
const char *  propertyKey = "opacity" 
) const

Convenience access method for opacity properties (instances of FloatProperty)

Returns
true property was found

◆ GetProperty() [1/3]

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.

See also
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

◆ GetProperty() [2/3]

template<typename T >
bool mitk::DataNode::GetProperty ( itk::SmartPointer< T > &  property,
const char *  propertyKey,
const mitk::BaseRenderer renderer = nullptr 
) const
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.

See also
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

Definition at line 246 of file mitkDataNode.h.

◆ GetProperty() [3/3]

template<typename T >
bool mitk::DataNode::GetProperty ( T *&  property,
const char *  propertyKey,
const mitk::BaseRenderer renderer = nullptr 
) const
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.

See also
GetPropertyList
m_PropertyList
m_MapOfPropertyLists

Definition at line 266 of file mitkDataNode.h.

◆ GetPropertyContextNames()

std::vector<std::string> mitk::DataNode::GetPropertyContextNames ( ) const
overridevirtual

Query names of existing contexts.

Returns
List of context names.

Implements mitk::IPropertyProvider.

◆ GetPropertyKeys()

std::vector<std::string> mitk::DataNode::GetPropertyKeys ( const std::string &  contextName = "",
bool  includeDefaultContext = false 
) const
overridevirtual

Query keys of existing properties.

Parameters
[in]contextNameOptional, default is empty string (default context). Search in specified context.
[in]includeDefaultContextOptional, default is false. Include default context.
Returns
List of property keys.

Implements mitk::IPropertyProvider.

◆ GetPropertyList() [1/2]

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.

See also
GetProperty
m_PropertyList
m_MapOfPropertyLists

◆ GetPropertyList() [2/2]

mitk::PropertyList* mitk::DataNode::GetPropertyList ( const std::string &  rendererName) const

◆ GetPropertyListNames()

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.

◆ GetPropertyValue()

template<typename T >
bool mitk::DataNode::GetPropertyValue ( const char *  propertyKey,
T &  value,
const mitk::BaseRenderer renderer = nullptr 
) const
inline

Convenience access method for GenericProperty<T> properties (T being the type of the second parameter)

Returns
true property was found

Definition at line 278 of file mitkDataNode.h.

References mitk::GenericProperty< T >::GetValue().

◆ GetStaticNameOfClass()

static const char* mitk::DataNode::GetStaticNameOfClass ( )
inlinestatic

Definition at line 72 of file mitkDataNode.h.

◆ GetStringProperty()

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)

Returns
true property was found

◆ GetVisibility()

bool mitk::DataNode::GetVisibility ( bool &  visible,
const mitk::BaseRenderer renderer,
const char *  propertyKey = "visible" 
) const
inline

Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")

Returns
true property was found
See also
IsVisible

Definition at line 442 of file mitkDataNode.h.

◆ GetVtkTransform()

vtkLinearTransform* mitk::DataNode::GetVtkTransform ( int  t = 0) const

Get the transformation applied prior to displaying the data as a vtkTransform.

Deprecated:
use GetData()->GetGeometry()->GetVtkTransform() instead

◆ IsOn()

bool mitk::DataNode::IsOn ( const char *  propertyKey,
const mitk::BaseRenderer renderer,
bool  defaultIsOn = true 
) const
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!

See also
GetBoolProperty

Definition at line 463 of file mitkDataNode.h.

◆ IsSelected()

bool mitk::DataNode::IsSelected ( const mitk::BaseRenderer renderer = nullptr)

set the node as selected

Returns
true node is selected

◆ IsVisible()

bool mitk::DataNode::IsVisible ( const mitk::BaseRenderer renderer,
const char *  propertyKey = "visible",
bool  defaultIsOn = true 
) const
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!

See also
GetVisibility
IsOn

Definition at line 482 of file mitkDataNode.h.

◆ New()

static Pointer mitk::DataNode::New ( )
static

◆ NO_NAME_VALUE()

static std::string mitk::DataNode::NO_NAME_VALUE ( )
inlinestatic

Value constant that is used indicate that node names are not set so far.

Definition at line 394 of file mitkDataNode.h.

◆ operator=() [1/2]

mitk::DataNode& mitk::DataNode::operator= ( BaseData right)

◆ operator=() [2/2]

mitk::DataNode& mitk::DataNode::operator= ( const DataNode right)

◆ PropertyListModified()

virtual void mitk::DataNode::PropertyListModified ( const itk::Object *  caller,
const itk::EventObject &  event 
)
protectedvirtual

Invoked when the property list was modified. Calls Modified() of the DataNode.

◆ RemoveProperty()

void mitk::DataNode::RemoveProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = false 
)
overridevirtual

Removes a property. If the property does not exist, nothing will be done.

Parameters
[in]propertyKeyKey of property.
[in]contextNameOptional, default is empty string (default context). Context in which the property is removed.
[in]fallBackOnDefaultContextOptional, default is false. Remove property in default context if given context does not exist.
Precondition
If a context is specified by contextName, this context must be known by the owner or fallBackOnDefaultContext must be true. If violated an mitk::Exception is thrown.
propertyKey must be a none empty string. If violated an mitk::Exception is thrown.

Implements mitk::IPropertyOwner.

◆ ReplaceProperty()

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.

See also
GetProperty
m_PropertyList
m_MapOfPropertyLists

◆ RequestedRegionIsOutsideOfTheBufferedRegion()

bool mitk::DataNode::RequestedRegionIsOutsideOfTheBufferedRegion ( )
override

◆ SetBoolProperty()

void mitk::DataNode::SetBoolProperty ( const char *  propertyKey,
bool  boolValue,
const mitk::BaseRenderer renderer = nullptr 
)

Convenience method for setting boolean properties (instances of BoolProperty)

◆ SetColor() [1/3]

void mitk::DataNode::SetColor ( const float  rgb[3],
const mitk::BaseRenderer renderer = nullptr,
const char *  propertyKey = "color" 
)

Convenience method for setting color properties (instances of ColorProperty)

◆ SetColor() [2/3]

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)

◆ SetColor() [3/3]

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 (instances of ColorProperty)

◆ SetData()

virtual void mitk::DataNode::SetData ( mitk::BaseData baseData)
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.

Warning
the actor-mode of the vtkInteractor does not work any more, if the transform of the data-tree-node is connected to the transform of the basedata via vtkTransform->SetInput.

◆ SetDataInteractor()

virtual void mitk::DataNode::SetDataInteractor ( const DataInteractor::Pointer  interactor)
virtual

Set the Interactor.

◆ SetDoubleProperty()

void mitk::DataNode::SetDoubleProperty ( const char *  propertyKey,
double  doubleValue,
const mitk::BaseRenderer renderer = nullptr 
)

Convenience method for setting double properties (instances of DoubleProperty)

◆ SetFloatProperty()

void mitk::DataNode::SetFloatProperty ( const char *  propertyKey,
float  floatValue,
const mitk::BaseRenderer renderer = nullptr 
)

Convenience method for setting float properties (instances of FloatProperty)

◆ SetIntProperty()

void mitk::DataNode::SetIntProperty ( const char *  propertyKey,
int  intValue,
const mitk::BaseRenderer renderer = nullptr 
)

Convenience method for setting int properties (instances of IntProperty)

◆ SetLevelWindow()

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)

◆ SetMapper()

virtual void mitk::DataNode::SetMapper ( MapperSlotId  id,
mitk::Mapper mapper 
)
virtual

◆ SetName() [1/2]

virtual void mitk::DataNode::SetName ( const char *  name)
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 405 of file mitkDataNode.h.

References mitk::StringProperty::SetValue().

◆ SetName() [2/2]

virtual void mitk::DataNode::SetName ( const std::string &  name)
inlinevirtual

Extra convenience access method to set the name of an object.

See also
SetName(const char*)

Definition at line 435 of file mitkDataNode.h.

References SetName().

Referenced by SetName().

◆ SetOpacity()

void mitk::DataNode::SetOpacity ( float  opacity,
const mitk::BaseRenderer renderer = nullptr,
const char *  propertyKey = "opacity" 
)

Convenience method for setting opacity properties (instances of FloatProperty)

◆ SetProperty() [1/2]

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.

Warning
Change in semantics since Aug 25th 2006. Check your usage of this method if you do more with properties than just call SetProperty( "key", new SomeProperty("value") ).
See also
GetProperty
m_PropertyList
m_MapOfPropertyLists

◆ SetProperty() [2/2]

void mitk::DataNode::SetProperty ( const std::string &  propertyKey,
BaseProperty property,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = false 
)
overridevirtual

Add new or change existent property.

Parameters
[in]propertyKeyKey of property.
[in]propertyThe actual property.
[in]contextNameOptional, default is empty string (default context). Context in which the property is set.
[in]fallBackOnDefaultContextOptional, default is false. Set property in default context if given context does not exist.
Precondition
If a context is specified by contextName, this context must be known by the owner or fallBackOnDefaultContext must be true. If violated an mitk::Exception is thrown.
propertyKey must be a none empty string. If violated an mitk::Exception is thrown.

Implements mitk::IPropertyOwner.

◆ SetRequestedRegion()

void mitk::DataNode::SetRequestedRegion ( const itk::DataObject *  data)
override

◆ SetRequestedRegionToLargestPossibleRegion()

void mitk::DataNode::SetRequestedRegionToLargestPossibleRegion ( )
override

◆ SetSelected()

void mitk::DataNode::SetSelected ( bool  selected,
const mitk::BaseRenderer renderer = nullptr 
)

set the node as selected

◆ SetStringProperty()

void mitk::DataNode::SetStringProperty ( const char *  propertyKey,
const char *  string,
const mitk::BaseRenderer renderer = nullptr 
)

Convenience method for setting string properties (instances of StringProperty)

◆ SetVisibility()

void mitk::DataNode::SetVisibility ( bool  visible,
const mitk::BaseRenderer renderer = nullptr,
const char *  propertyKey = "visible" 
)

Convenience method for setting visibility properties (instances of BoolProperty)

Parameters
visibleIf set to true, the data will be rendered. If false, the render will skip this data.
rendererSpecify a renderer if the visibility shall be specific to a renderer
propertyKeyCan be used to specify a user defined name of the visibility property.

◆ UpdateOutputInformation()

void mitk::DataNode::UpdateOutputInformation ( )
override

◆ VerifyRequestedRegion()

bool mitk::DataNode::VerifyRequestedRegion ( )
override

Member Data Documentation

◆ m_Data

BaseData::Pointer mitk::DataNode::m_Data
protected

The data object (instance of BaseData, e.g., an Image) managed by this DataNode.

Definition at line 593 of file mitkDataNode.h.

◆ m_DataInteractor

DataInteractor::Pointer mitk::DataNode::m_DataInteractor
protected

Definition at line 606 of file mitkDataNode.h.

◆ m_DataReferenceChangedTime

itk::TimeStamp mitk::DataNode::m_DataReferenceChangedTime
protected

Timestamp of the last change of m_Data.

Definition at line 609 of file mitkDataNode.h.

◆ m_MapOfPropertyLists

MapOfPropertyLists mitk::DataNode::m_MapOfPropertyLists
mutableprotected

Map associating each BaseRenderer with its own PropertyList.

Definition at line 604 of file mitkDataNode.h.

◆ m_Mappers

MapperVector mitk::DataNode::m_Mappers
mutableprotected

Mapper-slots.

Definition at line 587 of file mitkDataNode.h.

◆ m_PropertyList

PropertyList::Pointer mitk::DataNode::m_PropertyList
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 601 of file mitkDataNode.h.

◆ m_PropertyListModifiedObserverTag

unsigned long mitk::DataNode::m_PropertyListModifiedObserverTag
protected

Definition at line 611 of file mitkDataNode.h.


The documentation for this class was generated from the following file: