//Returns the maximal priority
int GetMaximalPriority(){return mReader.GetMaximalPriority();}
- ///Returns the selected Images and validates to see if they comply with the given parameter(<4D)
- vtkImageData* GetSelectedImage(int dim);
///Adds the selected Images to the given vector and validates to see if they comply with the given parameter (4D)
virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
{ GimmickError("INTERNAL ERROR : GetSelectedImages not implemented"); }
//===============================================================================================
//Image Selection
//===============================================================================================
- vtkImageData* GetSelectedImage(int dim)
- { return mView->GetSelectedImage(dim); }
+
void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
{ mView->GetSelectedImages(s, dim); }
mNotebook->AddPage( view, crea::std2wx(name) );
}
- //======================================================================
- /// Returns the selected Image so that it complies with the given parameter(<4D)
- vtkImageData* WxGimmickView::GetSelectedImage(int dim)
- {
- return NULL;
- //GetTreeViewMap()["Local database"]->GetSelectedImage(dim);
- }
//======================================================================
/// Returns the selected Images so that they comply with the given parameter(4D)
int level=GetTreeViewMap()["Local database"]->GetNumberOfLevels();
std::vector<tree::Node*> im=GetTreeViewMap()["Local database"]->GetSelected(level+1);
ReadImagesNotThreaded(s,im,dim);
+ mViewer->StopPlayer();
}
//======================================================================
/// Returns the selected Images so that they comply with the given parameter(4D)
{
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)
- {
- if((*i)==node)
- {
- mViewer->AddImage(image);
- found=true;
- }
- }
- */
}
UnqueueNext();
}
- /*
- if(!(mViewer->ImagesEmpty()))
- {
- GimmickDebugMessage(5,
- "Showing images"
- <<std::endl);
- // mViewer->ShowImages();
- // mViewer->Show();
- }
- */
+
ClearQueue();
/// Virtual destructor
virtual ~WxGimmickView();
- /// Returns the selected Images so that they comply with the given parameter(<4D)
- ///(overloaded from GimmickView)
- vtkImageData* GetSelectedImage(int dim);
/// Returns the selected files
///(overloaded from GimmickView)
void GetSelectedFiles(std::vector<std::string>& s);
data->node = *j;
item.SetId(_id);
- /*
- std::string a=(*j)->GetAttribute(mLevelList[l].key[mColumnSelected-1]);
- GimmickMessage(1,
- "State Check: Att VAL"
- <<a
- <<std::endl);
- */
+
data->id = _id;
item.SetData(data);
_id++;
-
- long id = GetCtrl(l)->InsertItem(item);
-
+ long id=GetCtrl(l)->InsertItem(item);
+
std::ostringstream oss;
int n= GetTreeHandler()->GetNumberOfChildren(*j);
#include <stdio.h>
#include <time.h>
-
using namespace crea;
namespace creaImageIO
// void ShowImage(vtkImageData* v);
// void StartIterator();
void OnExit();
-
+
private:
//std::vector<vtkImageData*> mImagesToPlay;
//vtkImageViewer2* mViewer;
mCurrent = 0;
- mPlayer = new WxViewerPlayer(this); //images, mViewer, mInteractor, this);
+ mPlayer = new WxViewerPlayer(this); //images, mViewer, mInteractor, this);
+
mPlayer->Create();
mPlayer->Run();
// mInteractor->Refresh();
//mInteractor->Render();
- // mViewer->Render();
-
- ::wxWakeUpIdle();
+ // mViewer->Render();
+
+ //::wxWakeUpIdle();
}
//================================================================
// mInteractor->Refresh();
if(images.size()>0)
{
- mInteractor->Render();
+// mInteractor->Render();
}
//mViewer->Render();
}
+
+ //================================================================
+
+ //==================================================
+ void WxViewer::StopPlayer()
+ {
+ mPlayer->Delete();
+ }
- //=================================================
// BEGIN_EVENT_TABLE(WxGimmickFrame, wxDialog)
GimmickMessage(1,"WxViewerPlayer::Entry()"<<std::endl);
while(true)
- {
- mWxViewer->ShowNextImage();
- clock_t endwait;
- endwait = clock () + 0.2 * CLOCKS_PER_SEC ;
- while (clock() < endwait) {}
+ {
+ if(!TestDestroy())
+ {
+ mWxViewer->ShowNextImage();
+ mWxViewer->Refresh();
+ clock_t endwait;
+ endwait = clock () + 0.2 * CLOCKS_PER_SEC ;
+ while (clock() < endwait) {}
+ }
+ else
+ {
+ break;
+ }
/*
for(i=mImagesToPlay.begin();i!=mImagesToPlay.end();++i)
{
mParent->Refresh();
endwait = clock () + 0.2 * CLOCKS_PER_SEC ;
while (clock() < endwait) {}
- }
+
}
*/
GimmickMessage(1,"WxViewerPlayer::OnExit() "<<std::endl);
}
- //=====================================================================
-
} // EO namespace creaImageIO
void OnInternalIdle();
+ void StopPlayer();
private:
///Shows the image passed as parameter