]> Creatis software - creaMaracasVisu.git/blob - lib/Kernel/VTKObjects/SurfaceRenderer/wxMaracasSurfaceRenderingManagerDataMhd.h
addition of image stencil to surface rendering
[creaMaracasVisu.git] / lib / Kernel / VTKObjects / SurfaceRenderer / wxMaracasSurfaceRenderingManagerDataMhd.h
1 #ifndef WXMARACASSURFACERENDERINGMANAGERDATAMHD_H_
2 #define WXMARACASSURFACERENDERINGMANAGERDATAMHD_H_
3
4
5 #include "wxMaracasSurfaceRenderingManagerData.h"
6 #include "boxSurfaceObserver.h"
7
8 #include "vtkMetaImageReader.h"
9 #include "vtkMarchingCubes.h"
10 #include "vtkCleanPolyData.h"
11 #include "vtkImageData.h"
12 #include "vtkClipPolyData.h"
13 #include "vtkPlanes.h"
14 #include "vtkImageThreshold.h"
15 #include "vtkSmoothPolyDataFilter.h"
16
17 class wxMaracasSurfaceRenderingManagerDataMhd : public wxMaracasSurfaceRenderingManagerData  {
18
19 public:
20         
21         wxMaracasSurfaceRenderingManagerDataMhd(vtkImageData* imagedata, std::string dataname="", vtkRenderWindowInteractor*  interactor=0);
22         ~wxMaracasSurfaceRenderingManagerDataMhd();
23
24         
25         /**
26         **      Adds a prop3D to the world of the application
27         **/
28         void setVtkImageData(vtkImageData* imagedata);
29         
30         /**
31         **      changes the isovalue in a prop3D
32         **/
33         void changeIsoValue(double value);      
34         /**
35         **      changes the isovalue in a prop3D
36         **/
37         void changeIsoValue(double min, double max);
38         /**
39         **      Check if the variables are setted correctly
40         **/
41         void checkInvariant();  
42         
43         /**
44         **      Returns the grey max level of the image
45         **/
46
47         int getMaxGreyLevel();
48
49         /**
50         **      creates the image 
51         **/
52         void contourExtractor(int isovalue);            
53         
54         /**
55         ** Updates surface
56         **/
57         void UpdateSurface();
58
59         virtual void enableBoxWidget(bool enable);
60 private:        
61         
62         vtkImageData* _imagedata;
63         int _maxgreylevel;
64
65         /**
66         ** to the image render
67         **/
68         vtkMarchingCubes* _cubesFilter;
69         vtkCleanPolyData* _cleanFilter;
70         vtkClipPolyData* _tissueClipper;
71         vtkPlanes* _tissuePlanes;
72         vtkImageThreshold * _tresholdFilter;
73         vtkSmoothPolyDataFilter* _smooth;
74         
75         /**
76         ** Get's the max grey level of the image
77         **/
78         int getMaxLevel(vtkImageData* img);
79         
80
81         
82 };
83
84 #endif /*WXMARACASSURFACERENDERINGMANAGERDATAMHD_H_*/