]> Creatis software - creaImageIO.git/blob - src2/creaImageIOWxGimmickReaderDialog.h
069b6a09eb911fa57600f4b51011af191554b27a
[creaImageIO.git] / src2 / creaImageIOWxGimmickReaderDialog.h
1 #ifndef __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
2 #define __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
3
4 #ifdef USE_WXWIDGETS
5
6 #include <creaImageIOWxGimmickView.h>
7 #include <creaWx.h>
8 #include "wx/wx.h"
9
10
11
12 namespace creaImageIO
13 {
14     //=====================================================================
15  //=====================================================================
16   class CREAIMAGEIO_EXPORT  WxGimmickReaderDialog : public wxDialog
17   {
18   public:       
19     WxGimmickReaderDialog();
20     WxGimmickReaderDialog(wxWindow *parent,
21                           const wxWindowID id,
22                           const std::string i_namedescp , 
23                           const std::string i_namedb ,
24                           wxString title,
25                           const wxPoint& pos,
26                           const wxSize& size,
27                           int image_min_dim = GIMMICK_2D_IMAGE_SELECTION,
28                           int image_max_dim = GIMMICK_3D_IMAGE_SELECTION,
29                           int output_dim = NATIVE,
30                           int threads = 0);
31
32     boost::shared_ptr<Gimmick> GetGimmick() { return mGimmick; }
33     //    typedef WxGimmick ViewType;
34     typedef WxGimmickView::EventType EventType;
35
36     ~WxGimmickReaderDialog();
37
38         //===============================================================================================
39         //Image Selection
40         //===============================================================================================
41
42     void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
43     { mView->GetSelectedImages(s, dim); }
44
45     void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
46     { mView->GetSelectedImagesInVector(s, dim); }
47
48     void GetSelectedFiles(std::vector<std::string>& s) 
49     { mView->GetSelectedFiles(s); }
50
51     void OnSelChanged(EventType& event);
52     void OnContextualMenu(EventType& event);
53     void OnMenuTest(wxCommandEvent& event);
54     void OnValid(bool valid);
55     void OnExit(){ mView->StopPlayer(); }
56     // void OnButtonOk(wxCommandEvent& event);
57     // void OnButtonCancel(wxCommandEvent& event);
58
59   private :
60
61     boost::shared_ptr<Gimmick>   mGimmick;
62     WxGimmickView* mView;
63
64     wxButton* mOkButton;
65     wxButton* mCancelButton;
66
67     enum 
68       {
69         TVID = 1
70         //      OKID = 2,
71         //      CANCELID = 3
72       };
73
74   }; // class WxGimmickReaderDialog
75   //=====================================================================
76         
77 } // EO namespace creaImageIO
78
79
80 #endif // USE_WIDGETS
81 // EOF
82 #endif