#ifndef __creaImageIOWxViewer_h_INCLUDED__ #define __creaImageIOWxViewer_h_INCLUDED__ #ifdef USE_WXWIDGETS // wx #include #include #include #include #include // For image preview // vtk and wxvtk classes #include "creawxVTKRenderWindowInteractor.h" #include "vtkImageViewer2.h" namespace creaImageIO { class ThreadedMovie; class WxViewer : public wxFrame { public: friend class ThreadedMovie; /// Ctor WxViewer(); WxViewer(wxWindow *parent, const wxWindowID id, wxString title, const wxPoint& pos, const wxSize& size); /// Dtor virtual ~WxViewer(); ///Shows the image in the vector as a movie void ShowImages(); ///Shows the image passed as parameter void ShowImage(vtkImageData* im); ///Adds an image to the selection void AddImage(vtkImageData* im); ///Clears the selection of images void ClearImages(); ///Returns true if the image vector is empty bool ImagesEmpty(); private: /// Previewer vtkImageViewer2* mViewer; /// Associated wxvtk interactor crea::creawxVTKRenderWindowInteractor *mInteractor; int mx1,mx2,my1,my2,mz1,mz2; double mspx,mspy,mspz; /// The vector of images to show std::vector images; ///The threaded movie ThreadedMovie* mMovie; }; } #endif // USE_WIDGETS // EOF #endif