Medical Imaging Interaction Toolkit  2018.04.99-aba3194f
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 // change number
14 #ifndef VTKMAPPER_H_HEADER_INCLUDED_C1C5453B
15 #define VTKMAPPER_H_HEADER_INCLUDED_C1C5453B
16 
17 #include "mitkBaseRenderer.h"
18 #include "mitkDataNode.h"
20 #include "mitkMapper.h"
21 #include "mitkVtkPropRenderer.h"
22 #include <MitkCoreExports.h>
23 #include <mitkCoreServices.h>
24 
25 #include <vtkActor.h>
26 #include <vtkLinearTransform.h>
27 #include <vtkMapper.h>
28 #include <vtkPolyDataMapper.h>
29 #include <vtkProp3D.h>
30 #include <vtkProp3DCollection.h>
31 #include <vtkPropAssembly.h>
32 #include <vtkProperty.h>
33 
34 class vtkProp;
35 class vtkProp3D;
36 class vtkActor;
37 
38 namespace mitk
39 {
49  {
50  public:
52 
53  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) = 0;
54 
59  DEPRECATED(virtual bool IsVtkBased() const override);
60 
67  void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override;
68 
70  virtual void MitkRenderOverlay(BaseRenderer *renderer);
71 
73  virtual void MitkRenderOpaqueGeometry(BaseRenderer *renderer);
74 
76  virtual void MitkRenderTranslucentGeometry(BaseRenderer *renderer);
77 
79  virtual void MitkRenderVolumetricGeometry(BaseRenderer *renderer);
80 
86  virtual bool HasVtkProp(const vtkProp *prop, BaseRenderer *renderer);
87 
100  virtual void UpdateVtkTransform(mitk::BaseRenderer *renderer);
101 
107  DEPRECATED(inline virtual void ApplyProperties(vtkActor *actor, mitk::BaseRenderer *renderer))
108  {
109  ApplyColorAndOpacityProperties(renderer, actor);
110  }
111 
116 
121  void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor) override;
122 
130  virtual void ReleaseGraphicsResources(mitk::BaseRenderer * /*renderer*/) {}
131 
133  {
134  };
135 
136  protected:
138  VtkMapper();
139 
141  ~VtkMapper() override;
142 
143  private:
145  VtkMapper(const VtkMapper &);
146 
148  VtkMapper &operator=(const VtkMapper &);
149  };
150 } // namespace mitk
151 #endif /* VTKMAPPER_H_HEADER_INCLUDED_C1C5453B */
Base class for mapper specific rendering ressources.
Definition: mitkMapper.h:193
#define MITKCORE_EXPORT
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
virtual void ApplyProperties(vtkActor *actor, mitk::BaseRenderer *renderer)
Apply color and opacity properties read from the PropertyList.
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:48
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:49
#define DEPRECATED(func)
Definition: mitkCommon.h:179
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
void ApplyShaderProperties(mitk::BaseRenderer *)
virtual void ReleaseGraphicsResources(mitk::BaseRenderer *)
Release vtk-based graphics resources that are being consumed by this mapper.