1 #include <creaImageIOSystem.h>
3 #include <creaImageIOWxGimmickDialog.h>
4 #include <creaVtkBasicSlicer.h>
6 class myApp : public wxApp
10 int OnExit() { return true; }
15 CREA_WXMAIN_WITH_CONSOLE
21 //See http://www.wxwindows.org/faqgtk.htm#locale
22 setlocale(LC_NUMERIC, "C");
24 wxInitAllImageHandlers();
26 int image_type = GIMMICK_3D_IMAGE_SELECTION;
29 creaImageIO::WxGimmickDialog w(0,
31 _T("Select image(s) - Gimmick! (c) CREATIS-LRMN 2008"),
38 if (w.GetReturnCode() == wxID_OK)
41 std::cout << "$$$$ main : user clicked 'OK' $$$$"<<std::endl;
42 std::cout << "$$$$ selected files : "<<std::endl;
43 std::vector<std::string> s;
44 w.GetSelectedFiles(s);
45 std::vector<std::string>::iterator i;
46 for (i=s.begin();i!=s.end();++i)
48 std::cout << *i << std::endl;
50 std::cout << "$$$$ "<<std::endl;
52 std::vector<vtkImageData*> images;
53 w.GetSelectedImages(images);
54 crea::VtkBasicSlicer(images.front());
55 images.front()->Delete();
58 else if (w.GetReturnCode() == wxID_CANCEL)
60 std::cout << "$$$$ main : user clicked 'CANCEL' $$$$"<<std::endl;
64 std::cout << "$$$$ main : dialog ended without return code ! $$$$"
69 // std::cout << "$$$$ main : deleting dialog"<<std::endl;
71 std::cout << "$$$$$$$$$$$$$$$$$$$$ main ended "<<std::endl;