|
This implements a new neighborhood iterator, to iterate on a set of points around a given point. This should be useful to implement some 2d/3d image processing. A few points:
- It works for arbitrary arrays, and is created from another iterator (which can be a neighborhood iterator itself)
- It handles boundaries conditions with 0 padding
- An practical example can be found on github for a new correlation implementation (http://github.com/cournape/scipy3.git/cournape/clean_correlate branch, in scipy/signal/correlate_nd.c.src)
- It is reasonably efficient (I don't have any baseline, though), but is not optimized for contiguous arrays.
- There is one hack, which forces the iterator given as an argument to the constructor to be non contiguous, to force it to update its coordinates member.
|