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