X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxSTLWidget_03.cxx;h=edfe3f3004da62d269e0faf7fc9c4ef49cc27a29;hb=4443a8fe2b4992b6abee8531917fd0803018fc12;hp=cbecc1a7f8c1a57e0aee73b95aca17708eaf16ac;hpb=e6b030ceb3ee4eea1f012e7d5c47503cf6322c61;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx index cbecc1a..edfe3f3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx @@ -68,7 +68,7 @@ wxSTLWidget_03::wxSTLWidget_03(wxWindow *parent)//, marInterface* mar) _wxMaracasMPR = NULL; _maxSize = 2000; _minSize = 300; - + _imagedata = NULL; _stlMarchingCubesLevel = 128; _stlDeltaGaussLevel = 100; @@ -89,9 +89,7 @@ wxSTLWidget_03::wxSTLWidget_03(wxWindow *parent)//, marInterface* mar) wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL ); wxSplitterWindow *pnlSplitter = new wxSplitterWindow( this , -1); wxPanel *viewPanel = CreateViewPanel(pnlSplitter); -printf("EED wxSTLWidget_03::wxSTLWidget_03 01\n"); wxPanel *controlPanel = CreateControlPanel(pnlSplitter); -printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n"); sizer -> Add( pnlSplitter ,1,wxGROW ,0); pnlSplitter -> SetMinimumPaneSize( 150 ); @@ -123,7 +121,6 @@ printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n"); joinMarchingCubes = NULL; joinMapper = NULL; joinActor = NULL; -printf("EED wxSTLWidget_03::wxSTLWidget_03 03\n"); } @@ -143,55 +140,51 @@ wxPanel* wxSTLWidget_03::CreateViewPanel(wxWindow *parent) //vtkImageData *imagedata; //imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); //imagedata->Update(); -printf("EED wxSTLWidget_03::CreateViewPanel 01 \n"); _wxMaracasMPR = new wxMaracasMPR( panel);//JCP 10-03-2009, new marImageData(imagedata), 1 ); -printf("EED wxSTLWidget_03::CreateViewPanel 02 \n"); _wxMaracasMPR->ConfigureVTK(); -printf("EED wxSTLWidget_03::CreateViewPanel 03 \n"); sizer->Add( _wxMaracasMPR , 1, wxEXPAND, 0); panel->SetSizer(sizer); panel->SetAutoLayout(true); panel->SetSize(400,400); panel->Layout(); -printf("EED wxSTLWidget_03::CreateViewPanel 04 \n"); return panel; } void wxSTLWidget_03::setImage(vtkImageData* img){ + marImageData* marimagedata = new marImageData(img); - _wxMaracasMPR->setMarImage(new marImageData(img), 1); + _wxMaracasMPR->setMarImage(marimagedata, 1); _wxMaracasMPR->ConfigureVTK(); + this->ConfigureProcessing(marimagedata,0,0,0); + this->ConfigureSTL(); + + _wxMaracasMPR->Refresh(); + + //this->Refresh(); } //------------------------------------------------------------------- wxWindow* wxSTLWidget_03::CreateSelectAPointPanel(wxWindow *parent) { -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 01\n"); wxPanel *panel = new wxPanel(parent,-1); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 02\n"); wxFlexGridSizer *sizer = new wxFlexGridSizer(2); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 03\n"); sizer->Add(new wxStaticText(panel,-1,_T(" "))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 04\n"); sizer->Add(new wxStaticText(panel,-1,_T(" "))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 05\n"); sizer->Add(new wxStaticText(panel,-1,_T(" Select a 3D Point..."))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 06\n"); panel->SetSizer(sizer); panel->SetAutoLayout(true); panel->SetSize(400,600); panel->Layout(); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 07\n"); return panel; @@ -395,19 +388,13 @@ wxWindow* wxSTLWidget_03::CreateReadSTLFilePanel(wxWindow *parent) //------------------------------------------------------------------- wxPanel* wxSTLWidget_03::CreateControlPanel(wxWindow *parent) { -printf("EED wxSTLWidget_03::CreateControlPanel 01\n"); wxPanel *panel = new wxPanel(parent,-1); wxNotebook *noteBook = new wxNotebook(panel, -1); -printf("EED wxSTLWidget_03::CreateControlPanel 02\n"); noteBook->AddPage(CreateSelectAPointPanel(noteBook),_T("0 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 03\n"); noteBook->AddPage(CreateSegmentationPanel(noteBook),_T("1 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 04\n"); noteBook->AddPage(CreateSmoothingPanel(noteBook) ,_T("2 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 05\n"); noteBook->AddPage(CreateReadSTLFilePanel(noteBook) ,_T("3 " ) ); -printf("EED wxSTLWidget_03::CreateControlPanel 06\n"); noteBook->SetSelection(0); noteBook->SetSize(350,250); wxFlexGridSizer *sizer = new wxFlexGridSizer(2); @@ -417,7 +404,6 @@ printf("EED wxSTLWidget_03::CreateControlPanel 06\n"); panel->SetSize(400,600); panel->Layout(); -printf("EED wxSTLWidget_03::CreateControlPanel 07\n"); return panel; } //------------------------------------------------------------------------ @@ -551,11 +537,11 @@ void wxSTLWidget_03::ConfigureVTK() { wxBusyCursor wait; // vtkImageData *imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); - marImageData *marimagedata;// = _mar->_experiment->getDynData( )->GetMarImageData(); + //marImageData *marimagedata;// = _mar->_experiment->getDynData( )->GetMarImageData(); //CONFIGURACION ADICIONAL this->ConfigureSTL(); - this->ConfigureProcessing(marimagedata,0,0,0); + //this->ConfigureProcessing(marimagedata,0,0,0); }