File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
src/main/java/net/imglib2/algorithm/localextrema Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>
206206 <dependency >
207207 <groupId >net.imglib2</groupId >
208208 <artifactId >imglib2</artifactId >
209+ <version >4.6.0</version >
209210 </dependency >
210211 <dependency >
211212 <groupId >net.imglib2</groupId >
Original file line number Diff line number Diff line change @@ -533,11 +533,7 @@ public static < T > IntervalView< T > shrink( final RandomAccessibleInterval< T
533533 assert Arrays .stream ( margin ).min ().getAsLong () >= 0 : "Margin cannot be negative" ;
534534 assert IntStream .range ( 0 , margin .length ).mapToLong ( d -> source .dimension ( d ) - 2 * margin [ d ] ).min ().getAsLong () >= 0 : "Margin bigger than input" ;
535535
536- final long [] min = IntStream .range ( 0 , margin .length ).mapToLong ( d -> source .min ( d ) + margin [ d ] ).toArray ();
537- final long [] max = IntStream .range ( 0 , margin .length ).mapToLong ( d -> source .max ( d ) - margin [ d ] ).toArray ();
538-
539- return Views .interval ( source , new FinalInterval ( min , max ) );
540-
536+ return Views .expandBorder ( source , Arrays .stream (margin ).map (m -> -m ).toArray ());
541537 }
542538
543539 /**
You can’t perform that action at this time.
0 commit comments