//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()
Added new repo: scijava.public
net.imagej.ImageJ@465e45d7
This Op
calculates the Skewness of any Iterable
, using the Third Moment About the Mean and Standard Deviation Op
s. Skewness measures the asymmetry of a distribution, with skewness < 0
implying a longer left tail, skewness > 0
implying a longer right tail, and skewness = 0
implying two equally-sized tails.
sinusoid32 = ij.op().run("create.img", [150, 100])
formula = "63 * (Math.cos(0.3*p[0]) + Math.sin(0.3*p[1])) + 127"
ij.op().image().equation(sinusoid32, formula)
ij.notebook().display(sinusoid32)
All Img
s are Iterable
s, so we can just pass through the Img
to Skewness()
:
import net.imglib2.type.numeric.real.DoubleType
output = new DoubleType()
ij.op().stats().skewness(output, sinusoid32)
output
-0.04067366532821499