creaImageIOWxGimmickPanel.h

Go to the documentation of this file.
00001 #ifndef __creaImageIOWxGimmickPanel_h_INCLUDED__
00002 #define __creaImageIOWxGimmickPanel_h_INCLUDED__
00003 
00004 #ifdef USE_WXWIDGETS
00005 
00006 // Signal/slot mechanism for progress events
00007 #include <boost/signal.hpp>
00008 #include <boost/bind.hpp>
00009 
00010 #include <creaImageIOWxGimmickView.h>
00011 #include <creaWx.h>
00012 
00013 namespace creaImageIO
00014 {
00018   //=====================================================================
00019  //=====================================================================
00020   class  CREAIMAGEIO_EXPORT WxGimmickPanel : public wxPanel
00021   {
00022   public:
00023     WxGimmickPanel();    
00024     WxGimmickPanel(wxWindow *parent, 
00025                    const wxWindowID id,
00026                    const wxPoint& pos, 
00027                    const wxSize& size,
00028                    const std::string i_namedescp , 
00029                    const std::string i_namedb = "Local Database",
00030                    int threads = 0);
00031     
00032     ~WxGimmickPanel();
00033 
00034       //=============================================
00035       typedef boost::signal<void (bool)> SendImageSignalType;
00036       typedef SendImageSignalType::slot_function_type SendImageCallbackType;
00037       //=============================================
00038 
00039      //==================================================================
00047       void ConnectSendImageObserver(SendImageCallbackType callback);
00048      //==================================================================
00049 
00050         //===============================================================================================
00051         //Image Selection
00052         //===============================================================================================
00053 
00054     void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
00055     { 
00056         mView->GetSelectedImages(s, dim); 
00057     }
00058 
00059 //EED 28mai2010      Use new mechanism getSelected
00060 //    void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
00061 //    { 
00062 //      mView->GetSelectedImagesInVector(s, dim); 
00063 //    }
00064 
00065 
00066         // ----get selected files in an Output structure-------
00067         // out: vector structure output  < <img, info>, ... >
00068         // i_attr: list of dicom tags to extract 
00069         // mult: information of one file or multiple files
00070         // outmodel: xml-filename that specifies images order..(todo) 
00071         void getSelected(std::vector<OutStrGimmick> &outG,std::vector< std::string> i_attr, bool mult, const std::string outmodel)
00072         {
00073                 mView->getSelectedFiles(outG, i_attr, mult, outmodel);
00074         }
00075 
00076     void OnSelectedImage(bool t);
00077 
00078     void AddImagesToDB(std::string dir);
00079 
00080     //    DECLARE_EVENT_TABLE();
00081   private :
00082     
00083         boost::shared_ptr<Gimmick>       mGimmick;
00084     WxGimmickView* mView;
00085 
00087     SendImageSignalType mSendImageSignal;
00088 
00089   }; // class WxGimmickPanel
00090   //=====================================================================
00091 
00092   
00093 } // EO namespace creaImageIO
00094 
00095 
00096 #endif // USE_WIDGETS
00097 // EOF
00098 #endif