Medical Imaging Interaction Toolkit  2016.11.0
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,
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_CONTOURMODELSET_MAPPER_3D_H_
18 #define _MITK_CONTOURMODELSET_MAPPER_3D_H_
19 
20 #include "mitkCommon.h"
22 
23 #include "mitkBaseRenderer.h"
24 #include "mitkVtkMapper.h"
25 
26 #include "mitkContourModel.h"
27 #include "mitkContourModelSet.h"
29 
30 #include <vtkActor.h>
31 #include <vtkAssembly.h>
32 #include <vtkPolyData.h>
33 #include <vtkPolyDataMapper.h>
34 #include <vtkProp.h>
35 #include <vtkSmartPointer.h>
36 #include <vtkTubeFilter.h>
37 
38 namespace mitk
39 {
41  {
42  public:
45 
47  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
48 
49  const mitk::ContourModelSet *GetInput(void);
50 
53  virtual void Update(mitk::BaseRenderer *renderer) override;
54 
55  /*+++ methods of MITK-VTK rendering pipeline +++*/
56  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
57 
58  /*+++ END methods of MITK-VTK rendering pipeline +++*/
59 
61  {
62  public:
64  vtkSmartPointer<vtkAssembly> m_Assembly;
65 
67 
69  itk::TimeStamp m_LastUpdateTime;
70 
72  LocalStorage();
75  };
76 
79 
81  LocalStorage *GetLocalStorage(mitk::BaseRenderer *renderer);
82 
84  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = NULL, bool overwrite = false);
85 
86  protected:
88  virtual ~ContourModelSetMapper3D();
89 
90  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
91 
92  virtual vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromContour(mitk::ContourModel *inputContour,
93  mitk::BaseRenderer *renderer);
94 
95  virtual void ApplyContourProperties(mitk::BaseRenderer *renderer);
96  virtual void ApplyContourModelSetProperties(BaseRenderer *renderer);
97  };
98 }
99 #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.
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
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
~LocalStorage()
Default deconstructor of the local storage.
mitk::ContourModelToSurfaceFilter::Pointer m_contourToPolyData
vtkSmartPointer< vtkAssembly > m_Assembly
Assembly of contours.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66