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