I’m trying to run a script for ops and the format is unclear.
The starting point is https://nbviewer.jupyter.org/github/imagej/tutorials/blob/master/notebooks/1_-Using_ImageJ/ImageJ_Ops/01-_A_Very_Quick_Start_Guide.ipynb
I understand that the preferred language is jython which is chosen by using the python language under Fiji File -> New -> Script…
The very quick start, as written, doesn’t work, so I’m trying to get something which does work.
# @ImageJ ij import net.imglib2.interpolation.randomaccess.NLinearInterpolatorFactory clown = ij.io().open("http://imagej.net/images/clown.png") ij.ui().show("clown",clown) scaleFactors = [0.5, 0.5, 1] interpolationStrategy = new NLinearInterpolatorFactory() image = ij.op().run("scaleView", clown, scaleFactors, interpolationStrategy) ij.ui().show("image",image)
I can get the clown to show but trying to scale it down, I’ve reached the end of my guessing game for the correct format. I get:
SyntaxError: no viable alternative at input 'NLinearInterpolatorFactory'
I don’t know if I have Jython, python or something else, but the language I chose is python (there is no jython).