X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FColorLayerImageViewPanel.cxx;h=0d7cc29458bd18d695d9dc3de3cc895426173e94;hb=622932e16dd25f4a3160552ab96c92975df59b81;hp=cad61bd9c6b7382f286c5db306b61b9f288bcddb;hpb=d92a7b41bf7a8a91f68ea25a66618fd94742c9c7;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx index cad61bd..0d7cc29 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx @@ -105,11 +105,12 @@ printf("EED ColorLayerImageViewPanel::ColorLayerImageViewPanel Start\n"); _histogram = NULL; _histogramMinMaxLevel = NULL; - wxFlexGridSizer * sizer = new wxFlexGridSizer(1); + wxFlexGridSizer * sizer = NULL; _colorLayerImageViewManager = new ColorLayerImageViewManager(); if (type==1) { + sizer = new wxFlexGridSizer(1); _btn_ReadImage = new wxButton(this, wxID_ANY, _T("Read Image") ); _thresholdGo = true; _cb_ShowHide = new wxCheckBox(this, wxID_ANY, _T("Show/Hide Layer") ); @@ -125,7 +126,7 @@ printf("EED ColorLayerImageViewPanel::ColorLayerImageViewPanel Start\n"); _sl_SliceImageX->Enable(false); _sl_SliceImageY->Enable(false); _sl_SliceImageZ->Enable(false); - _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image Interpolation") ); + _interpolationCheckBox = new wxCheckBox(this, -1, _T("Interpole") ); _interpolationCheckBox->SetValue(true); _opacity = new wxSlider(this, wxID_ANY, 6, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); @@ -179,12 +180,16 @@ printf("EED ColorLayerImageViewPanel::ColorLayerImageViewPanel Start\n"); if (type==2) { - _opacity = new wxSlider(this, wxID_ANY, 6, 1, 10, wxDefaultPosition, wxSize(2,40), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); + sizer = new wxFlexGridSizer(2); + _interpolationCheckBox = new wxCheckBox(this, -1, _T("Interpolate") ); + _interpolationCheckBox->SetValue(true); + _opacity = new wxSlider(this, wxID_ANY, 6, 0, 10, wxDefaultPosition, wxSize(2,40), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); + + Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &ColorLayerImageViewPanel::onThresholdInterpolation ); Connect( _opacity->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &ColorLayerImageViewPanel::onChangeOpacity ); // sizer -> Add( new wxStaticText(this,-1,_T("Opacity Level")) , 1, wxEXPAND ); -// sizer -> Add( _opacity, 1, wxGROW ); -// sizer -> Add( new wxStaticText(this,-1,_T("Opacity Level")) ); - sizer -> Add( _opacity ,1,wxGROW ); + sizer -> Add( _opacity , 1, wxGROW ); + sizer -> Add( _interpolationCheckBox , 1, wxGROW ); sizer->AddGrowableCol(0); } // type==2