}
}
+ //======================================================================
-
+ //======================================================================
+ ///Requests the reading of an image
+ void GimmickView::RequestReading(tree::Node* n,
+ int prio, int selection_index)
+ {
+ ImageEventType t(n,0,selection_index);
+ mImageEventMap[n->GetAttribute("FullFileName")] = t;
+ mReader.Request(this,n->GetAttribute("FullFileName"),prio);
+ }
//======================================================================
//======================================================================
mImageEventQueue.push_back(ImageEventType(image));
return;
}
- std::map<std::string,tree::Node*>::iterator i;
- i = mImageFileNameToNode.find(filename);
- if (i!=mImageFileNameToNode.end())
+ ImageEventTypeMap::iterator i;
+ i = mImageEventMap.find(filename);
+ if (i!=mImageEventMap.end())
{
GimmickDebugMessage(5,
- "Pushing image of file '"<<i->second<<"' in queue"
+ "Pushing image of file '"<<filename<<"' in queue"
<<std::endl);
- mImageEventQueue.push_back(ImageEventType(i->second,image));
+ ImageEventType e(i->second);
+ e.image = image;
+ mImageEventQueue.push_back(e);
+ mImageEventMap.erase(i);
}
}
virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
{ GimmickError("INTERNAL ERROR : GetSelectedImages not implemented"); }
- virtual void GetSelectedFiles(std::vector<std::string>& s)
- { GimmickError("INTERNAL ERROR : GetSelectedFiles not implemented"); }
- virtual void OnSelectionChange(std::vector<tree::Node*>& s)
- { GimmickError("INTERNAL ERROR : OnSelectionChange not implemented"); }
-
- ///Validates the dimension compliance of the images with the maximum and minimum given, and between their sizes
- bool ValidateSelected (std::vector<tree::Node*>& sel, int min_dim, int max_dim);
-
- ///Reads the vector of nodes, builds images in the dimension required and returns them in the supplied vector.
- void ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vector<tree::Node*> im, int dim);
- ///Requests the reading of an image
- void RequestReading(tree::Node* n, int prio){mReader.Request(this,n->GetAttribute("FullFileName"),prio);}
- ///Adds an entry to the filename to node map
- void AddEntryToMap(tree::Node* node){mImageFileNameToNode[node->GetAttribute("FullFileName")] = node;}
- ///Returns true if the ImageEventQueue is empty
- bool IsQueueEmpty(){return mImageEventQueue.empty();}
- ///Clears the queue
- void ClearQueue(){mImageEventQueue.clear();}
- ///Returns the next in line EventType's image
- vtkImageData* GetNextImageQueued(){return mImageEventQueue.front().image;}
- ///Returns the next in line EventType's node
- tree::Node* GetNextNodeQueued(){return mImageEventQueue.front().node;}
- ///Unqueus the next in line EventType
- void UnqueueNext(){mImageEventQueue.pop_front();}
-
-
- ///Obtains the message of the state
- std::string GetMessage(){return mMess;}
- ///Obtains the message of the state
- void SetMessage(std::string mess){mMess=mess;}
+ virtual void GetSelectedFiles(std::vector<std::string>& s)
+ { GimmickError("INTERNAL ERROR : GetSelectedFiles not implemented"); }
+ virtual void OnSelectionChange(std::vector<tree::Node*>& s)
+ { GimmickError("INTERNAL ERROR : OnSelectionChange not implemented"); }
+
+ ///Validates the dimension compliance of the images with the maximum and minimum given, and between their sizes
+ bool ValidateSelected (std::vector<tree::Node*>& sel, int min_dim, int max_dim);
+
+ ///Reads the vector of nodes, builds images in the dimension required and returns them in the supplied vector.
+ void ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vector<tree::Node*> im, int dim);
+ ///Requests the reading of an image with priority and index in the
+ /// current selection (-1 if not in selection)
+ void RequestReading(tree::Node* n, int prio, int selection_index);
+
+ ///Returns true if the ImageEventQueue is empty
+ bool IsQueueEmpty(){return mImageEventQueue.empty();}
+ ///Clears the queue
+ void ClearQueue(){mImageEventQueue.clear();}
+ ///Returns the next in line EventType's image
+ vtkImageData* GetNextImageQueued(){return mImageEventQueue.front().image;}
+ ///Returns the next in line EventType's node
+ tree::Node* GetNextNodeQueued(){return mImageEventQueue.front().node;}
+ ///Returns the next in line EventType's index in selection
+ int GetNextSelectionIndexQueued(){return mImageEventQueue.front().index;}
+ ///Unqueus the next in line EventType
+ void UnqueueNext(){mImageEventQueue.pop_front();}
+
+
+ ///Obtains the message of the state
+ std::string GetMessage(){return mMess;}
+ ///Obtains the message of the state
+ void SetMessage(std::string mess){mMess=mess;}
/// Create the tree views
void CreateTreeViews();
MultiThreadImageReaderUser::EventType t,
vtkImageData* image);
- //=============================================
+ vtkImageData* GetDefaultImage() { mReader.GetImage(""); }
+
+
+ //=============================================
typedef boost::signal<void (bool)> ValidationSignalType;
typedef ValidationSignalType::slot_function_type ValidationCallbackType;
//=============================================
void ConnectValidationObserver(ValidationCallbackType callback);
//==================================================================
+
private:
/// Controller which manages the interaction with the model
Gimmick* mGimmick;
/// The views
TreeViewMapType mTreeViewMap;
- /// The message that results from the validation
- std::string mMess;
- /// Multi-thread image reader
- MultiThreadImageReader mReader;
- /// Map of images' names to nodes
- std::map<std::string,tree::Node*> mImageFileNameToNode;
- /// type of image event
- /// If the image pointer is non null then the image is available (loaded)
+ /// The message that results from the validation
+ std::string mMess;
+
+ /// Multi-thread image reader
+ MultiThreadImageReader mReader;
+ /// Internal type of image reading event
+ /// If the image pointer is non null then the image is available (loaded)
/// else it has been unloaded
struct ImageEventType
{
- ImageEventType( tree::Node* no, vtkImageData* im )
- : node(no), image(im) {}
+ ImageEventType( tree::Node* no = 0,
+ vtkImageData* im = 0,
+ int sel_index = -1)
+ : node(no), image(im), index(sel_index) {}
ImageEventType(vtkImageData* im )
: image(im) {}
tree::Node* node;
vtkImageData* image;
+ int index;
};
+ typedef std::map<std::string,ImageEventType> ImageEventTypeMap;
+ /// Map of images' names to ImageEventType
+ /// Used to associated a filename to a the data of a request
+ ImageEventTypeMap mImageEventMap;
// queue of image event
typedef std::deque<ImageEventType> ImageEventQueueType;
ImageEventQueueType mImageEventQueue;
ValidationSignalType mValidationSignal;
- };
- // EO class GimmickView
+ };
+ // EO class GimmickView
//=====================================================================
{
rf_header h;
ok = ReadHeader(rf_file,h);
+ fclose(rf_file);
}
- fclose(rf_file);
return ok;
}
//=====================================================================
mNotebook = new wxNotebook(mSplitter,
-1,wxDefaultPosition, wxDefaultSize, 0);
- //Gimmick
- mGimmick=gimmick;
- mViewer=new WxViewer(this, wxID_ANY, wxT("Gimmick! Viewer"),wxDefaultPosition, wxDefaultSize );
-
-
- mSelectionMaxDimension= max_dim;
- mSelectionMinDimension= min_dim;
+ //Gimmick
+ mGimmick=gimmick;
+
+ mSelectionMaxDimension= max_dim;
+ mSelectionMinDimension= min_dim;
+
// Create the views
CreateTreeViews();
// Bottom panel
mBottomPanel = new wxPanel(mSplitter,-1);
- mText = new wxStaticText(mBottomPanel, wxID_ANY, wxT("Status: Welcome to Gimmick!"));
-
+
+ wxBoxSizer *bottom_sizer = new wxBoxSizer(wxHORIZONTAL);
+
+ mText = new wxStaticText(mBottomPanel, wxID_ANY, wxT("Status: Welcome to Gimmick!"));
+ bottom_sizer->Add(mText,1,wxGROW,0);
+
+ // Previewer
+ mViewer = new WxViewer(mBottomPanel, wxID_ANY, wxT("Gimmick! Viewer"),wxDefaultPosition, wxDefaultSize );
+
+ bottom_sizer->Add(mViewer,1,wxGROW,0);
+ // mViewer->Show();
+
+ mBottomPanel->SetSizer(bottom_sizer);
+
// Splitting
int hsize = size.GetHeight();
int bottom_minsize = 15;
}
else
{
- mViewer->Hide();
+ mViewer->SetMovieSize(1);
+ mViewer->SetImage(0,GetDefaultImage());
+ // mViewer->Hide();
}
<<std::endl);
int maxprio = GetMaximalPriority();
int prio = maxprio + 2000;
+
+ mViewer->SetMovieSize(sel.size());//ClearImages();
//First load the selected images
mCurImageItemToShow = sel.front();
+ int index = 0;
std::vector<tree::Node*>::iterator selected;
for(selected=sel.begin();selected!=sel.end();++selected)
- {
- GimmickDebugMessage(5,
- "Requesting image from selected "
- <<(*selected)->GetAttribute("FullFileName")
- <<std::endl);
- RequestReading(*selected,prio);
- AddEntryToMap(*selected);
- prio--;
- }
+ {
+ GimmickDebugMessage(5,
+ "Requesting image from selected "
+ <<(*selected)->GetAttribute("FullFileName")
+ <<std::endl);
+ RequestReading(*selected,prio,index);
+ // AddEntryToMap(*selected);
+ prio--;
+ index++;
+ }
//Going up
- prio = maxprio + 1000;
+ prio = maxprio + 20;
std::vector<tree::Node*> up;
GetTreeViewMap()["Local database"]->GetNodes(up,true);
std::vector<tree::Node*>::iterator iterUp;
"Requesting image from neighbors up "
<<(*iterUp)->GetAttribute("FullFileName")
<<std::endl);
- RequestReading(*iterUp,prio);
- AddEntryToMap(*iterUp);
+ RequestReading(*iterUp,prio,-1);
+ // AddEntryToMap(*iterUp);
prio--;
+ if (prio == maxprio) break;
}
//Going down
- prio = maxprio + 999;
+ prio = maxprio + 19;
std::vector<tree::Node*> down;
GetTreeViewMap()["Local database"]->GetNodes(down,false);
std::vector<tree::Node*>::iterator iterDown;
"Requesting image from neighbors down "
<<(*iterDown)->GetAttribute("FullFileName")
<<std::endl);
- RequestReading(*iterDown,prio);
- AddEntryToMap(*iterDown);
+ RequestReading(*iterDown,prio,-1);
+ // AddEntryToMap(*iterDown);
prio--;
+ if (prio == maxprio) break;
}
}
{
if (!mConstructed) return;
- int level=GetTreeViewMap()["Local database"]->GetNumberOfLevels();
- std::vector<tree::Node*> sel=GetTreeViewMap()["Local database"]->GetSelected(level+1);
+ // int level=GetTreeViewMap()["Local database"]->GetNumberOfLevels();
+ // std::vector<tree::Node*> sel=GetTreeViewMap()["Local database"]->GetSelected(level+1);
+ /*
GimmickDebugMessage(5,
"Processing Images. Lock Started"
<<std::endl);
+ */
MultiThreadImageReaderEventLock();
- mViewer->ClearImages();
+
while (!IsQueueEmpty())
{
GimmickDebugMessage(5,
"Queue not empty"
<<std::endl);
- vtkImageData* image=GetNextImageQueued();
+ vtkImageData* image = GetNextImageQueued();
if( image!=0 )
{
+ int index = GetNextSelectionIndexQueued();
+ if (index>=0)
+ {
+ mViewer->SetImage(index,image);
+ }
+ /*
tree::Node* node=GetNextNodeQueued();
+
bool found=false;
std::vector<tree::Node*>::iterator i;
for(i=sel.begin();i!=sel.end()&&!found;++i)
found=true;
}
}
+ */
+
}
UnqueueNext();
}
+ /*
if(!(mViewer->ImagesEmpty()))
{
GimmickDebugMessage(5,
"Showing images"
<<std::endl);
- mViewer->ShowImages();
- mViewer->Show();
+ // mViewer->ShowImages();
+ // mViewer->Show();
}
+ */
ClearQueue();
MultiThreadImageReaderEventUnlock();
+ /*
GimmickDebugMessage(5,
"Processing Images. Lock Ended"
<<std::endl);
+ */
}
//==================================================
//==================================================
void WxGimmickView::OnInternalIdle()
{
- ProcessImageEvents();
+ if (!mConstructed) return;
+ ProcessImageEvents();
+ // mViewer->Refresh();
}
//=================================================
//=====================================================================
//=====================================================================
- class ThreadedMovie: public wxThread
+ class WxViewerPlayer: public wxThread
{
public:
- ThreadedMovie(std::vector<vtkImageData*> m, vtkImageViewer2* v, crea::creawxVTKRenderWindowInteractor* i, WxViewer* parent) :
- mImagesToPlay(m), mViewer(v), mInteractor(i), mParent(parent)
+ WxViewerPlayer(WxViewer* v) :
+ mWxViewer(v)
{}
-
+
void* Entry();
- void SetImagesToPlay(std::vector<vtkImageData*> im);
- void ShowImage(vtkImageData* v);
- void StartIterator();
+ // void SetImagesToPlay(std::vector<vtkImageData*> im);
+ // void ShowImage(vtkImageData* v);
+ // void StartIterator();
void OnExit();
private:
- std::vector<vtkImageData*> mImagesToPlay;
- vtkImageViewer2* mViewer;
- /// Associated wxvtk interactor
- crea::creawxVTKRenderWindowInteractor *mInteractor;
- std::vector<vtkImageData*>::iterator i;
- WxViewer* mParent;
-
- int mx1,mx2,my1,my2,mz1,mz2;
- double mspx,mspy,mspz;
+ //std::vector<vtkImageData*> mImagesToPlay;
+ //vtkImageViewer2* mViewer;
+ /// Associated wxvtk interactor
+ //crea::creawxVTKRenderWindowInteractor *mInteractor;
+ //std::vector<vtkImageData*>::iterator i;
+ WxViewer* mWxViewer;
+
+ // int mx1,mx2,my1,my2,mz1,mz2;
+ // double mspx,mspy,mspz;
};
//=====================================================================
//=====================================================================
// CTor
WxViewer::WxViewer(wxWindow *parent,
- wxWindowID id,
- wxString title,
- const wxPoint& pos,
- const wxSize& size)
- : wxFrame( parent,
- id,
- title,
- pos,
- size,
- wxCAPTION)
+ wxWindowID id,
+ wxString title,
+ const wxPoint& pos,
+ const wxSize& size)
+ : wxPanel( parent,
+ id,
+ pos,
+ size)
{
+ wxMutexLocker lock(mMutex);
GimmickDebugMessage(1,"WxViewer::WxViewer"
<<std::endl);
+
wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
mViewer = vtkImageViewer2::New();
mViewer->SetupInteractor ( mInteractor );
- mMovie=new ThreadedMovie(images, mViewer, mInteractor, this);
+ mCurrent = 0;
+
+ mPlayer = new WxViewerPlayer(this); //images, mViewer, mInteractor, this);
+ mPlayer->Create();
+ mPlayer->Run();
topsizer-> Add( mInteractor ,1,wxGROW ,0);
SetSizer( topsizer );
Layout();
}
+ //=====================================================================
+ //=====================================================================
/// Destructor
WxViewer::~WxViewer()
{
+ wxMutexLocker lock(mMutex);
GimmickDebugMessage(1,"WxViewer::~WxViewer"
<<std::endl);
+ SetMovieSize(0);
+ // TO DO : desallocate cleanly
+ // delete mPlayer;
+ // delete mInteractor;
+ }
+ //=====================================================================
+
+
+ //================================================================
+
+ void WxViewer::SetImage(int i, vtkImageData* im)
+ {
+ wxMutexLocker lock(mMutex);
+ GimmickDebugMessage(5,"WxViewer::SetImage "<<i+1<<"/"<<images.size()
+ <<std::endl);
+ if (i<images.size())
+ {
+ // if (images[i]!=0) images[i]->UnRegister(NULL);
+ images[i] = im;
+ // if (im!=0) im->Register(NULL);
+ }
}
+ //================================================================
+
+
+ //================================================================
+
+ bool WxViewer::ImagesEmpty()
+ {
+ wxMutexLocker lock(mMutex);
+ return images.empty();
+ }
+ //================================================================
+
+ //================================================================
+
+ void WxViewer::SetMovieSize(unsigned int si)
+ {
+ wxMutexLocker lock(mMutex);
+ GimmickDebugMessage(5,"WxViewer::SetMovieSize("<<(int)si<<")"
+ <<std::endl);
+ for (unsigned int i=0;i<images.size();++i)
+ {
+ if (images[i]!=0)
+ {
+ // images[i]->UnRegister(NULL);
+ }
+ }
+ images.clear();
+ for (unsigned int i=0;i<si;++i) images.push_back(0);
+ mCurrent = 0;
+ }
+ //================================================================
+
+ //================================================================
+
+ void WxViewer::ShowNextImage()
+ {
+ wxMutexLocker lock(mMutex);
+ GimmickMessage(1,"WxViewer::ShowNextImage() "
+ <<mCurrent+1<<"/"
+ <<images.size()<<std::endl);
+ if (mCurrent<images.size())
+ {
+ ShowImage(images[mCurrent]);
+ }
+ mCurrent++;
+ if (mCurrent >= images.size()) mCurrent = 0;
+ }
+ //================================================================
+
+
+
+
+ //=====================================================================
void WxViewer::ShowImage(vtkImageData* im)
{
GimmickDebugMessage(5,"WxViewer::ShowImage"
<<std::endl);
+ if (im==0) return;
+
mViewer->SetInput(im);
mViewer->SetSlice( 0 );
}
- mInteractor->Render();
- mViewer->Render();
- }
-
- //================================================================
-
- //================================================================
-
- void WxViewer::AddImage(vtkImageData* im)
- {
- images.push_back(im);
- }
+ // mInteractor->Refresh();
+ //mInteractor->Render();
+ // mViewer->Render();
- //================================================================
-
+ ::wxWakeUpIdle();
+ }
//================================================================
- void WxViewer::ShowImages()
+ //==================================================
+ void WxViewer::OnInternalIdle()
{
- if(!(mMovie->IsAlive()))
- {
- mMovie->SetImagesToPlay(images);
- mMovie->StartIterator();
- mMovie->Create();
- mMovie->Run();
- }
- else
- {
- if(!images.empty())
- {
- mMovie->Pause();
- mMovie->SetImagesToPlay(images);
- mMovie->StartIterator();
- mMovie->Resume();
- }
- else
- {
- GimmickMessage(1,"I'm empty!!!!! "<<std::endl);
- }
- }
-
-
- }
-
- //================================================================
-
- //================================================================
-
- void WxViewer::ClearImages()
- {
- images.clear();
+ // mInteractor->Refresh();
+ mInteractor->Render();
+ //mViewer->Render();
}
-
- //================================================================
- //================================================================
+ //=================================================
+
- bool WxViewer::ImagesEmpty()
- {
- return images.empty();
- }
- //================================================================
// BEGIN_EVENT_TABLE(WxGimmickFrame, wxDialog)
// END_EVENT_TABLE()
//================================================================
//========================================================================
//========================================================================
- void* ThreadedMovie::Entry()
+ void* WxViewerPlayer::Entry()
{
- GimmickMessage(1,"ThreadedMovie::Entry()"<<std::endl);
+ GimmickMessage(1,"WxViewerPlayer::Entry()"<<std::endl);
while(true)
{
+ mWxViewer->ShowNextImage();
clock_t endwait;
+ endwait = clock () + 0.2 * CLOCKS_PER_SEC ;
+ while (clock() < endwait) {}
+ /*
for(i=mImagesToPlay.begin();i!=mImagesToPlay.end();++i)
{
if(i!=mImagesToPlay.end())
}
}
-
+ */
}
return 0;
}
//=====================================================================
//=====================================================================
- void ThreadedMovie::OnExit()
+ void WxViewerPlayer::OnExit()
{
- GimmickMessage(1,"Hello WORLD IM OUT!!!!!!!! "<<std::endl);
+ GimmickMessage(1,"WxViewerPlayer::OnExit() "<<std::endl);
}
//=====================================================================
- //=====================================================================
- void ThreadedMovie::SetImagesToPlay(std::vector<vtkImageData*> im)
- {
- mImagesToPlay=im;
- }
-
- //=====================================================================
-
- //=====================================================================
- void ThreadedMovie::StartIterator()
- {
- i=mImagesToPlay.begin();
- }
-
- //=====================================================================
-
- //=====================================================================
- void ThreadedMovie::ShowImage(vtkImageData* im)
- {
- mViewer->SetInput(im);
- mViewer->SetSlice( 0 );
-
- int x1,x2,y1,y2,z1,z2;
- double spx,spy,spz;
-
- im->Update();
-
- im->GetSpacing(spx,spy,spz);
- im->GetExtent (x1,x2,y1,y2,z1,z2);
- /*
- std::cout << "-----------------------------"<<std::endl;
- std::cout << x1 << "-"<<x2<<std::endl;
- std::cout << y1 << "-"<<y2<<std::endl;
- std::cout << z1 << "-"<<z2<<std::endl;
- std::cout << spx << "-"<<spy<<"-"<<spz<<std::endl;
- */
-
- if ((x1!=mx1) ||
- (x2!=mx2) ||
- (y1!=my1) ||
- (y2!=my2) ||
- (z1!=mz1) ||
- (z2!=mz2) ||
- (spx!=mspx) ||
- (spy!=mspy) ||
- (spz!=mspz)
- )
- {
- mx1 = x1;
- mx2 = x2;
- my1 = y1;
- my2 = y2;
- mz1 = z1;
- mz2 = z2;
- mspx = spx;
- mspy = spy;
- mspz = spz;
-
- double *range = im->GetScalarRange();
- mViewer->SetColorWindow(range[1] - range[0]);
- mViewer->SetColorLevel(0.5 * (range[1] + range[0]));
-
- mViewer->GetRenderer()->ResetCamera();
- double bounds[6];
-
-
- mViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
-
- /*
- std::cout <<"bounds : "<<bounds[0]<<","
-<<bounds[1]<<","
-<<bounds[2]<<","
-<<bounds[3]<<","
-<<bounds[4]<<","
- <<bounds[5]<<std::endl;
- */
-
- mViewer->GetRenderer()->ResetCameraClippingRange(bounds);
- /*
- vtkCamera *camera = mViewer->GetRenderer()->GetActiveCamera();
-
- camera->SetViewUp ( spx*0, -spy*1, spz*0);
- camera->SetPosition( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*10000000);
- camera->SetFocalPoint ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0);
-
- camera->ComputeViewPlaneNormal();
- camera->SetParallelScale( spx*(x2-x1)/2.0 );
-
- camera->Roll ( 180 );
- */
-
- }
-
- //mInteractor->Render();
- }
-
} // EO namespace creaImageIO
namespace creaImageIO
{
- class ThreadedMovie;
+ class WxViewerPlayer;
- class WxViewer : public wxFrame
+ class WxViewer : public wxPanel
{
- public:
- friend class ThreadedMovie;
+ public:
+ // friend class ThreadedMovie;
/// Ctor
WxViewer();
WxViewer(wxWindow *parent,
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();
+ ///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();
+
private:
- /// Previewer
+ ///Shows the image passed as parameter
+ void ShowImage(vtkImageData* im);
+
+ /// Previewer
vtkImageViewer2* mViewer;
/// Associated wxvtk interactor
- crea::creawxVTKRenderWindowInteractor *mInteractor;
-
+ crea::creawxVTKRenderWindowInteractor *mInteractor;
+
+ /// Current extent
int mx1,mx2,my1,my2,mz1,mz2;
+ /// Current spacing
double mspx,mspy,mspz;
- /// The vector of images to show
- std::vector<vtkImageData*> images;
- ///The threaded movie
- ThreadedMovie* mMovie;
+ /// The vector of images to show
+ std::vector<vtkImageData*> images;
+ ///
+ int mCurrent;
+ ///The threaded movie player
+ WxViewerPlayer* mPlayer;
+
+ /// The mutex
+ wxMutex mMutex;
};