wxSTLWidget_02.h

Go to the documentation of this file.
00001 
00002 #ifndef WX_STL_WIDGET_02
00003 #define WX_STL_WIDGET_02
00004 
00005 #include <vector>
00006 
00007 #include <vtkImageData.h>
00008 #include <vtkActor.h>
00009 #include <vtkMarchingCubes.h>
00010 #include <vtkPolyDataMapper.h>
00011 #include <vtkAppendFilter.h>
00012 #include <vtkImageThreshold.h>
00013 #include <vtkExtractVOI.h>
00014 #include <vtkOutlineFilter.h>
00015 #include <vtkImageSeedConnectivity.h>
00016 #include <vtkImageCast.h>
00017 
00018 #include "wxVTKRenderWindowInteractor.h"
00019 #include "wxSurfaceWidget.h"
00020 #include "wxVtkBaseView.h"
00021 
00022 
00023 #include "../wxMaracasMPR.h"
00024 
00025 #include <kernel/marInterface.h>
00026 #include <kernel/axisExtractor02.h>
00027 
00028 
00029 #include "kernel/vtkSTLExtractor.h"    
00030 #include "kernel/vtkJoiner.h"
00031 
00032 
00033 
00034 
00035 //------------------------------------------------------------------
00036 //------------------------------------------------------------------
00037 //------------------------------------------------------------------
00038 
00039 class wxSTLWidget_02: public wxPanel{
00040 public:
00041         wxSTLWidget_02(wxWindow *parentmar,marInterface *mar);
00042         ~wxSTLWidget_02();
00043         void ConfigureVTK();
00044         void Refresh();
00045 
00046         void OnOpacity_Res2VolJF(wxScrollEvent& event);         // Result 2 Volume JF
00047 
00048 
00049         void OnBtnExtractTree2_JF(wxCommandEvent& event);
00050         void OnBtnEraseTree2_JF(wxCommandEvent& event);
00051 
00052         void OnSensibility(wxScrollEvent& event);
00053         void OnMaxSphereSize_JF(wxScrollEvent& event);          // radio Max
00054         void OnMinSphereSize_JF(wxScrollEvent& event);          // radio Min
00055 
00056         //
00057         void Reset_vtk_STLFile();
00058         void OnBtnSTLFileLoad(wxCommandEvent& event);
00059         void OnBtnSTLFileErase(wxCommandEvent& event);
00060         void OnOpacitySTLFile(wxScrollEvent& event);            
00061 
00062 
00063         // --------------------------------------
00064         // STL FUNCTIONS DHC
00065         // --------------------------------------
00066         void generateSTLSurfaces();
00067         void OnBtnCreateFileSTL(wxCommandEvent& event); 
00068         void OnChangeSTLGaussLevel(wxScrollEvent& event);
00069         void OnChangeSTLMarchingCubesLevel(wxScrollEvent& event);
00070         void OnOpacitySTLExternal(wxScrollEvent& event);
00071         void OnOpacitySTLInternal(wxScrollEvent& event);
00072 
00073         //---------------------------------------
00074         // JOIN REGIONS FUNCTIONS
00075         //---------------------------------------
00076         void OnJoinRegions(wxCommandEvent& event);
00077 
00078 private:
00079 
00080 
00081         // Result 1 volume + Axis   
00082 //      vtkPolyDataMapper       *_1_mapfinal;
00083 //      vtkActor                        *_1_stripfinal;
00084 //      vtkPolyDataMapper       *_1_isoMapperMC6;
00085 //      vtkActor                        *_1_isoActorMC6;
00086 //      vtkMarchingCubes        *_1_isoMC6;
00087 
00088         // Result 2 volume + Axis   
00089         axisExtractor02         *_2_prgov;
00090         vtkPolyDataMapper       *_2_mapfinal;
00091         vtkActor                        *_2_stripfinal;
00092         vtkPolyDataMapper       *_2_isoMapperMC6;
00093         vtkActor                        *_2_isoActorMC6;
00094         vtkMarchingCubes        *_2_isoMC6;
00095         double                          _sensibility_JF;
00096         int                                     _maxSphereSize_JF;
00097         int                                     _minSphereSize_JF;
00098 
00099         // Load STL file
00100         vtkPolyDataMapper *_loadSTLMapper;
00101         vtkActor                  *_loadActorSTL;
00102 
00103 
00104         wxSlider                        *_opacity_Res2VolJF;
00105         wxSlider                        *_sl_sensibility_JF;
00106         wxSlider                        *_sl_maxSphereSize_JF;
00107         wxSlider                        *_sl_minSphereSize_JF;
00108         
00109         wxVtk3DBaseView         *_imageviewer3D;
00110         wxPanel                         *CreateControlPanel(wxWindow *parent);
00111         wxPanel                         *CreateViewPanel(wxWindow *parent);
00112 
00113         //Maracas
00114         marInterface            *_mar;
00115         wxMaracasMPR            *_wxMaracasMPR;
00116 
00117         void ResetTree2_JF();
00118         void ExtractTree2_JF(int x, int y, int z);
00119 
00120 
00121 
00122         //---------------------
00123         // STL SURFACES DHC
00124         //---------------------
00125         void            ConfigureSTL();
00126         double          _stlDeltaGaussLevel;
00127         double          _stlMarchingCubesLevel;
00128 
00129         
00130         vtkPolyData *stlInterna;
00131         vtkPolyData *stlExterna;
00132         
00133         wxSlider        *stlSliderDeltaGauss;
00134         wxSlider        *stlSliderMarchingCubes;
00135         
00136         vtkPolyDataMapper *dsm1;
00137     vtkActor    *actorInternal;
00138         wxSlider        *stlSliderOpacityInternal;
00139     
00140         vtkPolyDataMapper *dsm2; 
00141     vtkActor    *actorExternal;
00142         wxSlider        *stlSliderOpacityExternal;
00143 
00144         vtkSTLExtractor *stlExtractor;   
00145 
00146         wxSlider        *_sl_opacity_STL_file;
00147 
00148 
00149 
00150         //--------------------------
00151         // JOIN REGIONS
00152         //--------------------------
00153         void ConfigureJoinRegions();
00154 
00155         vtkImageData            *arteryImageData;
00156         vtkJoiner                       *joiner;
00157         vtkMarchingCubes        *joinMarchingCubes;
00158     vtkPolyDataMapper   *joinMapper; 
00159         vtkActor                        *joinActor; 
00160 
00161 };
00162 
00163 #endif // WX_STL_WIDGET_02
00164 
00165 
00166 
00167 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1