[Insight-developers] Events in Filters

Holmes, David R., Ph.D. Holmes.David3@mayo.edu
Fri, 11 Apr 2003 16:17:03 -0500


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