]> Creatis software - creaContours.git/blobdiff - lib/Interface_Icons_NDimensions/interfToolsPanels.cxx
#3322 creaContours Feature New Normal - Show reference contour Befor After actual...
[creaContours.git] / lib / Interface_Icons_NDimensions / interfToolsPanels.cxx
index 263d4e7078c0bc46d438b0c3ee2fc13a7252e1e5..b26ed89371a5082d90fdeefa08c73995f5f21e93 100644 (file)
@@ -51,9 +51,16 @@ interfConfigurationPanel::interfConfigurationPanel(wxWindow * parent)
        _brithtnessWindowLevel                                  = new wxSlider(this, -1, windowlevel , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
        _brithtnessColorLevel                                   = new wxSlider(this, -1, colorwindow , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
 
-       _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
+       _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image Interpolation") );
        _interpolationCheckBox->SetValue(true);
 
+       _beforContourCheckBox = new wxCheckBox(this, -1, _T("Befor Contour") );
+       _beforContourCheckBox->SetValue(false);
+
+       _afterContourCheckBox = new wxCheckBox(this, -1, _T("After Contour") );
+       _afterContourCheckBox->SetValue(false);
+
+
        Connect( _withOfContourLine->GetId(),     wxEVT_SCROLL_CHANGED,           (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
        Connect( _withOfContourLine->GetId(),     wxEVT_SCROLL_THUMBTRACK,        (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
 
@@ -62,20 +69,21 @@ interfConfigurationPanel::interfConfigurationPanel(wxWindow * parent)
        Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_CHANGED,           (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
        Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_THUMBTRACK,        (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
        Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnInterpolation);
+       Connect( _beforContourCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnBeforAfterContour);
+       Connect( _afterContourCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnBeforAfterContour);
 
        wxFlexGridSizer * sizer                                 = new wxFlexGridSizer(1);
        sizer -> Add( new wxStaticText(this,-1, _T("Contour width"))  , 1, wxGROW );
        sizer -> Add( _withOfContourLine                , 1, wxGROW );
        sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
-       sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
-       sizer -> Add( new wxStaticText(this,-1, _T("Brightness of the image"))  , 1, wxGROW );
-       sizer -> Add( new wxStaticText(this,-1, _T("--Window level--"))  , 1, wxGROW );
+       sizer -> Add( new wxStaticText(this,-1, _T("Window level"))  , 1, wxGROW );
        sizer -> Add( _brithtnessWindowLevel            , 1, wxGROW );
-       sizer -> Add( new wxStaticText(this,-1, _T("--Color level--"))  , 1, wxGROW );
+       sizer -> Add( new wxStaticText(this,-1, _T("Color level"))  , 1, wxGROW );
        sizer -> Add( _brithtnessColorLevel, 1, wxGROW );
        sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
-       sizer -> Add( new wxStaticText(this,-1, _T(" "))  , 1, wxGROW );
        sizer -> Add( _interpolationCheckBox            , 1, wxGROW );
+       sizer -> Add( _beforContourCheckBox             , 1, wxGROW );
+       sizer -> Add( _afterContourCheckBox             , 1, wxGROW );
 
        this->SetSizer( sizer );
        //JCP 13-10-08
@@ -91,8 +99,8 @@ interfConfigurationPanel::~interfConfigurationPanel()
 {
 }
 
-void interfConfigurationPanel::onWidthOfContour(wxScrollEvent& event){
-
+void interfConfigurationPanel::onWidthOfContour(wxScrollEvent& event)
+{
     double width = (double)_withOfContourLine->GetValue() / 2.0;
        interfMainPanel::getInstance()->onWidthOfContour(width);
 }
@@ -100,18 +108,20 @@ void interfConfigurationPanel::onWidthOfContour(wxScrollEvent& event){
 void interfConfigurationPanel::onBrigthnessColorWindowLevel(wxScrollEvent& event){
        int colorwindow                         = _brithtnessColorLevel->GetValue();
        int windowlevel                         = _brithtnessWindowLevel->GetValue();
-
        interfMainPanel::getInstance()->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
-
 }
 
 void interfConfigurationPanel::OnInterpolation(wxCommandEvent& event)
 {
        interfMainPanel::getInstance()->onInterpolation(_interpolationCheckBox->GetValue());
+}
 
-
+void interfConfigurationPanel::OnBeforAfterContour(wxCommandEvent& event)
+{
+       interfMainPanel::getInstance()->onBeforAfterContour(_beforContourCheckBox->GetValue() , _afterContourCheckBox->GetValue() );
 }
 
+
 /**
 ** Begin of the spread panel
 **/