]> Creatis software - creaImageIO.git/blob - src/creaImageIOWxSimpleDlg.h
correction of minor bugs: quotes and last slice in first place
[creaImageIO.git] / src / creaImageIOWxSimpleDlg.h
1 #include "creaImageIOSimpleView.h"
2 #include <creaWx.h>
3
4 namespace creaImageIO
5 {
6  /**
7    * \ingroup View
8    */
9
10         /// Simple Wxwidgets interface to select file(s) or directory or from creaImageIO database to display
11         class CREAIMAGEIO_EXPORT WxSimpleDlg : public wxDialog
12         {
13         public:
14                  /// Ctor
15                   WxSimpleDlg( wxWindow *parent,  
16                           wxString i_title =_T(""),
17                           const std::string i_namedescp = "localdatabase_Descriptor.dscp",   
18                           const std::string i_namedb   = "Local Database"     
19                           );
20                   ///Dtor
21                   ~WxSimpleDlg(){};
22
23                   /// Callback to read file(s)
24                   void OnReadFile(wxCommandEvent& event);
25
26                   /// Callback to read directory, no recursive
27                    void OnReadDirectory(wxCommandEvent &event);
28               
29                   /// Callback to select from creaImageIO database
30                    void OnReadGimmick(wxCommandEvent &event);
31
32                    /// return a vtkImageData vector of selected images, if available
33                    std::vector<vtkImageData*> getImagesSelected();
34                 
35                    wxString getInfoImage();
36
37         private:
38
39                 std::string namedescp; 
40                 std::string namedb;
41                 wxString infoimage;
42
43                 /// interface to read data
44                 SimpleView m_view;
45
46                 /// vtkImageData vector
47                 std::vector<vtkImageData*> m_results;
48         };
49 }