]> Creatis software - creaImageIO.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 6 Oct 2010 21:04:47 +0000 (21:04 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 6 Oct 2010 21:04:47 +0000 (21:04 +0000)
src/creaImageIOExternalGimmick.cpp

index 8201a8193c3bd6f698605d51ea969da542c52110..1808d231761b425fbd83bb4bf843fac3d842a9cd 100644 (file)
@@ -1,6 +1,34 @@
-#include <creaImageIOExternalGimmick.h>
 
+#include <creaImageIOWxSimpleDlg.h>
 
+//EED Borrame
+//#include <creaImageIOExternalGimmick.h>
+
+
+vtkImageData* getImageDataDialog()
+{
+    wxString infoImage;
+    std::vector<vtkImageData*> images;
+    creaImageIO::WxSimpleDlg w(0,_T("Select your image"),"creaContours_Descriptor.dscp","creatisContours DB");
+    w.ShowModal();
+    if(w.GetReturnCode() == wxID_OK)
+    {
+        std::vector<std::string> s;
+        images   = w.getImagesSelected();
+        infoImage = w.getInfoImage();
+    } // if
+
+    vtkImageData *result=NULL;
+    if (images.size()>0)
+    {
+        result=images[0];
+    }
+
+    return result;
+}
+
+
+/*EED Borrame
 vtkImageData* getImageDataDialog() {
        //      wxApp::OnInit();
        #ifdef __WXGTK__
@@ -15,11 +43,11 @@ vtkImageData* getImageDataDialog() {
           int min_dim = GIMMICK_2D_IMAGE_SELECTION;
           int max_dim = GIMMICK_3D_IMAGE_SELECTION;
           int output_dim = NATIVE;
-          int threads = 1;         
+          int threads = 1;
 
           creaImageIO::WxGimmickReaderDialog w(
                                                0,
-                                          -1, 
+                                          -1,
                                           "localdatabase_Descriptor.dscp",
                                           "Local Database",
                                           _T("Select image(s)        - Gimmick! (c) CREATIS-LRMN 2008"),
@@ -39,7 +67,7 @@ vtkImageData* getImageDataDialog() {
                   std::vector<std::string> s;
                   w.GetSelectedFiles(s);
                   std::vector<std::string>::iterator i;
-                  for (i=s.begin();i!=s.end();++i) 
+                  for (i=s.begin();i!=s.end();++i)
                         {
                           std::cout << *i << std::endl;
                         }
@@ -55,7 +83,7 @@ vtkImageData* getImageDataDialog() {
 
                   //crea::VtkBasicSlicer(images.front());
                   //images.front()->Delete();
-                  
+
 
                 }
           else if (w.GetReturnCode() == wxID_CANCEL)
@@ -63,11 +91,11 @@ vtkImageData* getImageDataDialog() {
                   w.OnExit();
                   std::cout << "$$$$ main : user clicked 'CANCEL' $$$$"<<std::endl;
                 }
-          else 
+          else
                 {
                   w.OnExit();
                   std::cout << "$$$$ main : dialog ended without return code ! $$$$"
-                                        <<std::endl;    
+                                        <<std::endl;
                 }
 
           //   std::cout << "$$$$ main : deleting dialog"<<std::endl;
@@ -75,5 +103,6 @@ vtkImageData* getImageDataDialog() {
           std::cout << "$$$$$$$$$$$$$$$$$$$$ main ended "<<std::endl;
           return NULL;
        }
-       
-       
+
+
+*/