[Insight-users] Profiling the code - iterator or neighborhood

Martin Kavec kavec at messi.uku.fi
Wed Oct 12 07:39:44 EDT 2005


Hello everybody,

I have designed a neighborhood operator, which needs a neighborhood to 
generate the coefficients. In the filter which uses the operator, I traverse 
an image in a standard way, using ConstNeighborhoodIterator (together with 
faces) and I pass the neighborhood to the operator by calling 
ConstNeighborhoodIterator::GetNeighborhood() method.

However, when I profile the filter using callgrind, I can see that about 1/3 
of the execution time is spent by 
ConstNeighborhoodIterator::GetNeighborhood(). I was wondering, if I could 
gain any performance boost by reimplementing my operator to use already 
existing ConstNeighborhoodIterator instead of the neighborhood?

Thanks in advance.
Martin


More information about the Insight-users mailing list