From: Eduardo DAVILA Date: Sat, 7 Oct 2017 08:50:31 +0000 (+0200) Subject: #3145 creaContours Bug New Normal - changeWx28to30 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2ca0ae039a31c7aec93da7aadc5fa5e983e08045;p=creaContours.git #3145 creaContours Bug New Normal - changeWx28to30 --- diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index 06e17aa..83da40f 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -32,7 +32,6 @@ wxFrame* interfMainPanel::_newframe=NULL; interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir) : wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN) { -printf("EED interfMainPanel::interfMainPanel Start\n"); PANEL = "New Contour"; PANEL1 = "I/O"; PANEL2 = "Edit"; @@ -161,7 +160,6 @@ printf("EED interfMainPanel::interfMainPanel Start\n"); Connect(b6->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&interfMainPanel::onActionButtonPressed1); this->Layout(); -printf("EED interfMainPanel::interfMainPanel End\n"); } interfMainPanel::~interfMainPanel(void) diff --git a/lib/Interface_ManagerContour_NDimensions/wxConceptControl.cxx b/lib/Interface_ManagerContour_NDimensions/wxConceptControl.cxx index d57743c..a205f95 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxConceptControl.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxConceptControl.cxx @@ -48,7 +48,6 @@ DEFINE_EVENT_TYPE( wxEVT_CONCEPT_RELEASE ) wxConceptControl::wxConceptControl(wxWindow *parent, bool orientation, int minV, int maxV, int actualV, std::string &aConceptName, std::string elementsDef ) :wxPanel(parent, -1, wxDefaultPosition, parent->GetSize(), wxTAB_TRAVERSAL) { -printf("EED wxConceptControl::wxConceptControl Start\n"); minValue = minV; maxValue = maxV; _numCheckBox = 0; @@ -61,9 +60,7 @@ printf("EED wxConceptControl::wxConceptControl Start\n"); wxFlexGridSizer* sizer = new wxFlexGridSizer(3); #endif conceptName = new wxStaticText(this, -1, wxString(aConceptName.c_str(),wxConvUTF8), wxDefaultPosition, wxSize(90,20), wxALIGN_CENTRE ); -printf("EED wxConceptControl::wxConceptControl 1\n"); sizer->Add( conceptName, 0, wxALIGN_CENTRE |wxALIGN_CENTER_HORIZONTAL); -printf("EED wxConceptControl::wxConceptControl 2\n"); if(orientation) { sizer->AddGrowableCol(1); @@ -72,17 +69,13 @@ printf("EED wxConceptControl::wxConceptControl 2\n"); // sizer->AddGrowableRow(1); conceptSlider = new wxSlider(this, -1, actualV, minV, maxV, wxDefaultPosition, wxDefaultSize, wxSL_LEFT| wxSL_AUTOTICKS | wxSL_LABELS, wxDefaultValidator, wxString(aConceptName.c_str(),wxConvUTF8) ); } -printf("EED wxConceptControl::wxConceptControl 3\n"); sizer->Add(conceptSlider, 0, wxGROW |wxALL ); -printf("EED wxConceptControl::wxConceptControl 4\n"); createElements( sizer, elementsDef ); SetSizer( sizer ); Connect( conceptSlider->GetId(), wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(wxConceptControl::onSliderTrack));//(wxObjectEventFunction) &wxConceptControl :: onSliderRelease ); Connect( conceptSlider->GetId(), wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(wxConceptControl::onSliderRelease));//(wxObjectEventFunction) &wxConceptControl :: onSliderTrack ); this->SetAutoLayout( true ); -printf("EED wxConceptControl::wxConceptControl 5\n"); this->Layout(); -printf("EED wxConceptControl::wxConceptControl End\n"); } wxConceptControl :: ~wxConceptControl() diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 2c37a7f..5b5f61f 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -60,7 +60,6 @@ char wxContourMainFrame::COPY = 'C'; //: wxWindow(parent, id, pos, size, style) : wxPanel(parent, id, pos, size, style) { -printf("EED wxContourMainFrame :: wxContourMainFrame Start 1\n"); m_mgr.SetManagedWindow(this); _contourGroup = 1; _creatingContoursActive = false; @@ -95,13 +94,11 @@ printf("EED wxContourMainFrame :: wxContourMainFrame Start 1\n"); _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; _viewColorLayerImagePanel = NULL; -printf("EED wxContourMainFrame :: wxContourMainFrame End 1\n"); } wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector images, long style,std::string datadir) : wxPanel(parent, id, pos, size, style) { -printf("EED wxContourMainFrame :: wxContourMainFrame Start 2\n"); m_mgr.SetManagedWindow(this); _contourGroup = 1; _creatingContoursActive = false; @@ -117,7 +114,6 @@ printf("EED wxContourMainFrame :: wxContourMainFrame Start 2\n"); _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; _viewColorLayerImagePanel = NULL; -printf("EED wxContourMainFrame :: wxContourMainFrame A\n"); // set up default notebook style m_notebook_style = wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; m_notebook_theme = 0; @@ -126,24 +122,17 @@ printf("EED wxContourMainFrame :: wxContourMainFrame A\n"); _datadir = datadir; inredo = 0; inundo = 0; -printf("EED wxContourMainFrame :: wxContourMainFrame B\n"); _pannew = interfMainPanel::getInstance(this,datadir+"/data/Icons");//, eventHandler); -printf("EED wxContourMainFrame :: wxContourMainFrame C\n"); _performingOperation = new PerformingOperation(); -printf("EED wxContourMainFrame :: wxContourMainFrame C.1\n"); if(images.size() > 0) { -printf("EED wxContourMainFrame :: wxContourMainFrame C.2\n"); this->setVectImages(images); -printf("EED wxContourMainFrame :: wxContourMainFrame C.3\n"); } _contourextractdata = NULL; -printf("EED wxContourMainFrame :: wxContourMainFrame End 2\n"); } void wxContourMainFrame::setVectImages(std::vector imgs) { -printf("EED wxContourMainFrame::setVectImages Start\n"); _images = imgs; #if defined(__GNUC__) std::string str_home(getenv("HOME")); @@ -153,20 +142,13 @@ printf("EED wxContourMainFrame::setVectImages Start\n"); std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/"; std::vector conceptNameVect; std::vector conceptSizeVect; -printf("EED wxContourMainFrame::setVectImages Start 01\n"); notebook = this->createNotebook(); -printf("EED wxContourMainFrame::setVectImages Start 02\n"); kernelManager = new KernelManagerContour( imgs , _datadir+"/data/" , strCreaContourDataTmp ); -printf("EED wxContourMainFrame::setVectImages Start 03\n"); _instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" ); -printf("EED wxContourMainFrame::setVectImages Start 04\n"); _theViewPanel = new wxContourViewPanel( kernelManager->getSourceImage(), notebook ); -printf("EED wxContourMainFrame::setVectImages Start 05\n"); //------------------------------------------------------------- kernelManager->getConceptsInformation(conceptNameVect, conceptSizeVect); -printf("EED wxContourMainFrame::setVectImages 1\n"); _instantPanel->addConcepts(conceptNameVect, conceptSizeVect); -printf("EED wxContourMainFrame::setVectImages 2\n"); double val = _theViewPanel->getCurrentDeep(); _instantPanel->setConceptValue( "Axe Depth", (int)val ); //JCP _instantPanel->setConceptValue("time", num de imagenes); @@ -174,7 +156,6 @@ printf("EED wxContourMainFrame::setVectImages 2\n"); //*******************changeInstant(); _theViewPanel->setVerticalConcept( "Axe Depth", data->getMinValue(), data->getMaxValue(), data->getMinShowedValue(), data->getMaxShowedValue(), data->getActualValue() ); this->configurePanels( ); -printf("EED wxContourMainFrame::setVectImages End\n"); } diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx index a501b91..4286054 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx @@ -115,7 +115,6 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE ) wxContourViewPanel::wxContourViewPanel ( vtkImageData * theShowingImage, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd ) :wxPanel(parent, -1, pos, size, style) { -printf("EED wxContourViewPanel::wxContourViewPanel Start\n"); theShowingImage->GetSpacing(last_spacing); showingVID = theShowingImage; int gapH = 20; @@ -136,14 +135,9 @@ printf("EED wxContourViewPanel::wxContourViewPanel Start\n"); wxFlexGridSizer * panelSizer = new wxFlexGridSizer(4); panelSizer -> AddGrowableCol(2); #endif -printf("EED wxContourViewPanel::wxContourViewPanel 01\n"); -printf("EED wxContourViewPanel::wxContourViewPanel 1\n"); panelSizer->Add(_verticalBar, 1, wxGROW); -printf("EED wxContourViewPanel::wxContourViewPanel 2\n"); panelSizer->AddSpacer(gapV); -printf("EED wxContourViewPanel::wxContourViewPanel 3\n"); panelSizer->Add(theViewPanel, 1, wxGROW); -printf("EED wxContourViewPanel::wxContourViewPanel 4\n"); panelSizer->AddSpacer(gapV); //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 @@ -155,8 +149,6 @@ printf("EED wxContourViewPanel::wxContourViewPanel 4\n"); outSizer = new wxFlexGridSizer(3); outSizer -> AddGrowableCol(1); #endif -printf("EED wxContourViewPanel::wxContourViewPanel 5\n"); -printf("EED wxContourViewPanel::wxContourViewPanel 7\n"); outSizer->Add( _horizontalBar, 1, wxGROW); outSizer->Add( panelSizer, 1, wxGROW); outSizer->AddSpacer(gapH); @@ -164,7 +156,6 @@ printf("EED wxContourViewPanel::wxContourViewPanel 7\n"); _horizontalBar->setDeviceBlitStart( _verticalBar->GetWidth() + 2*gapH, gapV); _horizontalBar->setDeviceEndMargin( 2*gapH+10 ); -printf("EED wxContourViewPanel::wxContourViewPanel 8\n"); //Connecting the events to the horizontal bar Connect(_horizontalBar->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onBarrange_Horizontal ); Connect(_horizontalBar->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onActualChange_Bar_Horizontal ); @@ -172,7 +163,6 @@ printf("EED wxContourViewPanel::wxContourViewPanel 8\n"); Connect(_horizontalBar->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onEndChange_Bar_Horizontal ); Connect(_horizontalBar->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onSelectionEnd_Horizontal ); Connect(_horizontalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Horizontal ); -printf("EED wxContourViewPanel::wxContourViewPanel 9\n"); //Connecting the events to the vertical bar Connect(_verticalBar->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onBarrange_Vertical ); @@ -181,19 +171,14 @@ printf("EED wxContourViewPanel::wxContourViewPanel 9\n"); Connect(_verticalBar->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onEndChange_Bar_Vertical ); Connect(_verticalBar->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onSelectionEnd_Vertical ); Connect(_verticalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Vertical ); -printf("EED wxContourViewPanel::wxContourViewPanel 9.1\n"); this->SetSizer( outSizer ); -printf("EED wxContourViewPanel::wxContourViewPanel 9.2\n"); this->SetAutoLayout( true ); -printf("EED wxContourViewPanel::wxContourViewPanel 9.3\n"); this->Layout(); //SetSize(1900,1900); //theViewPanel->SetSize(800,600); //theViewPanel->GetWindow(1)->SetSize(800,600); //outSizer->Fit( this ); -printf("EED wxContourViewPanel::wxContourViewPanel 10\n"); initializeScenceManager(); -printf("EED wxContourViewPanel::wxContourViewPanel End\n"); } diff --git a/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx index dc5ff99..e47a1ad 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx @@ -143,15 +143,11 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE ) */ void wxInstantChooserPanel :: addConcept(std::string aConceptName, int minV, int maxV, int actualV) { -printf("EED wxInstantChooserPanel :: addConcept Start\n"); wxConceptControl * nwConcept = new wxConceptControl(this, _orientation, minV, maxV, actualV, aConceptName, _configuration); _concepts->push_back( nwConcept ); _lastConceptUpdated = nwConcept; -printf("EED wxInstantChooserPanel :: addConcept 1\n"); _outSizer->Add(nwConcept, wxEXPAND); -printf("EED wxInstantChooserPanel :: addConcept 2\n"); Connect(nwConcept->GetId(), wxEVT_CONCEPT_RELEASE, (wxObjectEventFunction) (wxCommandEventFunction) &wxInstantChooserPanel::onConceptRelease ); -printf("EED wxInstantChooserPanel :: addConcept End\n"); } void wxInstantChooserPanel :: setWxEventHandler( wxEvtHandler * theEventHandler )