[Insight-developers] Events in Filters

Luis Ibanez luis.ibanez@kitware.com
Sat, 12 Apr 2003 00:16:03 -0400


Hi David,

It seems that you are doing the right thing,

If your Observer is catching the Start and
EndEvents, you code is certainly ok.

The reality is that many filters are not
invoking progress events nor iteration events.

Now that we are integrating filters into
applications, these lack of event invokations
becomes more visible.

Could you please log a Bug report in GNATS ?
(Indicating the list of filters you have
encounter so far that are missing event
invokation.)

We are also in the process of adding Abort
responses in the filters, and the invokation
of progress and/or iteration events are required
for having the oportunity to abort the filter
execution.

There are so many filters lacking events
that probably the best way to deal with this
is to populate the list of offending filters
that you just posted, and go fixing them
following some sort of priority...


Thanks


   Luis


--------------------------------
Holmes, David R., Ph.D. wrote:
> Hi all-
> 
> I have been looking into the ITK Observer/Event Paradigm for our work with Analyze.  I have a feeling that I am doing something completely wrong.
> 
> So, I setup a simple FilterObserver which simply executes:
> 
> void FilterObserver::Execute(const itk::Object * object, const itk::EventObject & event)
> {
> cout << "Here: ";
> event.Print(cout);
> 
> }
> 
> And in my filter code, I put a:
> 
> //	Define Observer Object
> 	FilterObserver::Pointer observer = FilterObserver::New();
> 	myFilter->AddObserver( itk::AnyEvent(), observer );
> 
> 
> And then I ran several different filters.  I am mostly interested in the Progess Events because few of the filters are iterative, but still curious about other events.  Unfortunately, none of the filters that I tried are generating Progress events.  Actually, from what I can tell, they are only generating modified events and delete events, so no Start or End Events either.  Here are the filters that I tried:
> 
> Bilateral
> BinomialBlur
> CurvatureAnisotropicDiffusion
> CurvatureFlow
> DiscreteGaussian
> MinMaxCurvatureFlow
> DanielssonDistanceMap
> DerivativeFilter
> ZeroCrossingBasedEdgeDetection
> 
> I realize that this is a small subset of filters, but rather than moving forward, I thought that I'd ask what I was doing wrong.
> 
> Thanks
> 
> david
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>