33 return m_DataNode == NULL ? NULL : m_DataNode->GetData();
38 return this->m_DataNode;
47 return node->
GetColor(rgb, renderer, name);
65 return node->
GetOpacity(opacity, renderer, name);
80 GetDataNode()->GetVisibility(visible, renderer, name);
86 if ((renderer != NULL) && (m_DataNode != NULL))
88 m_TimeStep = renderer->
GetTimeStep(m_DataNode->GetData());
98 if (GetOverlayManager())
99 GetOverlayManager()->AddBaseRenderer(renderer);
101 const DataNode *node = GetDataNode();
103 assert(node != NULL);
111 this->CalculateTimeStep(renderer);
115 if ((dataTimeGeometry == NULL) || (dataTimeGeometry->CountTimeSteps() == 0) ||
120 this->ResetMapper(renderer);
124 this->GenerateDataForRenderer(renderer);
125 if (GetOverlayManager())
126 GetOverlayManager()->UpdateOverlays(renderer);
133 if (mapper && m_LastGenerateDataTime < mapper->GetMTime())
138 if (m_LastGenerateDataTime < dataNode->GetDataReferenceChangedTime())
143 if (data && m_LastGenerateDataTime < data->GetMTime())
147 if (renderer && m_LastGenerateDataTime < renderer->GetTimeStepUpdateTime())
virtual ~Mapper()
virtual destructor in order to derive from this class
Base of all data objects.
Mapper()
explicit constructor which disallows implicit conversions
Organizes the rendering process.
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Base class of all mappers, Vtk as well as OpenGL mappers.
The LevelWindow class Class to store level/window values.
virtual bool GetVisibility(bool &visible, BaseRenderer *renderer, const char *name="visible") const
Convenience access method for visibility properties (instances of BoolProperty)
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 ...
bool IsGenerateDataRequired(mitk::BaseRenderer *renderer, mitk::Mapper *mapper, mitk::DataNode *dataNode) const
bool GetOpacity(float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
virtual bool GetLevelWindow(LevelWindow &levelWindow, BaseRenderer *renderer, const char *name="levelwindow") const
Convenience access method for color properties (instances of LevelWindoProperty)
virtual void Update(BaseRenderer *renderer)
Calls the time step of the input data for the specified renderer and checks whether the time step is ...
virtual OverlayManager * GetOverlayManager() const
virtual void CalculateTimeStep(BaseRenderer *renderer)
Updates the time step, which is sometimes needed in subclasses.
virtual bool GetColor(float rgb[3], BaseRenderer *renderer, const char *name="color") const
Convenience access method for color properties (instances of ColorProperty)
virtual unsigned int GetTimeStep() const
BaseData * GetData() const
Get the data to map.
virtual bool GetOpacity(float &opacity, BaseRenderer *renderer, const char *name="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
virtual bool IsVisible(BaseRenderer *renderer, const char *name="visible") const
Convenience access method for visibility properties (instances of BoolProperty). Return value is the ...
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) ...
virtual DataNode * GetDataNode() const
Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper...
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 GetColor(float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") const
Convenience access method for color properties (instances of ColorProperty)
virtual bool IsValidTimeStep(TimeStepType timeStep) const =0
Test for the given time step if a geometry is availible.
The OverlayManager updates and manages Overlays and the respective Layouters.
Class for nodes of the DataTree.
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
Set default values of properties used by this mapper to node.