[Insight-developers] Events in Filters

Miller, James V (Research) millerjv@crd.ge.com
Sun, 13 Apr 2003 21:49:33 -0400


I am suprised that you are not getting Start and End events since they
are handled by the pipeline and not by a filter itself.  

But I have never tried to observer itk::AnyEvent().  I have used the
FilterWatcher object in Testing/Code/BasicFilters/itkFilterWatcher.h 
on a number of filters.




> -----Original Message-----
> From: Holmes, David R., Ph.D. [mailto:Holmes.David3@mayo.edu]
> Sent: Friday, April 11, 2003 5:17 PM
> To: 'Insight Developers List '
> Subject: [Insight-developers] Events in Filters
> 
> 
> 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
>