]> Creatis software - creaContours.git/blobdiff - lib/Interface_Icons_NDimensions/interfMainPanel.cxx
*** empty log message ***
[creaContours.git] / lib / Interface_Icons_NDimensions / interfMainPanel.cxx
index 4b8c16e9037c8b040bbeb4340c531f02a7b5d41b..60a8d17c929c0bc164365d0ddceb4f41dd52d1fc 100644 (file)
@@ -38,8 +38,6 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        splitterwindow->SetMinimumPaneSize( 10 );
        sizey = sizey/8;
 
-       
-
        wxPanel* toolpanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
 
        wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6,2,1,1);      
@@ -298,7 +296,7 @@ void interfMainPanel::showPanel(wxWindow* panel)
 }
 
 /**
-**     Hide the panel in the 
+**     Hide the panel in the lower box
 **/
 void interfMainPanel::hidePanel( ){
        wxContourMainFrame::getInstance()->showAxis(false);
@@ -415,16 +413,6 @@ void interfMainPanel::onSegmentationAllSlice(int minZ,int maxZ,int isovalue,int
        wxContourMainFrame::getInstance()->onSegmentationAllSlice(minZ, maxZ,isovalue,sampling,method);
 }
 
-void interfMainPanel::onMirror()
-{
-       wxContourMainFrame::getInstance()->onMirror();
-}
-
-void interfMainPanel::onMirrorChangeWidth(int width)
-{
-       wxContourMainFrame::getInstance()->refLineChangeWidth(width);
-}
-
 void interfMainPanel::setLabelSegmentationPanelVTK(wxString tmpString){        
     ((interfSegmentationPanelVTK*)segmentationPanel)->setLabel(tmpString);
 }
@@ -496,7 +484,8 @@ void interfMainPanel::onBrigthnessColorWindowLevel(int colorwindow,int windowlev
        wxContourMainFrame::getInstance()->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
 }
 
-void interfMainPanel::onInterpolation(bool interpolate){
+void interfMainPanel::onInterpolation(bool interpolate)
+{
        wxContourMainFrame::getInstance()->onInterpolation(interpolate);
 }
 
@@ -642,7 +631,10 @@ wxString interfMainPanel::getCellValue(int j,int i){
        return ((interfInformationPanel*)informationPanel)->getCellValue(j, i );
 }
 
-void interfMainPanel::onSnakePressed(){
+void interfMainPanel::onSnakePressed()
+{
+       axisshown=false;
+       wxContourMainFrame::getInstance()->showAxis(axisshown);
     wxContourMainFrame::getInstance()->onSnakePressed();
 }
 
@@ -664,38 +656,81 @@ void interfMainPanel::onMirrorPressed(){
                mirrorPanel->Layout();
 
                refLineShown=true;
-
-               showPanel(mirrorPanel);
                wxContourMainFrame::getInstance()->referenceLine();
        }       
 
        else
        {
-               if(refLineShown)
-               {
-                       wxContourMainFrame::getInstance()->refLineHide();
-                       refLineShown=false;
-
-                       hidePanel();
-               }
 
-               else if (!refLineShown)
+               if (!refLineShown)
                {
                        wxContourMainFrame::getInstance()->refLineShow();
                        refLineShown=true;
-
-                       showPanel(mirrorPanel);
                }
        }
 
+       showPanel(mirrorPanel);
 }
 
-       
+void interfMainPanel::onMirror()
+{
+       wxContourMainFrame::getInstance()->onMirror();
+}
+
+void interfMainPanel::onMirrorAxisShow()
+{
+       if (!refLineShown)
+       {
+               wxContourMainFrame::getInstance()->refLineShow();
+               refLineShown=true;
+       }
+}
+
+void interfMainPanel::onMirrorAxisHide()
+{
+       if (refLineShown)
+       {
+               wxContourMainFrame::getInstance()->refLineHide();
+               refLineShown=false;
+       }
+}
+
+void interfMainPanel::onMirrorChangeWidth(int width)
+{
+       wxContourMainFrame::getInstance()->refLineChangeWidth(width);
+}
+
+
 void interfMainPanel::onThreshold(int minVal, int maxVal)
 {
        wxContourMainFrame::getInstance()->onThreshold(minVal, maxVal);
 }
 
+void interfMainPanel::onThresholdChange(int minVal, int maxVal)
+{
+       wxContourMainFrame::getInstance()->onThresholdChange(minVal, maxVal);
+}
+
+void interfMainPanel::onThresholdInstantChange(int range[])
+{
+       panelThreshold->onThresholdInstantChange(range);
+}
+
+void interfMainPanel::onThresholdInterpolation(bool interpolate)
+{
+       wxContourMainFrame::getInstance()->onThresholdInterpolation(interpolate);
+}
+
+void interfMainPanel::onThresholdChangeOpacity (int opacity)
+{
+       wxContourMainFrame::getInstance()->onThresholdChangeOpacity(opacity);
+}
+
+void interfMainPanel::onThresholdRemove()
+{
+       wxContourMainFrame::getInstance()->onThresholdRemove();
+}
+
 void interfMainPanel::onThresholdPressed()
 {
     if(thresholdPanel==NULL)
@@ -713,24 +748,7 @@ void interfMainPanel::onThresholdPressed()
                flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
                flexsizer->Add(panelThreshold, wxEXPAND);
                thresholdPanel->Layout();
-               showPanel(thresholdPanel);
-       }       
 
-
-               else
-       {
-               if(thresholdShown)
-               {
-                       thresholdShown=false;
-                       panelThreshold->onThresholdStop();
-                       
-                       hidePanel();
-               }
-
-               else if (!thresholdShown)
-               {
-                       thresholdShown=true;
-                       showPanel(thresholdPanel);
-               }
-       }
+       }       
+       showPanel(thresholdPanel);
 }