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 //EED 28mai2010 Use new mechanism getSelected
60 // void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
62 // mView->GetSelectedImagesInVector(s, dim);
66 // ----get selected files in an Output structure-------
67 // out: vector structure output < <img, info>, ... >
68 // i_attr: list of dicom tags to extract
69 // mult: information of one file or multiple files
70 // outmodel: xml-filename that specifies images order..(todo)
71 void getSelected(std::vector<OutStrGimmick> &outG,std::vector< std::string> i_attr, bool mult, const std::string outmodel)
73 mView->getSelectedFiles(outG, i_attr, mult, outmodel);
76 void OnSelectedImage(bool t);
78 void AddImagesToDB(std::string dir);
80 // DECLARE_EVENT_TABLE();
83 boost::shared_ptr<Gimmick> mGimmick;
86 ///The sendImage signal
87 SendImageSignalType mSendImageSignal;
89 }; // class WxGimmickPanel
90 //=====================================================================
93 } // EO namespace creaImageIO