]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageImageSwitcherBox.cxx
index bf4afe9c36f04ff79c5f6ba47b3e538de4034c8e..65696f6904dc6c60cc190565ed2d6dfd91107c38 100644 (file)
@@ -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()