X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FTestWxSimpleView%2Fmain.cxx;fp=appli%2FTestWxSimpleView%2Fmain.cxx;h=58ffcdbd877d2542551d321b2e5c0633340e3c34;hb=40c5cfdc77e721db1507ffdac3625b7813f66f4c;hp=0000000000000000000000000000000000000000;hpb=5e5ae5c6784b3d6cf8e2087b1662e7986cb3326c;p=creaImageIO.git diff --git a/appli/TestWxSimpleView/main.cxx b/appli/TestWxSimpleView/main.cxx new file mode 100644 index 0000000..58ffcdb --- /dev/null +++ b/appli/TestWxSimpleView/main.cxx @@ -0,0 +1,41 @@ +#include +#include +#include +#include + +// Just to test the selection of file(s), directory or from creaImageIO database. +class myApp : public wxApp +{ +public: + bool OnInit( ); + int OnExit() { return true; } +}; + +IMPLEMENT_APP(myApp); + +CREA_WXMAIN_WITH_CONSOLE + +bool myApp::OnInit( ) +{ + wxApp::OnInit(); +#ifdef __WXGTK__ + //See http://www.wxwindows.org/faqgtk.htm#locale + setlocale(LC_NUMERIC, "C"); +#endif + wxInitAllImageHandlers(); + + creaImageIO::SetGimmickMessageLevel(5); + creaImageIO::SetGimmickDebugMessageLevel(0); + + creaImageIO::WxSimpleDlg x(0); + x.ShowModal(); + std::vector test = x.getImagesSelected(); + if(test.size() >0) + { + crea::VtkBasicSlicer(test.front()); + } + + return false; +} + +