Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkContourModelSetMapper3D.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 mitkContourModelSetMapper3D_h
14 #define mitkContourModelSetMapper3D_h
15 
16 #include "mitkCommon.h"
18 
19 #include "mitkBaseRenderer.h"
20 #include "mitkVtkMapper.h"
21 
22 #include "mitkContourModel.h"
23 #include "mitkContourModelSet.h"
25 
26 #include <vtkActor.h>
27 #include <vtkAssembly.h>
28 #include <vtkPolyData.h>
29 #include <vtkPolyDataMapper.h>
30 #include <vtkProp.h>
31 #include <vtkSmartPointer.h>
32 #include <vtkTubeFilter.h>
33 
34 namespace mitk
35 {
37  {
38  public:
41 
43  itkFactorylessNewMacro(Self);
44  itkCloneMacro(Self);
45 
46  const mitk::ContourModelSet *GetInput(void);
47 
50  void Update(mitk::BaseRenderer *renderer) override;
51 
52  /*+++ methods of MITK-VTK rendering pipeline +++*/
53  vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
54 
55  /*+++ END methods of MITK-VTK rendering pipeline +++*/
56 
58  {
59  public:
62 
64 
66  itk::TimeStamp m_LastUpdateTime;
67 
69  LocalStorage();
71  ~LocalStorage() override {}
72  };
73 
76 
78  LocalStorage *GetLocalStorage(mitk::BaseRenderer *renderer);
79 
81  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = nullptr, bool overwrite = false);
82 
83  protected:
85  ~ContourModelSetMapper3D() override;
86 
87  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
88 
89  virtual vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromContour(mitk::ContourModel *inputContour,
90  mitk::BaseRenderer *renderer);
91 
92  virtual void ApplyContourProperties(mitk::BaseRenderer *renderer);
93  virtual void ApplyContourModelSetProperties(BaseRenderer *renderer);
94  };
95 }
96 #endif
mitk::ContourModelSetMapper3D::LocalStorage::~LocalStorage
~LocalStorage() override
Default deconstructor of the local storage.
Definition: mitkContourModelSetMapper3D.h:71
mitk::ContourModelSetMapper3D
Definition: mitkContourModelSetMapper3D.h:36
mitk::ContourModelSetMapper3D::LocalStorage::m_LastUpdateTime
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Definition: mitkContourModelSetMapper3D.h:66
mitk::ContourModelSetMapper3D::LocalStorage
Definition: mitkContourModelSetMapper3D.h:57
mitk::ContourModelSetMapper3D::m_LSH
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
Definition: mitkContourModelSetMapper3D.h:75
mitk::SurfaceSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkSurfaceSource.h:36
mitkContourModelSet.h
vtkSmartPointer< vtkAssembly >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkContourModel.h
MitkContourModelExports.h
mitk::LocalStorageHandler< LocalStorage >
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
mitkContourModelToSurfaceFilter.h
mitk::Mapper::BaseLocalStorage
Base class for mapper specific rendering resources.
Definition: mitkMapper.h:190
mitk::ContourModel
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Definition: mitkContourModel.h:47
mitkCommon.h
mitk::ContourModelSetMapper3D::LocalStorage::m_contourToPolyData
mitk::ContourModelToSurfaceFilter::Pointer m_contourToPolyData
Definition: mitkContourModelSetMapper3D.h:63
mitk::ContourModelSetMapper3D::LocalStorage::m_Assembly
vtkSmartPointer< vtkAssembly > m_Assembly
Assembly of contours.
Definition: mitkContourModelSetMapper3D.h:61
mitkVtkMapper.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
MITKCONTOURMODEL_EXPORT
#define MITKCONTOURMODEL_EXPORT
Definition: MitkContourModelExports.h:15
mitk::ContourModelSet
Definition: mitkContourModelSet.h:26
mitkBaseRenderer.h
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitk::ROIMapperHelper::SetDefaultProperties
void SetDefaultProperties(DataNode *node, BaseRenderer *renderer, bool override)
Set common default properties for both 2-d and 3-d ROI mappers.