Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Class for nodes of the DataTree. More...
#include <mitkDataNode.h>
Public Types | |
typedef mitk::Geometry3D::Pointer | Geometry3DPointer |
typedef std::vector< itk::SmartPointer< Mapper > > | MapperVector |
typedef std::map< std::string, mitk::PropertyList::Pointer > | MapOfPropertyLists |
typedef std::vector< MapOfPropertyLists::key_type > | PropertyListKeyNames |
typedef std::set< std::string > | GroupTagList |
typedef DataNode | Self |
typedef itk::DataObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
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... | |
BaseProperty * | GetNonConstProperty (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::Mapper * | GetMapper (MapperSlotId id) const |
BaseData * | GetData () 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::DataNode & | operator= (const DataNode &right) |
mitk::DataNode & | operator= (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::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 |
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 (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 |
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).
SetProperty( "key", new SomeProperty("value") )
. Definition at line 63 of file mitkDataNode.h.
typedef itk::SmartPointer<const Self> mitk::DataNode::ConstPointer |
Definition at line 72 of file mitkDataNode.h.
Definition at line 66 of file mitkDataNode.h.
typedef std::set<std::string> mitk::DataNode::GroupTagList |
Definition at line 70 of file mitkDataNode.h.
typedef std::map<std::string, mitk::PropertyList::Pointer> mitk::DataNode::MapOfPropertyLists |
Definition at line 68 of file mitkDataNode.h.
typedef std::vector<itk::SmartPointer<Mapper> > mitk::DataNode::MapperVector |
Definition at line 67 of file mitkDataNode.h.
typedef itk::SmartPointer<Self> mitk::DataNode::Pointer |
Definition at line 72 of file mitkDataNode.h.
typedef std::vector<MapOfPropertyLists::key_type> mitk::DataNode::PropertyListKeyNames |
Definition at line 69 of file mitkDataNode.h.
typedef DataNode mitk::DataNode::Self |
Definition at line 72 of file mitkDataNode.h.
typedef itk::DataObject mitk::DataNode::Superclass |
Definition at line 72 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 |
bool mitk::DataNode::GetBoolProperty | ( | const char * | propertyKey, |
bool & | boolValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) | const |
Convenience access method for bool properties (instances of BoolProperty)
|
inlinevirtual |
Definition at line 72 of file mitkDataNode.h.
|
virtual |
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)
|
overridevirtual |
Get property by its key.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given 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().
|
virtual |
|
inline |
Get the timestamp of the last change of the reference to the BaseData.
Definition at line 576 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 givenpropertyKey
argument, the method looks for a corresponding FloatProperty instance.
bool mitk::DataNode::GetFloatProperty | ( | const char * | propertyKey, |
float & | floatValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) | const |
Convenience access method for float properties (instances of FloatProperty)
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)
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)
mitk::Mapper* mitk::DataNode::GetMapper | ( | MapperSlotId | id | ) | const |
|
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 385 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 369 of file mitkDataNode.h.
|
overridevirtual |
Get property by its key.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given 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)
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 246 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 266 of file mitkDataNode.h.
|
overridevirtual |
|
overridevirtual |
Query keys of existing properties.
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | includeDefaultContext | Optional, default is false. Include default context. |
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 |
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 (T being the type of the second parameter)
Definition at line 278 of file mitkDataNode.h.
References mitk::GenericProperty< T >::GetValue().
|
inlinestatic |
Definition at line 72 of file mitkDataNode.h.
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)
|
inline |
Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")
Definition at line 442 of file mitkDataNode.h.
vtkLinearTransform* mitk::DataNode::GetVtkTransform | ( | int | t = 0 | ) | const |
Get the transformation applied prior to displaying the data as a vtkTransform.
|
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 463 of file mitkDataNode.h.
bool mitk::DataNode::IsSelected | ( | const mitk::BaseRenderer * | renderer = nullptr | ) |
set the node as selected
|
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 482 of file mitkDataNode.h.
|
static |
|
inlinestatic |
Value constant that is used indicate that node names are not set so far.
Definition at line 394 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 |
Removes a property. If the property does not exist, nothing will be done.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is removed. |
[in] | fallBackOnDefaultContext | Optional, default is false. Remove property in default context if given context does not exist. |
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 |
void mitk::DataNode::SetBoolProperty | ( | const char * | propertyKey, |
bool | boolValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
Convenience method for setting boolean properties (instances of BoolProperty)
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)
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)
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)
|
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 Interactor.
void mitk::DataNode::SetDoubleProperty | ( | const char * | propertyKey, |
double | doubleValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
Convenience method for setting double properties (instances of DoubleProperty)
void mitk::DataNode::SetFloatProperty | ( | const char * | propertyKey, |
float | floatValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
Convenience method for setting float properties (instances of FloatProperty)
void mitk::DataNode::SetIntProperty | ( | const char * | propertyKey, |
int | intValue, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
Convenience method for setting int properties (instances of IntProperty)
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)
|
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 405 of file mitkDataNode.h.
References mitk::StringProperty::SetValue().
|
inlinevirtual |
Extra convenience access method to set the name of an object.
Definition at line 435 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)
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 |
Add new or change existent property.
[in] | propertyKey | Key of property. |
[in] | property | The actual property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is set. |
[in] | fallBackOnDefaultContext | Optional, default is false. Set property in default context if given context does not exist. |
Implements mitk::IPropertyOwner.
|
override |
|
override |
void mitk::DataNode::SetSelected | ( | bool | selected, |
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
set the node as selected
void mitk::DataNode::SetStringProperty | ( | const char * | propertyKey, |
const char * | string, | ||
const mitk::BaseRenderer * | renderer = nullptr |
||
) |
Convenience method for setting string properties (instances of StringProperty)
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 |
|
override |
|
protected |
The data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Definition at line 593 of file mitkDataNode.h.
|
protected |
Definition at line 606 of file mitkDataNode.h.
|
protected |
Timestamp of the last change of m_Data.
Definition at line 609 of file mitkDataNode.h.
|
mutableprotected |
Map associating each BaseRenderer with its own PropertyList.
Definition at line 604 of file mitkDataNode.h.
|
mutableprotected |
Mapper-slots.
Definition at line 587 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 601 of file mitkDataNode.h.
|
protected |
Definition at line 611 of file mitkDataNode.h.