From f4bf5ed6d7ca30544fbc24b642ae99209b619e7e Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Mon, 21 Oct 2024 11:31:15 +0200 Subject: [PATCH] #3393 ResetCamera MainFrame_tool box --- bbtk/src/bbcreaContoursSetColorLayerImage.cxx | 6 +++--- bbtk/src/bbcreaContourswxContourMainFrame_tool.cxx | 9 +++++++-- .../wxContourMainFrame.cxx | 4 ++++ .../wxContourMainFrame.h | 6 +++++- 4 files changed, 19 insertions(+), 6 deletions(-) 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 -- 2.47.1