X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaRigidRegistration.git;a=blobdiff_plain;f=PackRecalage%2Fsrc%2FbbPackRecalageImageSwitcherBox.cxx;fp=PackRecalage%2Fsrc%2FbbPackRecalageImageSwitcherBox.cxx;h=226f1a49fae923cbad94cc8e39d073506952494a;hp=47215c4aebe7b6e9ad9830a3ce9fcc3509cd318b;hb=8350521be99adf8eb9b414f3bdf3d35d6959d66c;hpb=f6b89d782ef742d6585b461ee68ea03070a4d1b1 diff --git a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx index 47215c4..226f1a4 100644 --- a/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx +++ b/PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx @@ -71,18 +71,16 @@ void ImageSwitcherBox::Process() if(firstTime == true) { + firstTime = false; if(bbGetInputIn1() != NULL) { bbSetOutputOut(bbGetInputIn1()); - firstTime = false; - } - else if(bbGetInputIn2() != NULL) - { + } else if(bbGetInputIn2() != NULL) { bbSetOutputOut(bbGetInputIn2()); - firstTime = false; } } - + +/* EED 31/052013 if(myTimer == NULL) { myTimer = new MyTimer(this); @@ -93,42 +91,43 @@ void ImageSwitcherBox::Process() if(!_on) { myTimer->Stop(); - } - else if(!myTimer->IsRunning()) - { + } else if(!myTimer->IsRunning()) { myTimer->Start(time); oldTime = time; - } - else if(oldTime != time) - { + } else if(oldTime != time) { myTimer->Stop(); myTimer->Start(time); oldTime=time; } +*/ } + + 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() { - myTimer = NULL; - change = false; - time = 500; - oldTime = 500; - firstTime = true; - _on=false; + myTimer = NULL; + change = false; + time = 500; + oldTime = 500; + firstTime = true; + _on = false; } void ImageSwitcherBox::bbUserInitializeProcessing() { - } + void ImageSwitcherBox::bbUserFinalizeProcessing() { myTimer->Stop(); delete myTimer; } -} -// EO namespace bbPackRecalage + +} // EO namespace bbPackRecalage