Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkContourModelMapper3D.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 _MITK_CONTOURMODEL_MAPPER_3D_H_
14 #define _MITK_CONTOURMODEL_MAPPER_3D_H_
15 
16 #include "mitkCommon.h"
18 
19 #include "mitkBaseRenderer.h"
20 #include "mitkVtkMapper.h"
21 
22 #include "mitkContourModel.h"
23 //#include "mitkContourModelToVtkPolyDataFilter.h"
24 
25 #include <vtkActor.h>
26 #include <vtkPolyData.h>
27 #include <vtkPolyDataMapper.h>
28 #include <vtkProp.h>
29 #include <vtkSmartPointer.h>
30 #include <vtkTubeFilter.h>
31 
32 namespace mitk
33 {
35  {
36  public:
39 
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
44  const mitk::ContourModel *GetInput(void);
45 
48  void Update(mitk::BaseRenderer *renderer) override;
49 
50  /*+++ methods of MITK-VTK rendering pipeline +++*/
51  vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
52 
53  /*+++ END methods of MITK-VTK rendering pipeline +++*/
54 
56  {
57  public:
59  vtkSmartPointer<vtkActor> m_Actor;
61  vtkSmartPointer<vtkPolyDataMapper> m_Mapper;
62 
63  vtkSmartPointer<vtkTubeFilter> m_TubeFilter;
64 
65  // mitk::ContourModelToVtkPolyDataFilter::Pointer m_contourToPolyData;
66 
67  vtkSmartPointer<vtkPolyData> m_OutlinePolyData;
68 
70  itk::TimeStamp m_LastUpdateTime;
71 
73  LocalStorage();
75  ~LocalStorage() override {}
76  };
77 
80 
82  LocalStorage *GetLocalStorage(mitk::BaseRenderer *renderer);
83 
85  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = nullptr, bool overwrite = false);
86 
87  protected:
89  ~ContourModelMapper3D() override;
90 
91  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
92 
93  virtual vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromContour(mitk::ContourModel *inputContour);
94 
95  virtual void ApplyContourProperties(mitk::BaseRenderer *renderer);
96  };
97 }
98 #endif
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Base class for mapper specific rendering ressources.
Definition: mitkMapper.h:193
Organizes the rendering process.
#define MITKCONTOURMODEL_EXPORT
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
DataCollection - Class to facilitate loading/accessing structured data.
vtkSmartPointer< vtkTubeFilter > m_TubeFilter
vtkSmartPointer< vtkPolyDataMapper > m_Mapper
Mapper of a 2D render window.
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 mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
~LocalStorage() override
Default deconstructor of the local storage.
vtkSmartPointer< vtkPolyData > m_OutlinePolyData
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
vtkSmartPointer< vtkActor > m_Actor
Actor of a 2D render window.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57