[Insight-users] ShapedNeighborhoodIterator + SetNeedToUseBoundaryCondition
Brady McCary
brady.mccary+ITK at gmail.com
Tue Jan 19 17:43:06 EST 2010
insight-users,
In my local ITK repository I have added the necessary line in
ConstShapedNeighborhoodIterator to export
NeighborhoodIterator::SetNeedToUseBoundaryCondition. The reason why I have
done this is because I am performing a computation using a
ShapedNeighborhoodIterator and it is possible for me to tell whether or not
I will need a boundary condition.
In the normal case, a NeighborhoodIterator determines whether or not it
needs a boundary condition by comparing the image region with the iteration
region. If the iteration region touches the edges of the image region
(padded by the neighborhood radius), the iterator thinks it will need a
boundary condition. In the case of dense iteration over the whole image, the
usual approach is to break the image into one big piece that does not need a
boundary condition and other small peices that do.
However, in a non-dense iteration over the entire image region, it may be
possible for a filter to tell that a boundary condition will never be
needed. For this case, we have
NeighborhoodIterator::SetNeedToUseBoundaryCondition. An optimization like
this is used in the sparse-field level set solver.
I have considered the code for ConstNeighborhoodIterator and
ConstShapedNeighborhoodIterator and I see no reason why
SetNeedToUseBoundaryCondition is not exported. I have used a shaped iterator
with boundary condition explicitly turned off for many different simulations
and have seen no problem or artifact.
For these reasons, I would recommend that
NeighborhoodIterator::SetNeedToUseBoundaryCondition and friends be exported
in ConstShapedNeighborhoodIterator.
Brady
On Mon, Jan 18, 2010 at 4:33 PM, Brady McCary
<brady.mccary+ITK at gmail.com<brady.mccary%2BITK at gmail.com>
> wrote:
> insight-users,
>
> ShapedNeighborhoodIterator is a subclass of NeighborhoodIterator. Is there
> a reason why NeighborhoodIterator::SetNeedToUseBoundaryCondtion is not
> exported in ShapedNeighborhoodIterator?
>
> Brady
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100119/5e7efb1f/attachment.htm>
More information about the Insight-users
mailing list