MultiThreadImageReaderUser::EventType t,
vtkImageData* image);
- vtkImageData* GetDefaultImage() { mReader.GetImage(""); }
+ vtkImageData* GetDefaultImage() { return mReader.GetImage(""); }
//=============================================
// Previewer
mViewer = new WxViewer(mBottomPanel, wxID_ANY, wxT("Gimmick! Viewer"),wxDefaultPosition, wxDefaultSize );
+ mViewer->SetMovieSize(1);
+ mViewer->SetImage(0,GetDefaultImage());
bottom_sizer->Add(mViewer,1,wxGROW,0);
// mViewer->Show();
// Splitting
int hsize = size.GetHeight();
+
int bottom_minsize = 40;
mSplitter->SetMinimumPaneSize( bottom_minsize );
mCurrent = 0;
- mPlayer = new WxViewerPlayer(this); //images, mViewer, mInteractor, this);
- mPlayer->Create();
- mPlayer->Run();
+ mPlayer = new WxViewerPlayer(this); //images, mViewer, mInteractor, this);
+ mPlayer->Create();
+ mPlayer->Run();
topsizer-> Add( mInteractor ,1,wxGROW ,0);
SetSizer( topsizer );
void WxViewer::SetImage(int i, vtkImageData* im)
{
wxMutexLocker lock(mMutex);
- GimmickDebugMessage(5,"WxViewer::SetImage "<<i+1<<"/"<<images.size()
+ if(images.size()>0)
+ {
+ 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);
- }
+ if (i<images.size())
+ {
+ // if (images[i]!=0) images[i]->UnRegister(NULL);
+ images[i] = im;
+ // if (im!=0) im->Register(NULL);
+ }
+
+ }
+
}
//================================================================
//mInteractor->Render();
// mViewer->Render();
- ::wxWakeUpIdle();
+ ::wxWakeUpIdle();
}
//================================================================
void WxViewer::OnInternalIdle()
{
// mInteractor->Refresh();
- mInteractor->Render();
+ if(images.size()>0)
+ {
+ mInteractor->Render();
+ }
//mViewer->Render();
}