[Insight-developers] fltkLightButton behavior
Luis Ibanez
luis.ibanez@kitware.com
Tue, 16 Apr 2002 16:22:13 -0400
Damion,
A quick clarification on the behavior of the FLTK LightButton as an
Observer.
When you click directly on the FLTK button it will alway turn to yellow,
because it is reacting to the fact that you pushed on it. This is FLTK
normal
behavior completly unrelated to ITK.
When you add FLTK LightButtons to your GUI, make sure that put them on
"1" as default value (those are "Push buttons" which means that when you
click on them they remember their state, a second click will switch them
to 0.
What the fltk::LightButton does as response to ITK events is only to change
"Color". It is assumed that the button is always "on" (that is the
value(): is set
to 1).
So.,.. this first change to Yellow that you observe when clicking on the
buttons
is just an FLTK reflex and is unrelated with the ITK pipeline.
(specially since
you haven't added callbacks to these buttons).
The color changes that you see when calling the Update() method of the
pipeline are the ones that really provide information about the execution.
Luis
BTW Could you add your program as an example to the repository ?
In that way we could actually see what is happening at execution time.
=======================================================
Damion Shelton wrote:
> Per Luis's suggestion, I've added fltkLightButtons to my application
> to monitor the status of the pipeline. Here's the behavior:
>
> After application load: all buttons grey
>
> If I click on each button at this point it turns yellow (I did not set
> a callback). According to an earlier email yellow means StartEvent() -
> this is a bit confusing because nothing is happening in the pipeline
> at this point.
>
> If I hit the update button (which calls Update() on the last member of
> the pipeline). The buttons then update as expected (i.e. they turn
> from yellow to green as the pipeline execution progesses). Keep in
> mind that this is without modifying any members of the pipeline.
>
> If I _do_ modify a pipeline member, it's color changes to red (like
> it's supposed to) and hitting update results in greens across the
> board after execution. At this point, hitting update again does
> nothing (as expected), since nothing has been modified.
>
> So, it seems like somehow the pipeline is re-executing when all of the
> filters are tagged yellow (start event). Any ideas?
>
> Btw, the button is pretty cool - very nice debugging tool.
>
> -Damion-
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>