From 45e2ba60ced02838bf8bbd09c8b378ba29d778d0 Mon Sep 17 00:00:00 2001 From: haesleinhuepf Date: Thu, 23 Apr 2020 17:18:00 +0200 Subject: [PATCH] bugfix: copyslice of stacks with one slice didn't work --- src/main/java/net/haesleinhuepf/clij2/plugins/CopySlice.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/haesleinhuepf/clij2/plugins/CopySlice.java b/src/main/java/net/haesleinhuepf/clij2/plugins/CopySlice.java index 9304b971..f08f6d30 100644 --- a/src/main/java/net/haesleinhuepf/clij2/plugins/CopySlice.java +++ b/src/main/java/net/haesleinhuepf/clij2/plugins/CopySlice.java @@ -39,7 +39,8 @@ public static boolean copySlice(CLIJ2 clij2, ClearCLImageInterface src, ClearCLI } else if (src.getDimension() == 3 && dst.getDimension() == 2) { clij2.execute(CopySlice.class, "copy_slice_from_3d_x.cl", "copy_slice_from_3d", dst.getDimensions(), dst.getDimensions(), parameters); } else { - throw new IllegalArgumentException("Images have wrong dimension. Must be 3D->2D or 2D->3D."); + System.out.println("Warning: Images have wrong dimension. Must be 3D->2D or 2D->3D."); + clij2.copy(src, dst); } return true; }