I’ve started writing this small utility Op for ImageJ, which checks whether a Dataset is binary. A little background: BoneJ features many plugins that presuppose that the input image has been thresholded. That is, the image should only feature two different values: one for foreground particles (traditionally white), and one for background particles (black). In BoneJ1 an ImagePlus is considered binary if its type is GRAY8, and it has only white (255) or black (0) values.
Now a Dataset is a lot more generic than an ImagePlus. When should it be considered binary? Micheal (@mdoube ) and I think that it means that the Dataset contains only two distinct values. It doesn’t matter what those two values actually are, as long as one can be used for foreground and one for background. The current code reflects this assumption. We’d like to hear your opinions.
Thanks & best,