X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=PackRecalage%2Fsrc%2FbbPackRecalageImageSwitcherBox.cxx;h=1c603f6c17b3b5cc2da47a47cd2490c4e7d5d43a;hb=056c44ebcefce5a0c1d0b5cd162a63d5805df456;hp=760207d26150f7b678715bd927014edbac8c9a70;hpb=124e80f4fe9a8dc4c7581b79ad3165aefacdf6ed;p=creaRigidRegistration.git diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx index 760207d..1c603f6 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx +++ b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx @@ -25,6 +25,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageSwitcherBox,bbtk::WxBlackBox); void ImageSwitcherBox::Process() { time = bbGetInputTime(); + _on = bbGetInputOn(); if(myTimer == NULL) { @@ -32,13 +33,14 @@ void ImageSwitcherBox::Process() myTimer->Start(time); oldTime = time; } - else if(oldTime != time && myTimer != NULL) + + if(oldTime != time && myTimer !=NULL) { myTimer->Stop(); myTimer->Start(time); oldTime = time; } - + if(change == false) { bbSetOutputOut(bbGetInputIn1()); @@ -48,7 +50,7 @@ void ImageSwitcherBox::Process() { bbSetOutputOut(bbGetInputIn2()); change = false; - } + } } void ImageSwitcherBox::CreateWidget(wxWindow* parent) { @@ -60,6 +62,7 @@ void ImageSwitcherBox::bbUserSetDefaultValues() change = false; time = 500; oldTime = 500; + _on = false; } void ImageSwitcherBox::bbUserInitializeProcessing() {