From 2deed03d8053f9100f08cf67277d0b422b6fdfae Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Wed, 24 Apr 2024 15:13:08 +0200 Subject: [PATCH] avoid permutation of axes --- src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java b/src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java index be233bc..69f5912 100644 --- a/src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java +++ b/src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java @@ -195,13 +195,10 @@ private RoiManager startRoiManager() { */ public RandomAccessibleInterval giveProcessedSubImage(SAMModel selectedModel) { //the IJ1 image operates always on the full image - //if (selectedModel.getName().equals(EfficientSAM.FULL_NAME)) { boolean isColorRGB = activeImage.getType() == ImagePlus.COLOR_RGB; Img image = ImageJFunctions.wrap(isColorRGB ? CompositeConverter.makeComposite(activeImage) : activeImage); - return Cast.unchecked(Views.permute(image, 0, 1)); - //} else { - // return Cast.unchecked(ImageJFunctions.wrap(activeImage)); - //} + //return Cast.unchecked(Views.permute(image, 0, 1)); + return Cast.unchecked(image); } @Override