Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkGizmoMapper2D.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 mitkGizmoMapper2D_h
14 #define mitkGizmoMapper2D_h
15 
16 #include <mitkVtkMapper.h>
17 
18 #include <vtkPolyDataMapper.h>
19 
20 namespace mitk
21 {
22  // forward declaration
23  class Gizmo;
24 
36  {
37  public:
39  itkFactorylessNewMacro(Self);
40  itkCloneMacro(Self);
41 
47  static void SetDefaultProperties(mitk::DataNode *node,
48  mitk::BaseRenderer *renderer = nullptr,
49  bool overwrite = false);
50 
52  vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override { return m_LSH.GetLocalStorage(renderer)->m_Actor; }
54  void ResetMapper(mitk::BaseRenderer *renderer) override;
55 
58  vtkPolyData *GetVtkPolyData(mitk::BaseRenderer *renderer);
59 
60  private:
62  const Gizmo *GetInput();
63 
65  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
66 
68  void ApplyVisualProperties(BaseRenderer *renderer);
69 
71  class LocalStorage : public Mapper::BaseLocalStorage
72  {
73  public:
76 
79  vtkSmartPointer<vtkPolyDataMapper> m_VtkPolyDataMapper;
80 
82  itk::TimeStamp m_LastUpdateTime;
83 
84  LocalStorage();
85  };
86 
88  LocalStorageHandler<LocalStorage> m_LSH;
89  };
90 
91 } // namespace
92 
93 #endif
mitk::GizmoMapper2D::ResetMapper
void ResetMapper(mitk::BaseRenderer *renderer) override
"Resets" the mapper, setting its result to invisible.
mitk::GizmoMapper2D
Definition: mitkGizmoMapper2D.h:35
mitk::GizmoMapper2D::GetVtkPolyData
vtkPolyData * GetVtkPolyData(mitk::BaseRenderer *renderer)
mitk::GizmoMapper2D::mitkClassMacro
mitkClassMacro(GizmoMapper2D, VtkMapper)
vtkSmartPointer< vtkActor >
mitk::GizmoMapper2D::GetVtkProp
vtkProp * GetVtkProp(mitk::BaseRenderer *renderer) override
Return the vtkProp that represents the "rendering result".
Definition: mitkGizmoMapper2D.h:52
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::GizmoMapper2D::SetDefaultProperties
static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
mitk::Gizmo
Definition: mitkGizmo.h:49
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
mitkVtkMapper.h
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitk::LocalStorageHandler::GetLocalStorage
L * GetLocalStorage(mitk::BaseRenderer *forRenderer)
Retrieves a LocalStorage for a specific BaseRenderer.
Definition: mitkLocalStorageHandler.h:83
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63