From 78daee4924366223e1bd22ab4e33f8aacafb7151 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 18 Oct 2024 18:12:59 +0200 Subject: [PATCH] fix bug https://forum.image.sc/t/problem-with-imglib2-algorithm-stats-max-findmax-regions-sample/103890 --- .../net/imglib2/roi/util/iterationcode/IterationCodeCursor.java | 2 +- .../imglib2/roi/util/iterationcode/IterationCodeListCursor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeCursor.java b/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeCursor.java index c26af1d1..dbaf03be 100644 --- a/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeCursor.java +++ b/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeCursor.java @@ -65,7 +65,7 @@ public IterationCodeCursor( final TIntArrayList itcode, final long[] offset ) protected IterationCodeCursor( final IterationCodeCursor c ) { - super( c.position ); + super( c.position.clone() ); iter = new IterationCodeIterator<>( c.iter, Point.wrap( position ) ); } diff --git a/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeListCursor.java b/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeListCursor.java index 178c35f2..972f2c4a 100644 --- a/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeListCursor.java +++ b/src/main/java/net/imglib2/roi/util/iterationcode/IterationCodeListCursor.java @@ -65,7 +65,7 @@ public IterationCodeListCursor( final ArrayList< TIntArrayList > itcodesList, fi protected IterationCodeListCursor( final IterationCodeListCursor c ) { - super( c.position ); + super( c.position.clone() ); iter = new IterationCodeListIterator<>( c.iter, Point.wrap( position ) ); }