creaImageIOGimmickReaderDialog.cpp

Go to the documentation of this file.
00001 #include <creaImageIOGimmickReaderDialog.h>
00002 #include <creaImageIOWxGimmickReaderDialog.h>
00003 
00004 namespace creaImageIO
00005 {
00006 
00007   bool GimmickReaderDialog(std::vector<vtkImageData*>& images,
00008                            const std::string i_namedescp , 
00009                            const std::string i_namedb ,
00010                            const std::string& title,
00011                            int posx, 
00012                            int posy,
00013                            int sizex,
00014                            int sizey,
00015                            int image_min_type,
00016                            int image_max_type,
00017                            int image_out_dim,
00018                            int nb_threads)
00019   {
00020 
00021     
00022     creaImageIO::WxGimmickReaderDialog w(0,
00023                                          -1,
00024                                          i_namedescp,
00025                                          i_namedb,
00026                                          crea::std2wx(title),
00027                                          wxPoint(posx,posy),
00028                                          wxSize(sizex,sizey),
00029                                          image_min_type,
00030                                          image_max_type,
00031                                          nb_threads);
00032     w.ShowModal();
00033     
00034     if (w.GetReturnCode() == wxID_OK)
00035       {
00036         w.GetSelectedImages(images,image_out_dim);
00037         return true;
00038       }
00039     else if (w.GetReturnCode() == wxID_CANCEL)
00040       {
00041         return false;
00042       }
00043     else 
00044       {
00045         std::cout << "!! ERROR : GimmickReaderDialog : dialog ended without return code !"
00046                   <<std::endl;
00047         return false;
00048       }
00049   
00050   
00051   }
00052 
00053 }