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));