Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkContourModelMapper2D.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_H_
18 #define _MITK_CONTOURMODEL_MAPPER_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 
35 namespace mitk
36 {
38  {
39  public:
42 
44  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
45 
46  const mitk::ContourModel *GetInput(void);
47 
50  virtual void Update(mitk::BaseRenderer *renderer) override;
51 
52  /*+++ methods of MITK-VTK rendering pipeline +++*/
53  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
54  /*+++ END methods of MITK-VTK rendering pipeline +++*/
55 
57  {
58  public:
60  vtkSmartPointer<vtkActor> m_Actor;
62  vtkSmartPointer<vtkPolyDataMapper> m_Mapper;
63 
64  // mitk::ContourModelToVtkPolyDataFilter::Pointer m_contourToPolyData;
65 
66  vtkSmartPointer<vtkPolyData> m_OutlinePolyData;
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 ~ContourModelMapper2D();
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  };
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: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
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
vtkSmartPointer< vtkPolyDataMapper > m_Mapper
Mapper of a 2D render window.
vtkSmartPointer< vtkActor > m_Actor
Actor of a 2D render window.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
~LocalStorage()
Default deconstructor of the local storage.
vtkSmartPointer< vtkPolyData > m_OutlinePolyData
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66