[Insight-developers] testing modified times of process objects

Luis Ibanez ibanez at cs.unc.edu
Thu Sep 21 13:59:53 EDT 2000


Josh's question  raises another one,

All of our filters that receive parameters
should  take care of invoking the method

           Modified()

Whenever one of its parameters change.

This method marks the object (in this case:
our filter)  as modified, by updating its time
stamp.

For example in the GaussianFilter,
the method

          SetSigma( float )

Should set the new sigma, and then
call "Modified()".  In this way, the
next time that "Update()" is called
on this filter, the "Execute()" method
will be invoked.

Otherwise the Execute method will not
be called (even if there is a new sigma)
because the time stamp will make the
filter look as updated.

------

About the way of knowing if some internal
values should be recomputed,... it seems that
you will have to keep and internal boolean
in the filter. Put it to false each time the filter
is executed and put it to true each time a
parameter is changed.

It is hard to know if this is needed for all the filters.
In general the time for computing coefficients is
negligible with respect to the time consumed
applying the filter.




Luis





More information about the Insight-developers mailing list