X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkClipping3DViewCntrlPanel.cxx;h=44753e2039bf269ee6c52f478003023e9f67aa3f;hb=65c158dc171f8d3114ee3544b2a94a1f41880df0;hp=ab9803cd9c19ed0d0ae36aee5a47b42ecb73f55b;hpb=a4ee3758aa0477f677fb981e2c4d6e29995e8db8;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx index ab9803c..44753e2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx @@ -23,9 +23,13 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w _surfC = new wxRadioButton(panel,-1,_T("C")); _surfD = new wxRadioButton(panel,-1,_T("D")); - wxCheckBox *ckVolum = new wxCheckBox(panel,-1,_T("Vol")); + + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //wxCheckBox *ckVolum = new wxCheckBox(panel,-1,_T("Vol")); wxCheckBox *ckBoxSurface = new wxCheckBox(panel,-1,_T("Surface Box")); - wxCheckBox *ckBoxVolume = new wxCheckBox(panel,-1,_T("Volume Box")); + + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //wxCheckBox *ckBoxVolume = new wxCheckBox(panel,-1,_T("Volume Box")); _color = new wxButton(panel,-1,_T("")); _visible = new wxCheckBox(panel,-1,_T("Vis")); @@ -56,12 +60,15 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w wxButton *btnSTL = new wxButton(panel,-1,_T("Create STL File")); wxButton *btnSaveRaw = new wxButton(panel,-1,_T("Save Raw Volume")); - wxButton *btnVolumeFunctions = new wxButton(panel,-1,_T("Read Volume Functions")); + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //wxButton *btnVolumeFunctions = new wxButton(panel,-1,_T("Read Volume Functions")); Connect(btnSTL->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL ); Connect(btnSaveRaw->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume ); - Connect(btnVolumeFunctions->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions ); + + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //Connect(btnVolumeFunctions->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions ); wxButton *btnMeshVTKLoad = new wxButton(panel,-1,_T("Load Mesh")); @@ -82,7 +89,11 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w // ckVolum->Enable(false); ckBoxSurface->SetValue(false); - ckBoxVolume->SetValue(false); + + + //ckBoxVolume->SetValue(false); + + _color->SetSize(40,20); _opacity->SetSize(370,20); // ckBoxX->SetValue(true); @@ -96,8 +107,9 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w // _positionY->SetSize(400,20); // _positionZ->SetSize(400,20); - Connect(ckVolum->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume ); - Connect(ckBoxVolume->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume ); + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //Connect(ckVolum->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume ); + //Connect(ckBoxVolume->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume ); Connect(_surfA->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface ); Connect(_surfB->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface ); @@ -134,12 +146,13 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w //wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10); // JPRx //wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10); // JPRx - sizerH0->Add( ckVolum , 1, wxALL|wxEXPAND, 0); - sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH0->Add( ckBoxVolume , 1, wxALL|wxEXPAND, 0); - sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH0->Add( btnVolumeFunctions , 1, wxALL|wxEXPAND, 0); - sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + //RaC 03-2010 Divides in two panels thje last tab Surface/Volume + //sizerH0->Add( ckVolum , 1, wxALL|wxEXPAND, 0); + //sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + //sizerH0->Add( ckBoxVolume , 1, wxALL|wxEXPAND, 0); + //sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + //sizerH0->Add( btnVolumeFunctions , 1, wxALL|wxEXPAND, 0); + //sizerH0->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); sizerH0->Add( btnMeshVTKLoad , 1, wxALL|wxEXPAND, 0); @@ -394,7 +407,7 @@ void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event) void wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin(wxScrollEvent& event) { int value = _isoValue->GetValue(); - int delta= (int)pow( 4 , _isoValueSpin->GetValue() ); + int delta= (int)pow( (double)4 ,(double) _isoValueSpin->GetValue() ); int min=value - delta/2; int max=value + delta/2; if (min<0) @@ -577,7 +590,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event) //setting variables if the user wants to do refresh hDlg->setCTF(ctfun); hDlg->setTF(tfun); - hDlg->setClipping3DView(_wxvtkclipping3Dview); + //hDlg->setClipping3DView(_wxvtkclipping3Dview); /* hDlg->setVolume(newvol); hDlg->setVolumeMapper(volumeMapper); @@ -634,11 +647,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event) volumeMapper->Update(); newvol->Update(); */ - } - - else - { - + } else { if(hDlg->getRefreshed()) { int i=0,size;