]> Creatis software - creaImageIO.git/blob - src/creaImageIOGimmickReaderDialog.cpp
29c6bbfd1e7248c2bd348108852a589b305dc983
[creaImageIO.git] / src / creaImageIOGimmickReaderDialog.cpp
1 #include <creaImageIOGimmickReaderDialog.h>
2 #include <creaImageIOWxGimmickReaderDialog.h>
3
4 namespace creaImageIO
5 {
6
7   bool GimmickReaderDialog(std::vector<vtkImageData*>& images,
8                            const std::string i_namedescp , 
9                            const std::string i_namedb ,
10                            const std::string& title,
11                            int posx, 
12                            int posy,
13                            int sizex,
14                            int sizey,
15                            int image_min_type,
16                            int image_max_type,
17                            int image_out_dim,
18                            int nb_threads)
19   {
20
21     
22     creaImageIO::WxGimmickReaderDialog w(0,
23                                          -1,
24                                          i_namedescp,
25                                          i_namedb,
26                                          crea::std2wx(title),
27                                          wxPoint(posx,posy),
28                                          wxSize(sizex,sizey),
29                                          image_min_type,
30                                          image_max_type,
31                                          nb_threads);
32     w.ShowModal();
33     
34     if (w.GetReturnCode() == wxID_OK)
35       {
36         w.GetSelectedImages(images,image_out_dim);
37         return true;
38       }
39     else if (w.GetReturnCode() == wxID_CANCEL)
40       {
41         return false;
42       }
43     else 
44       {
45         std::cout << "!! ERROR : GimmickReaderDialog : dialog ended without return code !"
46                   <<std::endl;
47         return false;
48       }
49   
50   
51   }
52
53 }