[Insight-developers] testing modified times of process objects

Bill Hoffman bill.hoffman at kitware.com
Thu Sep 21 14:04:47 EDT 2000


This is why the itkSetMacro looks like this:

#define itkSetMacro(name,type) \
   virtual void Set##name (const type _arg) \
   { \
     itkDebugMacro(<< this->GetClassName() << " (" << this \
                   << "): setting " #name " to " << _arg); \
     if (this->m_##name != _arg) \
       { \
       this->m_##name = _arg; \
       this->Modified(); \
       } \
   } 

At 01:59 PM 9/21/00 -0400, Luis Ibanez wrote:

>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
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers 





More information about the Insight-developers mailing list