Skip to content

Commit

Permalink
avoid permutation of axes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Apr 24, 2024
1 parent 92e622b commit 2deed03
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2deed03

Please sign in to comment.