]> Creatis software - creaImageIO.git/blobdiff - appli/TestWxGimmickReaderDialog/main.cxx
correction of minor bugs: quotes and last slice in first place
[creaImageIO.git] / appli / TestWxGimmickReaderDialog / main.cxx
index 33157d9cf427f055cbbe9ee6ee1edacc2753939c..e79b069872b9cd162f7c6c235139b613705c7b4c 100644 (file)
@@ -6,7 +6,8 @@
 #include <creaVtkBasicSlicer.h>
 
 
-//
+
+
 //#pragma comment(lib, "creaImageIO.lib")
 //#pragma comment(lib, "DelayImp.lib")
 //
@@ -29,6 +30,8 @@ IMPLEMENT_APP(myApp);
 
 CREA_WXMAIN_WITH_CONSOLE
 
+
+
 bool myApp::OnInit( )
 {
   wxApp::OnInit();
@@ -49,14 +52,13 @@ bool myApp::OnInit( )
    int output_dim = _3D;
 
    int threads = 1;
-
  
    creaImageIO::WxGimmickReaderDialog w(
                     0,
                    -1, 
                                   "localdatabase_Descriptor.dscp",
                                   "Local Database",
-                   _T("Select image(s)        - Gimmick! (c) CREATIS-LRMN 2008"),
+                   _T("Select image(s)        - creaImageIOApp  (c) CREATIS ( cnrs)"),
                    wxDefaultPosition,
                    wxSize(810,750),
                    min_dim,
@@ -87,6 +89,42 @@ bool myApp::OnInit( )
        std::vector<vtkImageData*> images;
           w.GetSelectedImages(images,3);
 
+       
+       // First Exemple:
+       // We take all attributes from database
+       // but only for the first selected file.
+    // For the moment, no output model file (XML)
+       //  std::vector<creaImageIO::OutStrGimmick> out;
+       //  std::vector<std::string> attr;
+       //  attr.push_back("ALL");
+       //  w.getSelected(out, attr, false,"");
+
+
+    // Second Exemple:
+       // We take all attributes from database
+       // but for all selected file.
+    // For the moment, no output model file (XML)
+       //  std::vector<creaImageIO::OutStrGimmick> out;
+       //  std::vector<std::string> attr;
+       //  attr.push_back("ALL");
+       //  w.getSelected(out, attr,true,"");
+
+    // Third Exemple:
+       // We take attributes from database and others
+       // but for all selected file.
+    // For the moment, no output model file (XML)
+          std::vector<creaImageIO::OutStrGimmick> out;
+       std::vector<std::string> attr;
+          attr.push_back("D0028_0010");
+          attr.push_back("D0008_0023");
+          attr.push_back("D0008_1070");
+          w.getSelected(out, attr,true,"");
+       std::cout<<out.size()<<std::endl;
+          crea::VtkBasicSlicer(out.front().img);
+       out.front().img->Delete();
+       w.OnExit();
+
+
 // images[1]->UpdateInformation();
        /*   vtkMetaImageReader *r= vtkMetaImageReader::New();
                   r->SetFileName("c:\\toto.mhd");
@@ -110,10 +148,8 @@ bool myApp::OnInit( )
 
 
 
-       //w.GetSelectedImages(images,output_dim);
-       std::cout<<images.size()<<std::endl;
 
-       crea::VtkBasicSlicer(images.front());
+          crea::VtkBasicSlicer(out.front().img);
        images.front()->Delete();
        w.OnExit();
 
@@ -137,5 +173,3 @@ bool myApp::OnInit( )
    std::cout << "$$$$$$$$$$$$$$$$$$$$ main ended "<<std::endl;
    return false;
 }
-
-