]> Creatis software - clitk.git/blobdiff - vv/vv.cxx
basic GUI state reading/saving
[clitk.git] / vv / vv.cxx
index 301521b4662a8509197d81174b348964b4e5e140..7f640a52a0579d660b251643a0357c8a7ad42327 100644 (file)
--- a/vv/vv.cxx
+++ b/vv/vv.cxx
@@ -30,6 +30,7 @@
 
 #include "clitkIO.h"
 #include "vvMainWindow.h"
+#include "vvReadState.h"
 #include "vvToolsList.h"
 #include <vtkFileOutputWindow.h>
 #include <vtkSmartPointer.h>
@@ -168,7 +169,14 @@ int main( int argc, char** argv )
           vtk_log->FlushOn();
           vtk_log->AppendOn();
           vtkOutputWindow::SetInstance(vtk_log);
+        } else if (current == "--state") {
+          //window.ReadSavedStateFile(argv[i+1]);
+          vvReadState read_state;
+          read_state.Run(&window, argv[i+1]);
+          n_image_loaded += read_state.GetNumberOfImages();
+          i++;
         }
+        
       } else if (parse_mode == P_SEQUENCE) {
         sequence_filenames.push_back(current);
       } else if (parse_mode == P_WINDOW) {