]> Creatis software - creaImageIO.git/blobdiff - appli/TestWxGimmickReaderDialog/main.cxx
Added settings and tools tools.
[creaImageIO.git] / appli / TestWxGimmickReaderDialog / main.cxx
index 9c9c1649d064c5dcdd9c9f4c789f4891f27a5d47..b313e90d0e3ee3a8104dd0f01fbc56c24c1bd9cf 100644 (file)
@@ -24,10 +24,10 @@ bool myApp::OnInit( )
 #endif
    wxInitAllImageHandlers();
 
-   /*
-   creaImageIO::SetGimmickMessageLevel(9);
-   creaImageIO::SetGimmickDebugMessageLevel(9);
-   */
+   
+   creaImageIO::SetGimmickMessageLevel(5);
+   creaImageIO::SetGimmickDebugMessageLevel(0);
+   
 
    int min_dim = GIMMICK_2D_IMAGE_SELECTION;
    int max_dim = GIMMICK_3D_IMAGE_SELECTION;
@@ -38,10 +38,10 @@ bool myApp::OnInit( )
                                        -1,
                                        _T("Select image(s)        - Gimmick! (c) CREATIS-LRMN 2008"),
                                        wxDefaultPosition,
-                                       wxSize(1200,800),
+                                       wxSize(810,750),
                                        min_dim,
                                        max_dim,
-                                       //      output_dim,
+                                       output_dim,
                                        threads);
    w.ShowModal();
    
@@ -49,6 +49,7 @@ bool myApp::OnInit( )
      {
        std::cout << "$$$$ main : user clicked 'OK' $$$$"<<std::endl;
        std::cout << "$$$$ selected files : "<<std::endl;
+          //Puts filenames
        std::vector<std::string> s;
        w.GetSelectedFiles(s);
        std::vector<std::string>::iterator i;
@@ -58,18 +59,24 @@ bool myApp::OnInit( )
         }
        std::cout << "$$$$ "<<std::endl;
 
+          //Puts images
        std::vector<vtkImageData*> images;
-       w.GetSelectedImages(images,3);
-       crea::VtkBasicSlicer(images.front());
+          w.GetSelectedImages(images,output_dim);
+          std::cout<<images.size()<<std::endl;
+
+          crea::VtkBasicSlicer(images.front());
        images.front()->Delete();
+          w.OnExit();
 
      }
    else if (w.GetReturnCode() == wxID_CANCEL)
      {
+          w.OnExit();
        std::cout << "$$$$ main : user clicked 'CANCEL' $$$$"<<std::endl;
      }
    else 
      {
+                w.OnExit();
         std::cout << "$$$$ main : dialog ended without return code ! $$$$"
                  <<std::endl;