X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourEventHandler.cxx;h=5ae91cac3a569b6fd9b1af9b3761078ca3967a6b;hb=c16ad56801f9028dc219381cfdff2ca907efb431;hp=a87fa34acb6ac467135fef515bc5636baf5b03ee;hpb=3f578b2680f3dd02c75cf41f717423ac53869ae3;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.cxx index a87fa34..5ae91ca 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourEventHandler.cxx @@ -1,6 +1,6 @@ -/* Diagrama de Secuaencia de cambiar un instante +/* Diagrama de Secuencia de cambiar un instante wxContourEventHandler :: changeInstant() OutlineModelManager :: ->setInstant( _actualInstant ); OutlineModelManager :: updateToActualInstant() @@ -1042,11 +1042,11 @@ myfile.close(); double range[2]; _sceneManager->GetImageDataRange(range); - wxPanel *panel = new wxPanel(parent,-1); + wxPanel *panel = new wxPanel(parent,-1); wxButton *segmentationOneSliceBtn = new wxButton(panel,-1,_T("Actual slice"), wxDefaultPosition, wxSize(200,35) ); - wxButton *segmentationAllSliceBtn = new wxButton(panel,-1,_T("All slices") ,wxDefaultPosition, wxSize(200,35) ); - _isovalue = new wxSlider(panel, -1, 40 , (int)(range[0]), (int)(range[1]), wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); - _sampling = new wxSlider(panel, -1, 20 , 4, 50, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); + wxButton *segmentationAllSliceBtn = new wxButton(panel,-1,_T("All slices") ,wxDefaultPosition, wxSize(200,35) ); + _isovalue = new wxSlider(panel, -1, 40 , (int)(range[0]), (int)(range[1]), wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); + _sampling = new wxSlider(panel, -1, 20 , 4, 50, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); wxString lstOptions[3]; lstOptions[0]=_T("A"); lstOptions[1]=_T("B"); @@ -1101,11 +1101,11 @@ myfile.close(); { if (_TestFrame==NULL) { - _contourPropagation = new ContourPropagation(); - _TestFrame = new wxFrame (_theViewPanel, -1,_T(" Test Segmentation "), wxDefaultPosition, wxDefaultSize, wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT ); + _contourPropagation = new ContourPropagation(); + _TestFrame = new wxFrame (_theViewPanel, -1,_T(" Test Segmentation "), wxDefaultPosition, wxDefaultSize, wxFRAME_TOOL_WINDOW|wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN |wxFRAME_FLOAT_ON_PARENT ); wxSize sizepanel(200,300); _TestFrame->SetSize( sizepanel ); - wxPanel *panel = new wxPanel(_TestFrame,-1); + wxPanel *panel = new wxPanel(_TestFrame,-1); wxButton *spreadResetBtn = new wxButton(panel,-1,_T("Reset"),wxDefaultPosition, wxSize(80,35) ); wxButton *spreadAddBtn = new wxButton(panel,-1,_T("Add"),wxDefaultPosition, wxSize(80,35)); wxButton *spreadGoBtn = new wxButton(panel,-1,_T("GoA"),wxDefaultPosition, wxSize(80,35)); @@ -1277,10 +1277,10 @@ myfile.close(); sizeLstContourThings = lstContourThings.size(); wxString tempString; - tempString.Printf(_T("%d - %d"), + tempString.Printf(_T("%d - %d"), z, sizeLstContourThings); - + _grid->SetRowLabelValue(z, tempString ); for (ii=0 ; ii tempVector; _instantPanel->getInstant( tempVector ); _performingOperation->reset(); - _performingOperation->setStartCommand( /*(char)*/wxContour_ActionCommandsID::COPY_TOOL ); + _performingOperation->setStartCommand( (char)wxContour_ActionCommandsID::COPY_TOOL ); _performingOperation->setStartOperationInstantVector( tempVector ); _performingOperation->setKeyNamesOperationElems( keyNamesVector ); @@ -2740,8 +2740,13 @@ myfile.close(); //JCP 20-10-08 Undo redo implementation saveState(); //JCP 20-10-08 Undo redo implementation - deleteContours( _sceneManager->GetlstContoursNameActualSlice() ); - + //deleteContours( _sceneManager->GetlstContoursNameActualSlice() ); + + ///\TODO : find something less stupid! + + std::vector oops; + oops = _sceneManager->GetlstContoursNameActualSlice(); + deleteContours( oops ); } @@ -3030,8 +3035,8 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event) return panel;*/ - wxPanel *panel = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString("")); - _withOfContourLine = new wxSlider(panel, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); + wxPanel *panel = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, _T("")); + _withOfContourLine = new wxSlider(panel, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); double range[2]; this->_sceneManager->GetImageDataRange(range); @@ -3113,7 +3118,7 @@ void wxContourEventHandler::OnInterpolation(wxCommandEvent& event) //------------------------------------------------------------------ - void wxContourEventHandler :: executeActionCommand( const wxString & toolCommand ) + void wxContourEventHandler :: executeActionCommand( const char toolCommand ) { std::vector currentSelection = _sceneManager->getSelectedObjects(); int elementsSelected = currentSelection.size(); @@ -3598,10 +3603,10 @@ void wxContourEventHandler :: onREDO() _isovalue = new wxSlider(panel, -1, 40 , (int)(range[0]), (int)(range[1]), wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); _sampling = new wxSlider(panel, -1, 20 , 4, 50, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); wxString lstOptions[3]; - lstOptions[0]="A"; - lstOptions[1]="B"; - lstOptions[2]="C"; - methodRadiobox = new wxRadioBox(panel, -1, "Method (find ctrl. Points)", wxDefaultPosition, wxSize(200,45), 3 , lstOptions, 3, wxRA_SPECIFY_COLS); + lstOptions[0]=_T("A"); + lstOptions[1]=_T("B"); + lstOptions[2]=_T("C"); + methodRadiobox = new wxRadioBox(panel, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions, 3, wxRA_SPECIFY_COLS); methodRadiobox->SetSelection(2); _staticTextSegmentation = new wxStaticText(panel,-1,_T(" "));