[Insight-users] Finding out when a neighborhood iterator is outside
the image?
Zachary Pincus
zpincus at stanford.edu
Thu Jul 29 15:34:49 EDT 2004
Hello,
I seem to recall seeing somewhere a method in ITK for determining when
a particular element of a neighborhood (or shaped neighborhood) is
outside of the real image. Unfortunately, neither searching the list
nor wracking my brain can retrieve this information.
Basically, I'm using shaped neighborhoods to get pairs of pixels to do
statistics on. Previously, I had just used the BoundaryFacesCalculator
to get the region of an image where a given neighborhood could not
possibly be outside the image. The problem is that just using that
region is too conservative: there are parts of the image where a given
neighborhood center and offset are still both on the image, even though
other parts of the neighborhood might be dangling off.
Maybe the best thing here would be to create a
"ThrowExceptionBoundaryCondition" and then catch the exception when
necessary to determine whether a given pixel is actually outside of the
image. Would that work, or are there other better ideas?
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
More information about the Insight-users
mailing list