From f6bd47615e298648ec7cd2042e4457454cfaeea8 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Wed, 9 Oct 2024 14:52:35 +0200 Subject: [PATCH] correct bug in transposition method --- src/main/java/io/bioimage/modelrunner/tensor/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/bioimage/modelrunner/tensor/Utils.java b/src/main/java/io/bioimage/modelrunner/tensor/Utils.java index 812dbd24..683c9fac 100644 --- a/src/main/java/io/bioimage/modelrunner/tensor/Utils.java +++ b/src/main/java/io/bioimage/modelrunner/tensor/Utils.java @@ -97,8 +97,8 @@ RandomAccessibleInterval rearangeAxes(RandomAccessibleInterval rai, int[] t.setComponentMapping(orderChange); long[] minMax = new long[tensorShape.length * 2]; for (int i = 0; i < tensorShape.length; i ++) { - minMax[i] = min[orderChange[0]]; - minMax[i + tensorShape.length] = max[orderChange[0]]; + minMax[i] = min[orderChange[i]]; + minMax[i + tensorShape.length] = max[orderChange[i]]; } return Views.interval(new MixedTransformView( rai, t ), Intervals.createMinMax(minMax));