From c16ad56801f9028dc219381cfdff2ca907efb431 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Thu, 6 Nov 2008 17:38:08 +0000 Subject: [PATCH] Revert to version pre-16h30 --- .../wxContourEventHandler.cxx | 47 +++++++++------- .../wxContour_ActionCommandsID.h | 56 +------------------ 2 files changed, 27 insertions(+), 76 deletions(-) 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(" ")); diff --git a/lib/Interface_ManagerContour_NDimensions/wxContour_ActionCommandsID.h b/lib/Interface_ManagerContour_NDimensions/wxContour_ActionCommandsID.h index e2770d1..6168604 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContour_ActionCommandsID.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContour_ActionCommandsID.h @@ -19,7 +19,6 @@ class wxContour_ActionCommandsID { //------------------------------------------------------------------------------------------------------------ // Attributtes //------------------------------------------------------------------------------------------------------------ - /* const static char CREATE_TOOL = 'A'; //Manual contour const static char CREATE_CONTOUR_KEY = 'B'; //Manual contour const static char DELETE_TOOL = 'C'; @@ -42,60 +41,7 @@ class wxContour_ActionCommandsID { const static char INFORMATIONCONTOUR_TOOL = 'T'; const static char INTERFACECONFIGURATION_TOOL = 'U'; const static char TEST_TOOL = 'V'; - */ - - /* - /// \TODO : Try to find the right way to initialize static values. - - const static wxString CREATE_TOOL = _T("A"); //Manual contour - const static wxString CREATE_CONTOUR_KEY = _T("B"); //Manual contour - const static wxString DELETE_TOOL = _T("C"); - const static wxString DELETE_KEY = _T("D"); - const static wxString HIDE_TOOL = _T("E"); - const static wxString SHOW_TOOL = _T("F"); - const static wxString COPY_TOOL = _T("G"); - const static wxString PASTE_TOOL = _T("H"); - const static wxString CHANGE_TOOL = _T("I"); - const static wxString SPREAD_TOOL = _T("J"); - const static wxString SELECT_TOOL = _T("K"); - const static wxString EDIT_TOOL = _T("L"); - const static wxString UNDO_TOOL = _T("M"); - const static wxString REDO_TOOL = _T("N"); - const static wxString CREATE_PREDEFINED_4SIDED = _T("O"); - const static wxString SAVE_TOOL = _T("P"); - const static wxString SAVE_KEY = _T("Q"); - const static wxString OPEN_TOOL = _T("R"); - const static wxString AUTOMATIQUESEGMENTATION_TOOL = _T("S"); - const static wxString INFORMATIONCONTOUR_TOOL = _T("T"); - const static wxString INTERFACECONFIGURATION_TOOL = _T("U"); - const static wxString TEST_TOOL = _T("V"); - */ - - - - const static wxString CREATE_TOOL ; //Manual contour - const static wxString CREATE_CONTOUR_KEY ; //Manual contour - const static wxString DELETE_TOOL ; - const static wxString DELETE_KEY ; - const static wxString HIDE_TOOL ; - const static wxString SHOW_TOOL ; - const static wxString COPY_TOOL ; - const static wxString PASTE_TOOL ; - const static wxString CHANGE_TOOL ; - const static wxString SPREAD_TOOL ; - const static wxString SELECT_TOOL ; - const static wxString EDIT_TOOL ; - const static wxString UNDO_TOOL ; - const static wxString REDO_TOOL ; - const static wxString CREATE_PREDEFINED_4SIDED ; - const static wxString SAVE_TOOL ; - const static wxString SAVE_KEY ; - const static wxString OPEN_TOOL ; - const static wxString AUTOMATIQUESEGMENTATION_TOOL ; - const static wxString INFORMATIONCONTOUR_TOOL ; - const static wxString INTERFACECONFIGURATION_TOOL ; - const static wxString TEST_TOOL ; - + }; #endif // __wxContour_ActionCommandsID_HEADER_FILE__ -- 2.45.1