Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkVtkMapper.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkVtkMapper_h
14 #define mitkVtkMapper_h
15 
16 #include "mitkBaseRenderer.h"
17 #include "mitkDataNode.h"
19 #include "mitkMapper.h"
20 #include "mitkVtkPropRenderer.h"
21 #include <MitkCoreExports.h>
22 #include <mitkCoreServices.h>
23 
24 #include <vtkActor.h>
25 #include <vtkLinearTransform.h>
26 #include <vtkMapper.h>
27 #include <vtkPolyDataMapper.h>
28 #include <vtkProp3D.h>
29 #include <vtkProp3DCollection.h>
30 #include <vtkPropAssembly.h>
31 #include <vtkProperty.h>
32 
33 class vtkProp;
34 class vtkProp3D;
35 class vtkActor;
36 
37 namespace mitk
38 {
48  {
49  public:
51 
52  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) = 0;
53 
58  DEPRECATED(virtual bool IsVtkBased() const override);
59 
66  void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override;
67 
69  virtual void MitkRenderOverlay(BaseRenderer *renderer);
70 
72  virtual void MitkRenderOpaqueGeometry(BaseRenderer *renderer);
73 
75  virtual void MitkRenderTranslucentGeometry(BaseRenderer *renderer);
76 
78  virtual void MitkRenderVolumetricGeometry(BaseRenderer *renderer);
79 
85  virtual bool HasVtkProp(const vtkProp *prop, BaseRenderer *renderer);
86 
99  virtual void UpdateVtkTransform(mitk::BaseRenderer *renderer);
100 
106  DEPRECATED(inline virtual void ApplyProperties(vtkActor *actor, mitk::BaseRenderer *renderer))
107  {
108  ApplyColorAndOpacityProperties(renderer, actor);
109  }
110 
115 
120  void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor) override;
121 
129  virtual void ReleaseGraphicsResources(mitk::BaseRenderer * /*renderer*/) {}
130 
132  {
133  };
134 
135  protected:
137  VtkMapper();
138 
140  ~VtkMapper() override;
141 
142  private:
144  VtkMapper(const VtkMapper &);
145 
147  VtkMapper &operator=(const VtkMapper &);
148  };
149 } // namespace mitk
150 #endif
mitkLocalStorageHandler.h
mitk::VtkPropRenderer::RenderType
RenderType
Definition: mitkVtkPropRenderer.h:71
mitkVtkPropRenderer.h
mitk::VtkMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(mitk::BaseRenderer *)
Release vtk-based graphics resources that are being consumed by this mapper.
Definition: mitkVtkMapper.h:129
DEPRECATED
#define DEPRECATED(func)
Definition: mitkCommon.h:175
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkMapper.h
mitkCoreServices.h
mitk::VtkMapper::LocalStorage
Definition: mitkVtkMapper.h:131
MitkCoreExports.h
mitk::Mapper
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:46
mitk::VtkMapper
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:47
mitk::Mapper::BaseLocalStorage
Base class for mapper specific rendering resources.
Definition: mitkMapper.h:190
mitk::VtkMapper::ApplyShaderProperties
void ApplyShaderProperties(mitk::BaseRenderer *)
Definition: mitkVtkMapper.h:114
mitkDataNode.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitkBaseRenderer.h
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::VtkMapper::ApplyProperties
virtual void ApplyProperties(vtkActor *actor, mitk::BaseRenderer *renderer)
Apply color and opacity properties read from the PropertyList.
Definition: mitkVtkMapper.h:106