X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=PackRecalage%2Fsrc%2FbbPackRecalageImageSwitcherBox.cxx;h=65696f6904dc6c60cc190565ed2d6dfd91107c38;hb=4b3375d0842a53375e79e35e0b0e690f485534bf;hp=bf4afe9c36f04ff79c5f6ba47b3e538de4034c8e;hpb=9b89ece57878a559b17dd54f884720b6eea395ef;p=creaRigidRegistration.git diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx index bf4afe9..65696f6 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx +++ b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx @@ -14,6 +14,7 @@ namespace bbPackRecalage void MyTimer::Notify() { + //This will be called each time the timer finishes a countdown _box->Change(); _box->bbSignalOutputModification(std::string("Out")); } @@ -23,6 +24,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageSwitcherBox,bbtk::WxBlackBox); void ImageSwitcherBox::Change() { + //Just changes the images each time the timer finishes a countdown + if(change == false) { bbSetOutputOut(bbGetInputIn2()); @@ -60,14 +63,7 @@ void ImageSwitcherBox::Process() myTimer->Start(time); oldTime = time; } - /* - if(oldTime != time && myTimer !=NULL) - { - myTimer->Stop(); - myTimer->Start(time); - oldTime = time; - }*/ - + if(!_on) { myTimer->Stop(); @@ -86,6 +82,7 @@ void ImageSwitcherBox::Process() } void ImageSwitcherBox::CreateWidget(wxWindow* parent) { + //Creates a simple text widget because it is necesary that a non-empty widget exists for creatingh the thread of the timer. bbSetOutputWidget( new wxStaticText(parent, -1, _T("Image Switcher")) ); } void ImageSwitcherBox::bbUserSetDefaultValues()