1 #ifndef __creaImageIOWxGimmickPanel_h_INCLUDED__
2 #define __creaImageIOWxGimmickPanel_h_INCLUDED__
6 // Signal/slot mechanism for progress events
7 #include <boost/signal.hpp>
8 #include <boost/bind.hpp>
10 #include <creaImageIOWxGimmickView.h>
18 //=====================================================================
19 //=====================================================================
20 class CREAIMAGEIO_EXPORT WxGimmickPanel : public wxPanel
24 WxGimmickPanel(wxWindow *parent,
28 const std::string i_namedescp ,
29 const std::string i_namedb = "Local Database",
34 //=============================================
35 typedef boost::signal<void (bool)> SendImageSignalType;
36 typedef SendImageSignalType::slot_function_type SendImageCallbackType;
37 //=============================================
39 //==================================================================
40 /// Adds the function f to the list of functions to call
41 /// when the addition progresses.
42 /// f is of type ProgressCallbackType which is:
43 /// void (*ProgressCallbackType)(Progress&)
44 /// To pass a member function 'f' of an instance 'c' of a class 'C'
45 /// as callback you have to 'bind' it, i.e. call:
46 /// ConnectSendImageObserver ( boost::bind( &C::f , c, _1 ) );
47 void ConnectSendImageObserver(SendImageCallbackType callback);
48 //==================================================================
50 //===============================================================================================
52 //===============================================================================================
54 void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
56 mView->GetSelectedImages(s, dim);
59 void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
61 mView->GetSelectedImagesInVector(s, dim);
64 void OnSelectedImage(bool t);
66 void AddImagesToDB(std::string dir);
68 // DECLARE_EVENT_TABLE();
71 boost::shared_ptr<Gimmick> mGimmick;
74 ///The sendImage signal
75 SendImageSignalType mSendImageSignal;
77 }; // class WxGimmickPanel
78 //=====================================================================
81 } // EO namespace creaImageIO