#ifndef WX_STL_WIDGET_02 #define WX_STL_WIDGET_02 #include #include #include #include #include #include #include #include #include #include #include #include "wxVTKRenderWindowInteractor.h" #include "wxSurfaceWidget.h" #include "wxVtkBaseView.h" #include "../wxMaracasMPR.h" #include #include #include "kernel/vtkSTLExtractor.h" #include "kernel/vtkJoiner.h" //------------------------------------------------------------------ //------------------------------------------------------------------ //------------------------------------------------------------------ class wxSTLWidget_02: public wxPanel{ public: wxSTLWidget_02(wxWindow *parentmar,marInterface *mar); ~wxSTLWidget_02(); void ConfigureVTK(); void Refresh(); void OnOpacity_Res2VolJF(wxScrollEvent& event); // Result 2 Volume JF void OnBtnExtractTree2_JF(wxCommandEvent& event); void OnBtnEraseTree2_JF(wxCommandEvent& event); void OnSensibility(wxScrollEvent& event); void OnMaxSphereSize_JF(wxScrollEvent& event); // radio Max void OnMinSphereSize_JF(wxScrollEvent& event); // radio Min // void Reset_vtk_STLFile(); void OnBtnSTLFileLoad(wxCommandEvent& event); void OnBtnSTLFileErase(wxCommandEvent& event); void OnOpacitySTLFile(wxScrollEvent& event); // -------------------------------------- // STL FUNCTIONS DHC // -------------------------------------- void generateSTLSurfaces(); void OnBtnCreateFileSTL(wxCommandEvent& event); void OnChangeSTLGaussLevel(wxScrollEvent& event); void OnChangeSTLMarchingCubesLevel(wxScrollEvent& event); void OnOpacitySTLExternal(wxScrollEvent& event); void OnOpacitySTLInternal(wxScrollEvent& event); //--------------------------------------- // JOIN REGIONS FUNCTIONS //--------------------------------------- void OnJoinRegions(wxCommandEvent& event); private: // Result 1 volume + Axis // vtkPolyDataMapper *_1_mapfinal; // vtkActor *_1_stripfinal; // vtkPolyDataMapper *_1_isoMapperMC6; // vtkActor *_1_isoActorMC6; // vtkMarchingCubes *_1_isoMC6; // Result 2 volume + Axis axisExtractor02 *_2_prgov; vtkPolyDataMapper *_2_mapfinal; vtkActor *_2_stripfinal; vtkPolyDataMapper *_2_isoMapperMC6; vtkActor *_2_isoActorMC6; vtkMarchingCubes *_2_isoMC6; double _sensibility_JF; int _maxSphereSize_JF; int _minSphereSize_JF; // Load STL file vtkPolyDataMapper *_loadSTLMapper; vtkActor *_loadActorSTL; wxSlider *_opacity_Res2VolJF; wxSlider *_sl_sensibility_JF; wxSlider *_sl_maxSphereSize_JF; wxSlider *_sl_minSphereSize_JF; wxVtk3DBaseView *_imageviewer3D; wxPanel *CreateControlPanel(wxWindow *parent); wxPanel *CreateViewPanel(wxWindow *parent); //Maracas marInterface *_mar; wxMaracasMPR *_wxMaracasMPR; void ResetTree2_JF(); void ExtractTree2_JF(int x, int y, int z); //--------------------- // STL SURFACES DHC //--------------------- void ConfigureSTL(); double _stlDeltaGaussLevel; double _stlMarchingCubesLevel; vtkPolyData *stlInterna; vtkPolyData *stlExterna; wxSlider *stlSliderDeltaGauss; wxSlider *stlSliderMarchingCubes; vtkPolyDataMapper *dsm1; vtkActor *actorInternal; wxSlider *stlSliderOpacityInternal; vtkPolyDataMapper *dsm2; vtkActor *actorExternal; wxSlider *stlSliderOpacityExternal; vtkSTLExtractor *stlExtractor; wxSlider *_sl_opacity_STL_file; //-------------------------- // JOIN REGIONS //-------------------------- void ConfigureJoinRegions(); vtkImageData *arteryImageData; vtkJoiner *joiner; vtkMarchingCubes *joinMarchingCubes; vtkPolyDataMapper *joinMapper; vtkActor *joinActor; }; #endif // WX_STL_WIDGET_02