]> Creatis software - creaContours.git/commitdiff
#onLoad without interface
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 16 Mar 2023 10:15:39 +0000 (11:15 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 16 Mar 2023 10:15:39 +0000 (11:15 +0100)
bbtk/src/bbcreaContoursSetFileLocation.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h

index 84c73b257a6a0df7a80d7a2171a36f6ab1dc023e..fde62e040e4bf2b67fa4bebe4eb1f1b7dd731e8a 100644 (file)
@@ -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
 }
index 3961f40d8aedb16ddd4220f21bcdfc18d447cb66..9dffcd620ad7f624764eee31fd3ebf433dee7243 100644 (file)
@@ -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)
index 7c6237531a89240e1e89d660f6bd617f27278114..7b80e5b473257a415ab54df7c10e25f33d4e7cda 100644 (file)
@@ -206,7 +206,7 @@ class wxContourMainFrame : public wxPanel {
        void createCopyContourOf ( std::string anExistingKName, std::vector<int> &instantNoTouchData, bool append );
        void createMirrorContourOf ( std::string anExistingKName, std::vector<int> &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 );