imglib / imglib2-algorithm

Image processing algorithms for ImgLib2
http://imglib2.net/
Other
22 stars 20 forks source link

RectangleNeighborhoodCursor.jumpFwd(1) results in incorrect position. #6

Closed Squareys closed 9 years ago

Squareys commented 9 years ago

Hi @tpietzsch !

I believe I found a bug in RectangleNeighborhoodCursor:

On a fresh shape.neighborhoodsSafe(img).localizingCursor() fwd() results in position [0, 0, 0], but jumpFwd(1) results in position [2, 0, 0].

I wrote a simple test for this: here

When letting the cursor run through the entire img with .jumpFwd(1), an ArrayIndexOutOfBoundsException is thrown.

Greetings, Squareys

dietzc commented 9 years ago

https://github.com/imglib/imglib2-algorithm/tree/fix-rectangle-jump

Does this work as expected?