X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxViewer.h;h=e64704af6c579c452e69aee775bb3483b560fe91;hb=88745f8677503fa747963f8cd78c52f4b3deb35e;hp=f416cfc6b59fabc244d48bf491da70ba82ba385a;hpb=0475a9d0f4623a7ce65d1f8b0c14e53b305b1c10;p=creaImageIO.git diff --git a/src2/creaImageIOWxViewer.h b/src2/creaImageIOWxViewer.h index f416cfc..e64704a 100644 --- a/src2/creaImageIOWxViewer.h +++ b/src2/creaImageIOWxViewer.h @@ -10,6 +10,7 @@ #include #include +#include // For image preview // vtk and wxvtk classes @@ -23,9 +24,8 @@ namespace creaImageIO class WxViewer : public wxPanel { - + public: - // friend class ThreadedMovie; /// Ctor WxViewer(); WxViewer(wxWindow *parent, @@ -35,22 +35,17 @@ namespace creaImageIO const wxSize& size); /// Dtor virtual ~WxViewer(); - ///Shows the image in the vector as a movie - //void ShowImages(); - /// Sets the movie size - void SetMovieSize(unsigned int); - ///Sets the ith image of the movie - void SetImage(int i, vtkImageData* im); - ///Clears the selection of images - // void ClearImages(); - ///Returns true if the image vector is empty - bool ImagesEmpty(); /// void ShowNextImage(); - - void OnInternalIdle(); - void StopPlayer(); + void StartPlayer(); + + void StopPlayer(); + + bool RefreshIfNecessary(); + + void SetImageVector(std::vector& pointers); + private: ///Shows the image passed as parameter @@ -66,8 +61,6 @@ namespace creaImageIO /// Current spacing double mspx,mspy,mspz; - /// The vector of images to show - std::vector images; /// int mCurrent; ///The threaded movie player @@ -76,6 +69,13 @@ namespace creaImageIO /// The mutex wxMutex mMutex; + /// + bool mNeedRefresh; + + + vtkImageData* mLastImageShown; + std::vector imagePointers; + }; }