creaImageIOWxIsimpleDlg.h

Go to the documentation of this file.
00001 
00002 #ifndef __creaImageIOWxIsimpleDlg_h_INCLUDED__
00003 #define __creaImageIOWxIsimpleDlg_h_INCLUDED__
00004 
00005 
00006 #include "creaImageIOSimpleView.h"
00007 #include "itkImageToVTKImageFilter.h"
00008 #include <creaWx.h>
00009 #include <itkImageFileReader.h>
00010 
00011 namespace creaImageIO
00012 {
00017 
00018         template <typename TImage> 
00019         class  __declspec(dllexport) WxISimpleDlg : public wxDialog
00020         {
00021         public:
00023                   WxISimpleDlg( wxWindow *parent,  
00024                           wxString i_title =_T(""),
00025                           const std::string i_namedescp = "localdatabase_Descriptor.dscp",   
00026                           const std::string i_namedb   = "Local Database"     
00027                           );
00028 
00029                   ~WxISimpleDlg(){};
00030 
00031                   void setExts(std::vector<std::string>);
00033                   void OnReadFile(wxCommandEvent& event);
00034 
00036                    void OnReadDirectory(wxCommandEvent &event);
00037               
00039                    void OnReadGimmick(wxCommandEvent &event);
00040 
00042                    std::vector<vtkImageData*> getVtkImagesSelected() {return m_Vresults;}
00043 
00045                         std::vector<typename TImage::Pointer> getImagesSelected();
00046                 
00047 
00048                    wxString getInfoImage();
00049 
00050                    void split4Din3Dvtk(const std::string &i_dir);
00051                    void split3Din3Dvtk( );
00052                    void set(bool i_dicom){m_dicom= i_dicom;}
00053         private:
00054 
00055                 std::vector<std::string> m_exts;
00056                 std::string namedescp; 
00057                 std::string namedb;
00058                 wxString infoimage;
00059                 bool m_dicom;
00061                 SimpleView m_view;
00062                  void readImg(const std::string &i_name);
00063                  void readDicomImg(const std::vector<std::string> &i_names);
00064 
00065                  std::vector <typename TImage::Pointer> m_Iresults;
00066 
00067                  std::vector <vtkImageData*> m_Vresults;
00068 
00069         };
00070 
00071 
00072 }
00073 
00074 
00075 #endif //__creaImageIOWxIsimpleDlg_h_INCLUDED__