Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 // change number
18 #ifndef VTKMAPPER_H_HEADER_INCLUDED_C1C5453B
19 #define VTKMAPPER_H_HEADER_INCLUDED_C1C5453B
20 
21 #include "mitkBaseRenderer.h"
22 #include "mitkDataNode.h"
23 #include "mitkIShaderRepository.h"
25 #include "mitkMapper.h"
26 #include "mitkVtkPropRenderer.h"
27 #include <MitkCoreExports.h>
28 #include <mitkCoreServices.h>
29 
30 #include <vtkActor.h>
31 #include <vtkLinearTransform.h>
32 #include <vtkMapper.h>
33 #include <vtkPolyDataMapper.h>
34 #include <vtkProp3D.h>
35 #include <vtkProp3DCollection.h>
36 #include <vtkPropAssembly.h>
37 #include <vtkProperty.h>
38 
39 class vtkProp;
40 class vtkProp3D;
41 class vtkActor;
42 
43 namespace mitk
44 {
54  {
55  public:
57 
58  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) = 0;
59 
64  static void SetVtkMapperImmediateModeRendering(vtkMapper *mapper);
65 
70  DEPRECATED(virtual bool IsVtkBased() const override);
71 
78  void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override;
79 
81  virtual void MitkRenderOverlay(BaseRenderer *renderer);
82 
84  virtual void MitkRenderOpaqueGeometry(BaseRenderer *renderer);
85 
87  virtual void MitkRenderTranslucentGeometry(BaseRenderer *renderer);
88 
90  virtual void MitkRenderVolumetricGeometry(BaseRenderer *renderer);
91 
97  virtual bool HasVtkProp(const vtkProp *prop, BaseRenderer *renderer);
98 
111  virtual void UpdateVtkTransform(mitk::BaseRenderer *renderer);
112 
118  DEPRECATED(inline virtual void ApplyProperties(vtkActor *actor, mitk::BaseRenderer *renderer))
119  {
120  ApplyColorAndOpacityProperties(renderer, actor);
121  }
122 
126  void ApplyShaderProperties(mitk::BaseRenderer *renderer);
127 
132  virtual void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor) override;
133 
141  virtual void ReleaseGraphicsResources(mitk::BaseRenderer * /*renderer*/) {}
143  {
144  public:
146  itk::TimeStamp m_ModifiedTimeStamp;
147 
149  {
151  if (shaderRepo)
152  {
153  m_ShaderProgram = shaderRepo->CreateShaderProgram();
154  }
155  }
156 
158  };
159 
161 
162  protected:
164  VtkMapper();
165 
167  virtual ~VtkMapper();
168 
169  private:
171  VtkMapper(const VtkMapper &);
172 
174  VtkMapper &operator=(const VtkMapper &);
175  };
176 } // namespace mitk
177 #endif /* VTKMAPPER_H_HEADER_INCLUDED_C1C5453B */
Base class for mapper specific rendering ressources.
Definition: mitkMapper.h:200
#define MITKCORE_EXPORT
Templated class for management of LocalStorage implementations in Mappers.
Organizes the rendering process.
mitk::LocalStorageHandler< VtkMapperLocalStorage > m_VtkMapperLSH
static IShaderRepository * GetShaderRepository()
Get an IShaderRepository instance.
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:53
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:54
#define DEPRECATED(func)
Definition: mitkCommon.h:183
mitk::IShaderRepository::ShaderProgram::Pointer m_ShaderProgram
Management class for vtkShader XML descriptions.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
virtual ShaderProgram::Pointer CreateShaderProgram()=0
virtual void ReleaseGraphicsResources(mitk::BaseRenderer *)
Release vtk-based graphics resources that are being consumed by this mapper.