]> Creatis software - creaImageIO.git/blobdiff - appli/TestWxGimmickReaderDialog/main.cxx
Added functionality of timestamp and maintenance databases when using multiple sources
[creaImageIO.git] / appli / TestWxGimmickReaderDialog / main.cxx
index 541cfa26e4f3f2783ce0bfb2f43c507d1620594c..45c72d69daadde5abd1005ea23bcc43a0060bb7c 100644 (file)
@@ -24,20 +24,24 @@ bool myApp::OnInit( )
 #endif
    wxInitAllImageHandlers();
 
-   /*
-   creaImageIO::SetGimmickMessageLevel(9);
-   creaImageIO::SetGimmickDebugMessageLevel(9);
-   */
+   
+   creaImageIO::SetGimmickMessageLevel(5);
+   creaImageIO::SetGimmickDebugMessageLevel(0);
+   
 
-   int image_type = GIMMICK_3D_IMAGE_SELECTION;
+   int min_dim = GIMMICK_2D_IMAGE_SELECTION;
+   int max_dim = GIMMICK_3D_IMAGE_SELECTION;
+   int output_dim = NATIVE;
    int threads = 1;
 
    creaImageIO::WxGimmickReaderDialog w(0,
                                        -1,
                                        _T("Select image(s)        - Gimmick! (c) CREATIS-LRMN 2008"),
                                        wxDefaultPosition,
-                                       wxSize(1200,800),
-                                       image_type,
+                                       wxSize(635,750),
+                                       min_dim,
+                                       max_dim,
+                                       output_dim,
                                        threads);
    w.ShowModal();
    
@@ -45,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;
@@ -54,18 +59,24 @@ bool myApp::OnInit( )
         }
        std::cout << "$$$$ "<<std::endl;
 
+          //Puts images
        std::vector<vtkImageData*> images;
-       w.GetSelectedImages(images);
-       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;