From e4a8d645b4aec3835d1b51a1f8d8f68a9da6a047 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 16 Mar 2023 11:15:39 +0100 Subject: [PATCH] #onLoad without interface --- bbtk/src/bbcreaContoursSetFileLocation.cxx | 7 ++++--- .../wxContourMainFrame.cxx | 4 ++-- .../wxContourMainFrame.h | 8 +++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/bbtk/src/bbcreaContoursSetFileLocation.cxx b/bbtk/src/bbcreaContoursSetFileLocation.cxx index 84c73b2..fde62e0 100644 --- a/bbtk/src/bbcreaContoursSetFileLocation.cxx +++ b/bbtk/src/bbcreaContoursSetFileLocation.cxx @@ -37,14 +37,15 @@ void SetFileLocation::Process() { if (wxContourMainFrame::getInstance()->GetFileLocation().empty()==true) { - wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() ); + wxContourMainFrame::getInstance()->SetFileLocation( bbGetInputFileLocation() ); }else { wxContourMainFrame::getInstance()->onSave(); wxContourMainFrame::getInstance()->deleteAllContours(); - wxContourMainFrame::getInstance()->SetFileLocation(bbGetInputFileLocation() ); + wxContourMainFrame::getInstance()->SetFileLocation( bbGetInputFileLocation() ); } // if FileLocaton - wxContourMainFrame::getInstance()->onLoad(); + wxContourMainFrame::getInstance()->onLoad( false ); + wxContourMainFrame::getInstance()->RefreshInterface(); } // if Instance } diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 3961f40..9dffcd6 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -872,7 +872,7 @@ void wxContourMainFrame ::loadState(std::string filename) onLoadContours(filename,false); } -void wxContourMainFrame::onLoad() +void wxContourMainFrame::onLoad(bool interactiveInterface) // interactiveInterface default true { std::string fileNameContourROI = GetFileLocation(); //CMRU 03-09-09----------------------------------------------------------------------------------------------- @@ -890,7 +890,7 @@ void wxContourMainFrame::onLoad() fileNameContourROI = (const char *)(dialog.GetPath().mb_str()); } // if dialog } // if FileLocation - onLoadContours(fileNameContourROI,true); + onLoadContours(fileNameContourROI, interactiveInterface ); } void wxContourMainFrame::SetZForAllContours(int pz) diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 7c62375..7b80e5b 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -206,7 +206,7 @@ class wxContourMainFrame : public wxPanel { void createCopyContourOf ( std::string anExistingKName, std::vector &instantNoTouchData, bool append ); void createMirrorContourOf ( std::string anExistingKName, std::vector &instantNoTouchData, bool append ); ///////////////////////7 - void onLoad(); + void onLoad(bool interactiveInterface=true); void onSave(); void onImport(); void onTest(); @@ -328,10 +328,8 @@ class wxContourMainFrame : public wxPanel { std::string GetStringTypeImage( vtkImageData* image); //------------------------------------------------------------------------------------------------------------ - void SetXY(int x,int y); - private: //------------------------------------------------------------------------------------------------------------ // Private methods @@ -392,8 +390,8 @@ private: manualBaseModel * factoryManualContourModel(wxPanel* panel); ContourExtractData *_contourextractdata; - void saveState(); - void loadState(std::string filename); + void saveState(); + void loadState(std::string filename); // void loadContours( FILE *pFile, bool staticContour ); -- 2.47.1