]> Creatis software - clitk.git/blobdiff - vv/vv.cxx
basic GUI state reading/saving
[clitk.git] / vv / vv.cxx
index f7b95df3139c056667d8bb622df95263a4f25e05..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>
@@ -169,7 +170,10 @@ int main( int argc, char** argv )
           vtk_log->AppendOn();
           vtkOutputWindow::SetInstance(vtk_log);
         } else if (current == "--state") {
-          window.ReadSavedStateFile(argv[i+1]);
+          //window.ReadSavedStateFile(argv[i+1]);
+          vvReadState read_state;
+          read_state.Run(&window, argv[i+1]);
+          n_image_loaded += read_state.GetNumberOfImages();
           i++;
         }