From: eduardo.davila@creatis.insa-lyon.fr Date: Mon, 21 Oct 2024 09:31:15 +0000 (+0200) Subject: #3393 ResetCamera MainFrame_tool box X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f4bf5ed6d7ca30544fbc24b642ae99209b619e7e;p=creaContours.git #3393 ResetCamera MainFrame_tool box --- diff --git a/bbtk/src/bbcreaContoursSetColorLayerImage.cxx b/bbtk/src/bbcreaContoursSetColorLayerImage.cxx index 430ac4f..6929135 100644 --- a/bbtk/src/bbcreaContoursSetColorLayerImage.cxx +++ b/bbtk/src/bbcreaContoursSetColorLayerImage.cxx @@ -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 } diff --git a/bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx b/bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx index 5fe2ff8..3dfe221 100644 --- a/bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx +++ b/bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx @@ -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 } //===== diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index f963880..34b3d15 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -3426,5 +3426,9 @@ wxVtkBaseView* wxContourMainFrame::GetWxVtkBaseView() } } +void wxContourMainFrame::ResetCamera() +{ + GetWxVtkBaseView()->GetRenderer()->ResetCamera(); +} diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 8ae1572..7d6bc02 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -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