17 #ifndef DATATREENODE_H_HEADER_INCLUDED_C1E14338
18 #define DATATREENODE_H_HEADER_INCLUDED_C1E14338
24 #ifdef MBI_NO_STD_NAMESPACE
44 class vtkLinearTransform;
83 itkFactorylessNewMacro(
Self) itkCloneMacro(
Self)
98 vtkLinearTransform *GetVtkTransform(
int t = 0) const;
124 virtual
void UpdateOutputInformation() override;
126 virtual
void SetRequestedRegionToLargestPossibleRegion() override;
128 virtual
bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
130 virtual
bool VerifyRequestedRegion() override;
132 virtual
void SetRequestedRegion(const
itk::DataObject *data) override;
134 virtual
void CopyInformation(const
itk::DataObject *data) override;
142 PropertyListKeyNames GetPropertyListNames() const;
185 void AddProperty(const
char *propertyKey,
188 bool overwrite = false);
242 template <typename T>
243 bool GetProperty(
itk::SmartPointer<T> &property,
244 const
char *propertyKey,
247 property =
dynamic_cast<T *
>(GetProperty(propertyKey, renderer));
248 return property.IsNotNull();
262 template <
typename T>
265 property =
dynamic_cast<T *
>(GetProperty(propertyKey, renderer));
266 return property !=
nullptr;
274 template <
typename T>
287 GroupTagList GetGroupTags()
const;
294 bool GetBoolProperty(
const char *propertyKey,
bool &boolValue,
const mitk::BaseRenderer *renderer =
nullptr)
const;
308 bool GetFloatProperty(
const char *propertyKey,
321 bool GetDoubleProperty(
const char *propertyKey,
330 bool GetStringProperty(
const char *propertyKey,
339 bool GetColor(
float rgb[3],
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"color")
const;
348 const char *propertyKey =
"levelwindow")
const;
368 const char *propertyKey =
"name")
const
370 return GetStringProperty(propertyKey, nodeName, renderer);
415 return GetBoolProperty(propertyKey, visible, renderer);
423 bool GetOpacity(
float &opacity,
const mitk::BaseRenderer *renderer,
const char *propertyKey =
"opacity")
const;
436 if (propertyKey ==
nullptr)
438 GetBoolProperty(propertyKey, defaultIsOn, renderer);
454 const char *propertyKey =
"visible",
455 bool defaultIsOn =
true)
const
457 return IsOn(propertyKey, renderer, defaultIsOn);
466 const char *propertyKey =
"color");
472 void SetColor(
float red,
476 const char *propertyKey =
"color");
482 void SetColor(
const float rgb[3],
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"color");
491 void SetVisibility(
bool visible,
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"visible");
497 void SetOpacity(
float opacity,
const mitk::BaseRenderer *renderer =
nullptr,
const char *propertyKey =
"opacity");
505 const char *propertyKey =
"levelwindow");
517 void SetBoolProperty(
const char *propertyKey,
bool boolValue,
const mitk::BaseRenderer *renderer =
nullptr);
523 void SetFloatProperty(
const char *propertyKey,
float floatValue,
const mitk::BaseRenderer *renderer =
nullptr);
529 void SetDoubleProperty(
const char *propertyKey,
double doubleValue,
const mitk::BaseRenderer *renderer =
nullptr);
535 void SetStringProperty(
const char *propertyKey,
const char *
string,
const mitk::BaseRenderer *renderer =
nullptr);
541 virtual unsigned long GetMTime()
const override;
554 virtual void PropertyListModified(
const itk::Object *caller,
const itk::EventObject &event);
584 #if (_MSC_VER > 1200) || !defined(_MSC_VER)
591 #if ((defined(_MSC_VER)) && (_MSC_VER <= 1200))
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.
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
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
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 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...
DataCollection - Class to facilitate loading/accessing structured data.
MapOfPropertyLists m_MapOfPropertyLists
Map associating each BaseRenderer with its own PropertyList.
Key-value list holding instances of BaseProperty.
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.
virtual const char * GetValue() const
MITKCORE_EXPORT std::istream & operator>>(std::istream &i, DataNode::Pointer &dtn)
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 ...
virtual std::string GetName() const
Extra convenience access method for accessing the name of an object (instance of StringProperty with ...
T::Pointer GetData(const std::string &name)
The LevelWindow class Class to store level/window values.
Base class from with interactors that handle DataNodes are to be derived.
Abstract base class for properties.
unsigned long m_PropertyListModifiedObserverTag
#define mitkClassMacroItkParent(className, SuperClassName)
virtual void SetName(const char *name)
Extra convenience access method to set the name of an object.
bool GetPropertyValue(const char *propertyKey, T &value, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for GenericProperty properties (T being the type of the second parameter...
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
itkEventMacro(ContourModelEvent, itk::AnyEvent)
std::map< std::string, mitk::PropertyList::Pointer > MapOfPropertyLists
DataInteractor::Pointer m_DataInteractor
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...
unsigned long GetDataReferenceChangedTime() const
Get the timestamp of the last change of the reference to the BaseData.
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
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...
unsigned int MapperSlotId
Class for nodes of the DataTree.
virtual T GetValue() const