Open imagejan opened 4 years ago
To my knowledge, there's currently no op available to compute modal values.
The ImageJ 1.x implementation is e.g. here in ShortProcessor
ShortProcessor
As a workaround, the mode can be computed as in this gist:
mode
import net.imglib2.algorithm.stats.Max histogram = ops.run("histogram", input) cursor = Max.findMax(histogram) value = input.firstElement().copy() histogram.getCenterValue(cursor.getLongPosition(0), value)
See also these two forum topics.
To my knowledge, there's currently no op available to compute modal values.
The ImageJ 1.x implementation is e.g. here in
ShortProcessor
As a workaround, the
mode
can be computed as in this gist:See also these two forum topics.