Accepted answer

I ended up using the imageJ API to solve this problem. There is an excellent article here on the API: programming basics

This chunk gets you a ShortProcessor ( which you can use to query individual pixels or get an Array[Short] dump of all pixels.

val opener = new Opener()
val imp = opener openImage path
val sp = (imp.getProcessor()).convertToShort(false)

Also, here's the sbt line you want

libraryDependencies += "gov.nih.imagej" % "imagej" % "1.46"

Related Query

More Query from same tag