]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx
2020 2020 creaRigidRegistration Feature New Normal Comparing Images in XY XZ YZ...
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageImageSwitcherBox.cxx
index 47215c4aebe7b6e9ad9830a3ce9fcc3509cd318b..226f1a49fae923cbad94cc8e39d073506952494a 100644 (file)
@@ -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