]> Creatis software - creaImageIO.git/blob - appli/TestWxSimpleView/main.cxx
9efb1bd55e320be3d683d82a901f3be5e9efbc44
[creaImageIO.git] / appli / TestWxSimpleView / main.cxx
1 #include <creaImageIOSystem.h>
2 #include <creaWx.h>
3 #include <creaImageIOWxISimpleDlg.h>
4 #include <creaImageIOWxISimpleDlg.txx>
5 #include <itkImageBase.h>
6
7 // Just to test the selection of file(s), directory or from creaImageIO database.
8 class myApp : public wxApp
9 {
10 public:
11   bool OnInit( );
12   int  OnExit() { return true; }
13 };
14
15 IMPLEMENT_APP(myApp);
16
17 CREA_WXMAIN_WITH_CONSOLE
18
19 bool myApp::OnInit( )
20 {
21   wxApp::OnInit();
22 #ifdef __WXGTK__
23   //See http://www.wxwindows.org/faqgtk.htm#locale
24   setlocale(LC_NUMERIC, "C");
25 #endif
26    wxInitAllImageHandlers();
27
28    typedef itk::Image<short, 4 >  ImageType;
29    creaImageIO::WxISimpleDlg<ImageType> x(0);
30    x.ShowModal();
31
32  std::vector <ImageType::Pointer> test = x.getImagesSelected();
33    
34    return false;
35 }
36
37