Medical Imaging Interaction Toolkit  2016.11.0
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,
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 #ifndef _MITK_CONTOURMODEL_MAPPER_3D_H_
18 #define _MITK_CONTOURMODEL_MAPPER_3D_H_
19 
20 #include "mitkCommon.h"
22 
23 #include "mitkBaseRenderer.h"
24 #include "mitkVtkMapper.h"
25 
26 #include "mitkContourModel.h"
27 //#include "mitkContourModelToVtkPolyDataFilter.h"
28 
29 #include <vtkActor.h>
30 #include <vtkPolyData.h>
31 #include <vtkPolyDataMapper.h>
32 #include <vtkProp.h>
33 #include <vtkSmartPointer.h>
34 #include <vtkTubeFilter.h>
35 
36 namespace mitk
37 {
39  {
40  public:
43 
45  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
46 
47  const mitk::ContourModel *GetInput(void);
48 
51  virtual void Update(mitk::BaseRenderer *renderer) override;
52 
53  /*+++ methods of MITK-VTK rendering pipeline +++*/
54  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
55 
56  /*+++ END methods of MITK-VTK rendering pipeline +++*/
57 
59  {
60  public:
62  vtkSmartPointer<vtkActor> m_Actor;
64  vtkSmartPointer<vtkPolyDataMapper> m_Mapper;
65 
66  vtkSmartPointer<vtkTubeFilter> m_TubeFilter;
67 
68  // mitk::ContourModelToVtkPolyDataFilter::Pointer m_contourToPolyData;
69 
70  vtkSmartPointer<vtkPolyData> m_OutlinePolyData;
71 
73  itk::TimeStamp m_LastUpdateTime;
74 
76  LocalStorage();
79  };
80 
83 
85  LocalStorage *GetLocalStorage(mitk::BaseRenderer *renderer);
86 
88  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = NULL, bool overwrite = false);
89 
90  protected:
92  virtual ~ContourModelMapper3D();
93 
94  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
95 
96  virtual vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromContour(mitk::ContourModel *inputContour);
97 
98  virtual void ApplyContourProperties(mitk::BaseRenderer *renderer);
99  };
100 }
101 #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:200
Organizes the rendering process.
#define MITKCONTOURMODEL_EXPORT
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:35
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:53
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:54
~LocalStorage()
Default deconstructor of the local storage.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
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:66