//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('rotateView') input = ij.scifio().datasetIO().open("https://imagej.net/images/baboon.jpg") ij.notebook().display(input) fromAxis = 0 toAxis = 1 rotated = ij.op().run("rotateView", input, fromAxis, toAxis) ij.notebook().display(rotated) fromAxis = 1 toAxis = 0 rotated = ij.op().run("rotateView", input, fromAxis, toAxis) ij.notebook().display(rotated) fromAxis = 1 toAxis = 0 rotatedAgain = ij.op().run("rotateView", rotated, fromAxis, toAxis) ij.notebook().display(rotatedAgain) fromAxis = 2 toAxis = 1 rotated = ij.op().run("rotateView", input, fromAxis, toAxis) ij.notebook().display(rotated)