IterableInterval
s)¶//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@281e831f
This notebook looks at copying Img
s.
ij.op().help("copy.img")
Available operations: (ArrayImg out?) = net.imagej.ops.copy.CopyArrayImg( ArrayImg out?, ArrayImg in) (Img out?) = net.imagej.ops.copy.CopyImg( Img out?, Img in)
Let's get an Img
to use:
input = ij.scifio().datasetIO().open("http://imagej.net/images/clown.png")
ij.notebook().display(input)
Copying the Img
is easy enough. All we need is the input we just made and an output image:
copyImg = ij.op().create().img(input)
//Remember that output comes before input
ij.op().copy().img(copyImg,input)
ij.notebook().display(copyImg)
There also exist Op
s to copy Img
s and RandomAccessibleInterval
s, which you can find by accessing these links.