38 this->MitkRenderOpaqueGeometry(renderer);
41 this->MitkRenderTranslucentGeometry(renderer);
44 this->MitkRenderOverlay(renderer);
47 this->MitkRenderVolumetricGeometry(renderer);
65 GetDataNode()->GetVisibility(visible, renderer,
"visible");
69 if (this->GetVtkProp(renderer)->GetVisibility())
79 GetDataNode()->GetVisibility(visible, renderer,
"visible");
83 if (this->GetVtkProp(renderer)->GetVisibility())
85 GetVtkProp(renderer)->RenderOpaqueGeometry(renderer->
GetVtkRenderer());
92 GetDataNode()->GetVisibility(visible, renderer,
"visible");
96 if (this->GetVtkProp(renderer)->GetVisibility())
98 GetVtkProp(renderer)->RenderTranslucentPolygonalGeometry(renderer->
GetVtkRenderer());
115 GetDataNode()->GetVisibility(visible, renderer,
"visible");
119 if (GetVtkProp(renderer)->GetVisibility())
121 GetVtkProp(renderer)->RenderVolumetricGeometry(renderer->
GetVtkRenderer());
127 vtkProp *myProp = this->GetVtkProp(renderer);
130 return (prop == myProp);
141 vtkLinearTransform *vtktransform = GetDataNode()->GetVtkTransform(this->GetTimestep());
143 vtkProp3D *prop =
dynamic_cast<vtkProp3D *
>(GetVtkProp(renderer));
145 prop->SetUserTransform(vtktransform);
150 float rgba[4] = {1.0f, 1.0f, 1.0f, 1.0f};
154 node->
GetColor(rgba, renderer,
"color");
156 node->
GetOpacity(rgba[3], renderer,
"opacity");
158 double drgba[4] = {rgba[0], rgba[1], rgba[2], rgba[3]};
159 actor->GetProperty()->SetColor(drgba);
160 actor->GetProperty()->SetOpacity(drgba[3]);
virtual void MitkRenderTranslucentGeometry(BaseRenderer *renderer)
Checks visiblity and renders transparent geometry.
virtual bool HasVtkProp(const vtkProp *prop, BaseRenderer *renderer)
Returns true if this mapper owns the specified vtkProp for the given BaseRenderer.
Organizes the rendering process.
static IShaderRepository * GetShaderRepository()
Get an IShaderRepository instance.
virtual void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor) override
Apply color and opacity properties read from the PropertyList. Called by mapper subclasses.
void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override
Determines which geometry should be rendered (opaque, translucent, volumetric, overlay) and calls the...
virtual bool IsVtkBased() const override
Returns whether this is an vtk-based mapper.
mitk::IShaderRepository::ShaderProgram::Pointer m_ShaderProgram
virtual void MitkRenderVolumetricGeometry(BaseRenderer *renderer)
Checks visibility and renders volumes.
Management class for vtkShader XML descriptions.
bool GetOpacity(float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
virtual void MitkRenderOverlay(BaseRenderer *renderer)
Checks visibility and renders the overlay.
virtual void UpdateShaderProgram(mitk::IShaderRepository::ShaderProgram *shaderProgram, mitk::DataNode *node, mitk::BaseRenderer *renderer) const =0
Applies shader and shader specific variables of the specified DataNode to the VTK object by updating ...
virtual void UpdateVtkTransform(mitk::BaseRenderer *renderer)
Set the vtkTransform of the m_Prop3D for the current time step of renderer.
static void SetVtkMapperImmediateModeRendering(vtkMapper *mapper)
Re-issues all drawing commands required to describe the entire scene each time a new frame is require...
static bool useImmediateModeRendering()
virtual void MitkRenderOpaqueGeometry(BaseRenderer *renderer)
Checks visibility and renders untransparent geometry.
vtkRenderer * GetVtkRenderer() const
bool GetColor(float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") const
Convenience access method for color properties (instances of ColorProperty)
Class for nodes of the DataTree.
void ApplyShaderProperties(mitk::BaseRenderer *renderer)
SHADERTODO.