Recover modal gray value Jython



Anyone knows which field in the API documentation of ImageStatistics corresponds to the modal gray level ?
The mode and MODE attributes do not return the same value than what I have in the measurement table…
or is it a relative value ?

#@ImagePlus imp

IP = imp.getProcessor()
FullStat = IP.getStatistics()

# modal gray fromResult table -> 11165 with a 16-bit image
print FullStat.mode # -> 156
print FullStat.MODE # -> 8


Use ‘dmode’. Here is a JavaScript example:

  img = IJ.openImage("");;"Set Measurements...", "area mean modal");, "Measure", "");
  ip = img.getProcessor();
  stats = ip.getStatistics();