X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_Icons_NDimensions%2FinterfToolsPanels.cxx;fp=lib%2FInterface_Icons_NDimensions%2FinterfToolsPanels.cxx;h=d2505d571232b1567926022f810977ba9b4c1d16;hb=7ef64acb00d37e665e0bf019b9a7ede2495bf155;hp=f59c2e20262870de974c22492878cc93331ad8df;hpb=28671ae02163f2b674da599a98a128f58dfead88;p=creaContours.git diff --git a/lib/Interface_Icons_NDimensions/interfToolsPanels.cxx b/lib/Interface_Icons_NDimensions/interfToolsPanels.cxx index f59c2e2..d2505d5 100644 --- a/lib/Interface_Icons_NDimensions/interfToolsPanels.cxx +++ b/lib/Interface_Icons_NDimensions/interfToolsPanels.cxx @@ -223,6 +223,7 @@ void interfSpreadPanel::setStringSpread(std::string stringtemp){ interfInformationPanel::interfInformationPanel(wxWindow * parent) : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN) { +printf("EED interfInformationPanel::interfInformationPanel Start\n"); //wxPanel *panel = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxTAB_TRAVERSAL); wxString lstOptions[4]; lstOptions[0]=_T("Current Slice"); @@ -230,7 +231,6 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) // lstOptions[2]=_T("All Slices"); _informationRadiobox = new wxRadioBox(this, -1, _T("Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS); - wxString lstOptContOperation[5]; lstOptContOperation[0]=_T("AND"); lstOptContOperation[1]=_T("OR"); @@ -240,53 +240,73 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) _radiolstboxContourGroup->SetSelection(1); Connect( _radiolstboxContourGroup->GetId(), wxEVT_COMMAND_RADIOBOX_SELECTED , (wxObjectEventFunction) &interfInformationPanel::onContourGroup ); +printf("EED interfInformationPanel::interfInformationPanel 1\n"); - _XYZValues = new wxCheckBox(this, -1, _T("Save Contour Values") ); - _XYZValues->SetValue(true); - _contourImage = new wxCheckBox(this, -1, _T("Extract Contours as Images") ); + _XYZValues = new wxCheckBox(this, -1, _T("Save Contour Values") ); + _XYZValues->SetValue(true); + _contourImage = new wxCheckBox(this, -1, _T("Extract Contours as Images") ); _contourImage->SetValue(true); - - _statistics = new wxCheckBox(this, -1, _T("Save Statistics") ); + _statistics = new wxCheckBox(this, -1, _T("Save Statistics") ); _statistics->SetValue(true); + wxButton *informationContourLabelsBtn = new wxButton(this,-1,_T("Contour labels"),wxDefaultPosition, wxSize(140,35) ); +#if wxMAJOR_VERSION <= 2 informationContourLabelsBtn->SetEventHandler( this ); +#else + // informationContourLabelsBtn->SetEventHandler( this ); + printf("EED interfInformationPanel::interfInformationPanel OOOjjjooooooo informationContourLabelsBtn->SetEventHandler \n"); +#endif Connect( informationContourLabelsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onInformationContourLabels ); wxButton *statisticsContourBtn = new wxButton(this,-1,_T("Contour statistics"),wxDefaultPosition, wxSize(140,35) ); +#if wxMAJOR_VERSION <= 2 statisticsContourBtn->SetEventHandler( this ); +#else + //statisticsContourBtn->SetEventHandler( this ); + printf("EED interfInformationPanel::interfInformationPanel OOOjjjooooooo statisticsContourBtn->SetEventHandler \n"); +#endif Connect( statisticsContourBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onExtractInformation ); wxButton *showResultImagesBtn = new wxButton(this,-1,_T("Show result images"),wxDefaultPosition, wxSize(140,35) ); +#if wxMAJOR_VERSION <= 2 showResultImagesBtn->SetEventHandler( this ); +#else + //showResultImagesBtn->SetEventHandler( this ); + printf("EED interfInformationPanel::interfInformationPanel OOOjjjooooooo showResultImagesBtn->SetEventHandler \n"); +#endif Connect( showResultImagesBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onShowResultImages ); - wxButton *saveResultsBtn = new wxButton(this,-1,_T("Save Results"),wxDefaultPosition, wxSize(140,35) ); +#if wxMAJOR_VERSION <= 2 saveResultsBtn->SetEventHandler( this ); - Connect( saveResultsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onSaveResults ); +#else +//EED saveResultsBtn->SetEventHandler( this ); +printf("EED interfInformationPanel::interfInformationPanel OOOjjjooooooo saveResultsBtn->SetEventHandler \n"); +#endif + Connect( saveResultsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onSaveResults ); int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ(); + //_theViewPanel->getSceneManager()->GetImageDataSizeZ(); _mbarrangeSliceInformation = new mBarRange(this,65,65); _mbarrangeSliceInformation->SetMin(0); _mbarrangeSliceInformation->SetStart(0); - _mbarrangeSliceInformation-> SetOrientation( true ); - _mbarrangeSliceInformation-> setActiveStateTo(true); - _mbarrangeSliceInformation-> setVisibleLabels( true ); - _mbarrangeSliceInformation-> setDeviceEndMargin(10); - _mbarrangeSliceInformation-> setRepresentedValues( 0 , sizeZ-1 ); - _mbarrangeSliceInformation-> setDeviceBlitStart(10,10); - _mbarrangeSliceInformation-> setIfWithActualDrawed( false ); - _mbarrangeSliceInformation-> SetStart( 0 ); - _mbarrangeSliceInformation-> SetEnd( sizeZ-1 ); - - + _mbarrangeSliceInformation->SetOrientation( true ); + _mbarrangeSliceInformation->setActiveStateTo(true); + _mbarrangeSliceInformation->setVisibleLabels( true ); + _mbarrangeSliceInformation->setDeviceEndMargin(10); + _mbarrangeSliceInformation->setRepresentedValues( 0 , sizeZ-1 ); + _mbarrangeSliceInformation->setDeviceBlitStart(10,10); + _mbarrangeSliceInformation->setIfWithActualDrawed( false ); + _mbarrangeSliceInformation->SetStart( 0 ); + _mbarrangeSliceInformation->SetEnd( sizeZ-1 ); double range[2]; interfMainPanel::getInstance()->getImageRange(range); +printf("EED interfInformationPanel::interfInformationPanel 2\n"); int min = (int)floor (range[0]); int max = (int)ceil (range[1]); @@ -313,45 +333,54 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation ); +printf("EED interfInformationPanel::interfInformationPanel 3\n"); _staticTextInformation = new wxStaticText(this,-1,_T(" ")); - _grid = new wxGrid( this, wxID_ANY, wxPoint( 0, 0 ), wxSize( 200, 500 ) ); - int i,gridCol=10,gridRow=sizeZ+2; _grid->CreateGrid( 0, 0 ); _grid->AppendRows(gridRow); _grid->AppendCols(gridCol); - for (i=0;iSetRowLabelValue(i, _T(" ") ); } // _grid->SetColLabelSize(0); - - FillGridWithContoursInformation(); + //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 #if wxMAJOR_VERSION <= 2 wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2,2); #else - wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2); + wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2,2,0,0); #endif sizerSave -> Add( new wxStaticText(this,-1,_T("Save Options: ")) , 1, wxGROW ); sizerSave->Add( _XYZValues, 1, wxALL, 2 ); sizerSave->Add( _statistics, 1, wxALL, 2 ); sizerSave->Add( _contourImage, 1, wxALL, 2 ); + +printf("EED interfInformationPanel::interfInformationPanel 4\n"); +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 wxFlexGridSizer * sizerA = new wxFlexGridSizer(10); +#else + wxFlexGridSizer * sizerA = new wxFlexGridSizer(1,10,0,0); +#endif sizerA->Add( _informationRadiobox, 1, wxALL, 2 ); sizerA->Add( _radiolstboxContourGroup, 1, wxALL, 2 ); sizerA->Add( sizerSave, 1, wxALL, 2 ); +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 wxFlexGridSizer * sizerB = new wxFlexGridSizer(10); +#else + wxFlexGridSizer * sizerB = new wxFlexGridSizer(1,4,0,0); +#endif sizerB->Add( informationContourLabelsBtn, 1, wxALL, 2 ); sizerB->Add( statisticsContourBtn, 1, wxALL, 2 ); sizerB->Add( showResultImagesBtn, 1, wxALL, 2 ); @@ -361,23 +390,38 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) #if wxMAJOR_VERSION <= 2 wxFlexGridSizer * sizer = new wxFlexGridSizer(1,8); #else - wxFlexGridSizer * sizer = new wxFlexGridSizer(8); + wxFlexGridSizer * sizer = new wxFlexGridSizer(20,1,0,0); #endif +printf("EED interfInformationPanel::interfInformationPanel 5\n"); sizer->Add( sizerA , 1, wxALL , 0 ); - sizer->Add( new wxStaticText(this ,-1,_T("Slice Range")) , 1, wxALL , 0 ); +printf("EED interfInformationPanel::interfInformationPanel 5.1\n"); + sizer->Add( new wxStaticText(this ,1,_T("Slice Range")) , 1, wxALL , 0 ); +printf("EED interfInformationPanel::interfInformationPanel 5.2\n"); sizer->Add( _mbarrangeSliceInformation , 1, wxALL|wxGROW , 2 ); - sizer->Add( new wxStaticText(this ,-1,_T("Gray Range")) , 1, wxALL , 0 ); +printf("EED interfInformationPanel::interfInformationPanel 5.3\n"); + sizer->Add( new wxStaticText(this ,1,_T("Gray Range")) , 1, wxALL , 0 ); +printf("EED interfInformationPanel::interfInformationPanel 5.4\n"); sizer->Add( _mbarrangeRangeInformation , 1, wxALL|wxGROW , 2 ); +printf("EED interfInformationPanel::interfInformationPanel 5.5\n"); + sizer->Add( sizerB , 1, wxEXPAND , 0 ); + +printf("EED interfInformationPanel::interfInformationPanel 5.6\n"); sizer->Add( _staticTextInformation , 1, wxEXPAND , 0 ); +printf("EED interfInformationPanel::interfInformationPanel 5.7\n"); sizer->Add( _grid , 1, wxEXPAND , 0 ); - +printf("EED interfInformationPanel::interfInformationPanel 5.8\n"); this->SetSizer( sizer ); +printf("EED interfInformationPanel::interfInformationPanel 5.9\n"); this->SetSize( wxSize(1500,1500) ); //this->SetBackgroundColour( wxColour(100,100,100) ); this->SetAutoLayout( true ); +printf("EED interfInformationPanel::interfInformationPanel 5.10\n"); this->Layout(); //return panel; + +printf("EED interfInformationPanel::interfInformationPanel End\n"); + } interfInformationPanel::~interfInformationPanel()