42 return node->
GetColor(rgb, renderer, name);
60 return node->
GetOpacity(opacity, renderer, name);
81 if ((renderer !=
nullptr) && (
m_DataNode !=
nullptr))
95 assert(node !=
nullptr);
106 const TimeGeometry *dataTimeGeometry = data->GetTimeGeometry();
107 if ((dataTimeGeometry ==
nullptr) || (dataTimeGeometry->
CountTimeSteps() == 0) ||
123 if (mapper && m_LastGenerateDataTime < mapper->GetMTime())
128 if (m_LastGenerateDataTime < dataNode->GetDataReferenceChangedTime())
133 if (data && m_LastGenerateDataTime < data->GetMTime())
137 if (renderer && m_LastGenerateDataTime < renderer->GetTimeStepUpdateTime())
virtual TimeStepType CountTimeSteps() const =0
Returns the number of time steps.
Base of all data objects.
Mapper()
explicit constructor which disallows implicit conversions
bool IsGenerateDataRequired(mitk::BaseRenderer *renderer, mitk::Mapper *mapper, mitk::DataNode *dataNode) const
virtual DataNode * GetDataNode() const
Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper...
virtual bool GetLevelWindow(LevelWindow &levelWindow, BaseRenderer *renderer, const char *name="levelwindow") const
Convenience access method for color properties (instances of LevelWindoProperty)
Organizes the rendering process.
bool GetOpacity(float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
Base class of all mappers, Vtk as well as OpenGL mappers.
virtual bool IsVisible(BaseRenderer *renderer, const char *name="visible") const
Convenience access method for visibility properties (instances of BoolProperty). Return value is the ...
static std::string NO_NAME_VALUE()
The LevelWindow class Class to store level/window values.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
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 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 GetVisibility(bool &visible, BaseRenderer *renderer, const char *name="visible") const
Convenience access method for visibility properties (instances of BoolProperty)
virtual bool GetOpacity(float &opacity, BaseRenderer *renderer, const char *name="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
virtual unsigned int GetTimeStep() const
mitk::DataNode * m_DataNode
virtual bool GetColor(float rgb[3], BaseRenderer *renderer, const char *name="color") const
Convenience access method for color properties (instances of ColorProperty)
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...
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 void ResetMapper(BaseRenderer *)
Reset the mapper (i.e., make sure that nothing is displayed) if no valid data is present. In most cases the reimplemented function disables the according actors (toggling visibility off)
virtual void GenerateDataForRenderer(BaseRenderer *)
Generate the data needed for rendering into renderer.
~Mapper() override
virtual destructor in order to derive from this class
virtual void CalculateTimeStep(BaseRenderer *renderer)
Updates the time step, which is sometimes needed in subclasses.
BaseData * GetData() const
Get the data to map.
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 bool IsValidTimeStep(TimeStepType timeStep) const =0
Test for the given time step if a geometry is availible.
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.