Skip to content

Commit b614574

Browse files
ppouchinCopilot
andauthored
Convert mask to 8-bit instead of only adjusting bit depth
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e1e70cf commit b614574

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/fr/igred/nucleus/utils/Thresholding.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ public static void convertToMask(ImagePlus input, double lowerThreshold, double
132132
}
133133
}
134134
}
135-
stack.setBitDepth(8); // Ensure mask is 8-bit
135+
ImageConverter converter = new ImageConverter(input);
136+
converter.convertToGray8(); // Ensure mask is 8-bit
136137
}
137138

138139
}

0 commit comments

Comments
 (0)