//load ImageJ %classpath config resolver scijava.public https://maven.scijava.org/content/groups/public %classpath add mvn net.imagej imagej 2.0.0-rc-67 //create ImageJ object ij = new net.imagej.ImageJ() ij.op().help('interpolateView') import net.imglib2.interpolation.randomaccess.NearestNeighborInterpolatorFactory import net.imglib2.interpolation.randomaccess.NLinearInterpolatorFactory import net.imglib2.interpolation.randomaccess.LanczosInterpolatorFactory scaleFactors = [4, 4, 1] // Enlarge X and Y by 4x; leave channel count the same. input = ij.scifio().datasetIO().open("http://imagej.net/images/ij-icon.gif") interpolated= ij.op().run("interpolateView", input, new NLinearInterpolatorFactory()) ij.notebook().display(input) access = interpolated.realRandomAccess() //coordinates to interrogate x = 16.6 as double y = 10.2 as double //set the randomAccess to x in the first dimension and y in the second access.setPosition(x, 0) access.setPosition(y, 1) println(access.get().getRealDouble())