From 47c5ea22ab69c08703c43fcf57f0cae3a016eb9a Mon Sep 17 00:00:00 2001 From: tpietzsch <tobias.pietzsch@gmail.com> Date: Tue, 24 Sep 2024 17:25:47 +0200 Subject: [PATCH] Update to imglib2-algorithm-0.17.2, adopt BlockSupplier API changes --- pom.xml | 2 ++ src/main/java/bdv/export/ExportScalePyramid.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b5503d29..c5bd7ebf 100644 --- a/pom.xml +++ b/pom.xml @@ -143,6 +143,8 @@ <license.licenseName>bsd_2</license.licenseName> <license.copyrightOwners>BigDataViewer developers.</license.copyrightOwners> + <imglib2.version>7.1.4</imglib2.version> + <imglib2-algorithm.version>0.17.2</imglib2-algorithm.version> <spim_data.version>2.3.5</spim_data.version> <!-- NB: Deploy releases to the SciJava Maven repository. --> diff --git a/src/main/java/bdv/export/ExportScalePyramid.java b/src/main/java/bdv/export/ExportScalePyramid.java index 5391a412..8d2c01b2 100644 --- a/src/main/java/bdv/export/ExportScalePyramid.java +++ b/src/main/java/bdv/export/ExportScalePyramid.java @@ -44,6 +44,7 @@ import net.imglib2.RandomAccessibleInterval; import net.imglib2.algorithm.blocks.BlockSupplier; import net.imglib2.algorithm.blocks.downsample.Downsample; +import net.imglib2.blocks.BlockInterval; import net.imglib2.img.cell.CellGrid; import net.imglib2.type.NativeType; import net.imglib2.type.numeric.RealType; @@ -314,7 +315,7 @@ public static < T extends RealType< T > & NativeType< T >, D > void writeScalePy final long[] gridPosition = new long[ n ]; grid.getCellGridPositionFlat( index, gridPosition ); final DataBlock< ? > block = dataType.createDataBlock( blockSize, gridPosition ); - blocks.copy( currentCellMin, block.getData(), blockSize ); + blocks.copy( BlockInterval.wrap( currentCellMin, blockSize), block.getData() ); io.writeBlock( dataset, block ); } return null;