]> Creatis software - creaContours.git/commitdiff
#3393 ResetCamera MainFrame_tool box
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 21 Oct 2024 09:31:15 +0000 (11:31 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 21 Oct 2024 09:31:15 +0000 (11:31 +0200)
bbtk/src/bbcreaContoursSetColorLayerImage.cxx
bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h

index 430ac4ffd577a3e34e541e26debf8d7af7a6b751..6929135cfe19b91cd63758ae98cc882c1df700af 100644 (file)
@@ -33,11 +33,11 @@ void SetColorLayerImage::Process()
  
        if (wxContourMainFrame::getInstance()!=NULL)
        { 
-               if (bbGetInputIn()!=NULL) 
-               {
+//             if (bbGetInputIn()!=NULL)
+//             {
                        wxContourMainFrame *wxcontourmainframe=wxContourMainFrame::getInstance();
                        wxcontourmainframe->SetColorLayerImage( bbGetInputIn() );
-               } // InputIn
+//             } // InputIn
        } // if Instance
 }
 
index 5fe2ff8aa4f68bf676951d6f668500ac49350bee..3dfe221f80e378ea9ff2739b362bf1d7f22cbbf9 100644 (file)
@@ -85,8 +85,13 @@ void wxContourMainFrame_tool::Process()
                     printf("BBTK warnning!!  wxContourMainFrame_tool box. In Type=1 the Param1 es not complite \n");
                 }// size
             }  // if Image
-        } // Type==1
-    }
+        } // Type==2
+        
+        if (bbGetInputType()==3)
+        {
+            wxContourMainFrame::getInstance()->ResetCamera();
+        } // Type 3
+    } // if wxContourMainFrame::getInstance()!=NULL
     
 }
 //===== 
index f96388051794429e416dae9a68e83de7d96a0cf0..34b3d151211ee2cf5ad65949fb9e7a0c4578811b 100644 (file)
@@ -3426,5 +3426,9 @@ wxVtkBaseView* wxContourMainFrame::GetWxVtkBaseView()
        }
 }
 
+void wxContourMainFrame::ResetCamera()
+{
+    GetWxVtkBaseView()->GetRenderer()->ResetCamera();
+}
 
 
index 8ae15725ca5794ad86377b26e343062a75f6b32f..7d6bc02239c86aaff95eb781777a456e97d84c07 100644 (file)
@@ -330,6 +330,10 @@ class wxContourMainFrame : public wxPanel {
 
 //------------------------------------------------------------------------------------------------------------
        void SetXY(int x,int y);
+    
+    //------------------------------------------------------------------------------------------------------------
+    void                        ResetCamera();
+
 
 private:
        //------------------------------------------------------------------------------------------------------------
@@ -415,7 +419,7 @@ private:
 //------------------------------------------------------------------------------------------------------------
 
        wxFrame                                         *_frameShowResultImages;
-
+    
 };
 
 #endif