13 #ifndef DATATREENODE_H_HEADER_INCLUDED_C1E14338 14 #define DATATREENODE_H_HEADER_INCLUDED_C1E14338 35 class vtkLinearTransform;
73 itkFactorylessNewMacro(
Self);
76 BaseProperty::ConstPointer GetConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
const override;
77 std::vector<std::string> GetPropertyKeys(
const std::string &contextName =
"",
bool includeDefaultContext =
false)
const override;
78 std::vector<std::string> GetPropertyContextNames()
const override;
81 BaseProperty * GetNonConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
override;
82 void SetProperty(
const std::string &propertyKey,
BaseProperty *property,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
83 void RemoveProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
98 vtkLinearTransform *GetVtkTransform(
int t = 0)
const;
124 void UpdateOutputInformation()
override;
126 void SetRequestedRegionToLargestPossibleRegion()
override;
128 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
130 bool VerifyRequestedRegion()
override;
132 void SetRequestedRegion(
const itk::DataObject *data)
override;
134 void CopyInformation(
const itk::DataObject *data)
override;
142 PropertyListKeyNames GetPropertyListNames()
const;
185 void AddProperty(
const char *propertyKey,
188 bool overwrite =
false);
245 template <
typename T>
247 const char *propertyKey,
250 property =
dynamic_cast<T *
>(GetProperty(propertyKey, renderer));
251 return property.IsNotNull();
265 template <
typename T>
268 property =
dynamic_cast<T *
>(GetProperty(propertyKey, renderer));
269 return property !=
nullptr;
277 template <
typename T>
290 GroupTagList GetGroupTags()
const;
297 bool GetBoolProperty(
const char *propertyKey,
bool &boolValue,
const mitk::BaseRenderer *renderer =
nullptr)
const;
304 bool GetIntProperty(
const char *propertyKey,
int &intValue,
const mitk::BaseRenderer *renderer =
nullptr)
const;
311 bool GetFloatProperty(
const char *propertyKey,
324 bool GetDoubleProperty(
const char *propertyKey,
333 bool GetStringProperty(
const char *propertyKey,
342 bool GetColor(
float rgb[3],
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"color")
const;
351 const char *propertyKey =
"levelwindow")
const;
371 const char *propertyKey =
"name")
const 373 return GetStringProperty(propertyKey, nodeName, renderer);
424 return GetBoolProperty(propertyKey, visible, renderer);
432 bool GetOpacity(
float &opacity,
const mitk::BaseRenderer *renderer,
const char *propertyKey =
"opacity")
const;
445 if (propertyKey ==
nullptr)
447 GetBoolProperty(propertyKey, defaultIsOn, renderer);
463 const char *propertyKey =
"visible",
464 bool defaultIsOn =
true)
const 466 return IsOn(propertyKey, renderer, defaultIsOn);
475 const char *propertyKey =
"color");
481 void SetColor(
float red,
485 const char *propertyKey =
"color");
491 void SetColor(
const float rgb[3],
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"color");
500 void SetVisibility(
bool visible,
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"visible");
506 void SetOpacity(
float opacity,
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"opacity");
514 const char *propertyKey =
"levelwindow");
520 void SetIntProperty(
const char *propertyKey,
int intValue,
const mitk::BaseRenderer *renderer =
nullptr);
526 void SetBoolProperty(
const char *propertyKey,
bool boolValue,
const mitk::BaseRenderer *renderer =
nullptr);
532 void SetFloatProperty(
const char *propertyKey,
float floatValue,
const mitk::BaseRenderer *renderer =
nullptr);
538 void SetDoubleProperty(
const char *propertyKey,
double doubleValue,
const mitk::BaseRenderer *renderer =
nullptr);
544 void SetStringProperty(
const char *propertyKey,
const char *
string,
const mitk::BaseRenderer *renderer =
nullptr);
550 itk::ModifiedTimeType GetMTime()
const override;
564 virtual void PropertyListModified(
const itk::Object *caller,
const itk::EventObject &event);
virtual std::string GetName() const
Extra convenience access method for accessing the name of an object (instance of StringProperty with ...
virtual void SetName(const std::string name)
Extra convenience access method to set the name of an object.
mitk::Geometry3D::Pointer Geometry3DPointer
MapperVector m_Mappers
Mapper-slots.
std::set< std::string > GroupTagList
virtual const char * GetValue() const
std::vector< MapOfPropertyLists::key_type > PropertyListKeyNames
Base of all data objects.
itk::TimeStamp m_DataReferenceChangedTime
Timestamp of the last change of m_Data.
PropertyList::Pointer m_PropertyList
BaseRenderer-independent PropertyList.
Organizes the rendering process.
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.
DataCollection - Class to facilitate loading/accessing structured data.
MapOfPropertyLists m_MapOfPropertyLists
Map associating each BaseRenderer with its own PropertyList.
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...
Key-value list holding instances of BaseProperty.
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.
Base class of all mappers, Vtk as well as OpenGL mappers.
BaseData::Pointer m_Data
The data object (instance of BaseData, e.g., an Image) managed by this DataNode.
static std::string NO_NAME_VALUE()
virtual T GetValue() const
The LevelWindow class Class to store level/window values.
Abstract base class for properties.
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 ...
unsigned long m_PropertyListModifiedObserverTag
unsigned long GetDataReferenceChangedTime() const
Get the timestamp of the last change of the reference to the BaseData.
#define mitkClassMacroItkParent(className, SuperClassName)
itkEventMacroDeclaration(BoundingShapeInteractionEvent, itk::AnyEvent)
virtual void SetName(const char *name)
Extra convenience access method to set the name of an object.
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 "vis...
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 val...
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
std::map< std::string, mitk::PropertyList::Pointer > MapOfPropertyLists
DataInteractor::Pointer m_DataInteractor
MITKCORE_EXPORT std::istream & operator>>(std::istream &i, DataNode::Pointer &dtn)
static const char * replace[]
This is a dictionary to replace long names of classes, modules, etc. to shorter versions in the conso...
std::vector< itk::SmartPointer< Mapper > > MapperVector
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
unsigned int MapperSlotId
Class for nodes of the DataTree.
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 proper...