public class RoiWrapper extends Object implements IJRealRoiWrapper<ij.gui.Roi>, net.imglib2.roi.geom.real.WritableBox
Roi as an ImgLib2 Box. Even though all
ImageJ 1.x ROIs are Rois, this class should only be used to wrap
ROIs intended to be rectangles.| Constructor and Description |
|---|
RoiWrapper(double x,
double y,
double width,
double height)
Creates an ImageJ 1.x
Roi and then wraps it as an ImgLib2
Box. |
RoiWrapper(ij.gui.Roi roi)
Wraps an ImageJ 1.x
Roi as an ImgLib2 Box. |
| Modifier and Type | Method and Description |
|---|---|
net.imglib2.roi.util.RealLocalizableRealPositionable |
center() |
boolean |
equals(Object obj) |
ij.gui.Roi |
getRoi()
Returns the backing ImageJ 1.x
Roi. |
int |
hashCode() |
double |
realMax(int d) |
double |
realMin(int d) |
void |
setSideLength(int d,
double length)
This will always throw an
UnsupportedOperationException. |
double |
sideLength(int d) |
boolean |
test(net.imglib2.RealLocalizable t)
In an attempt to be consistent with ImageJ 1.x
Roi.contains(int, int), only some of the edges are considered
"contained" by this rectangle. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitnumDimensionsequals, hashCode, maskTypeand, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xornegate, or, transform, xorboundaryType, isAll, knownConstantmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointpublic RoiWrapper(double x,
double y,
double width,
double height)
Roi and then wraps it as an ImgLib2
Box.x - x coordinate of upper left cornery - y coordinate of upper left cornerwidth - width of rectangleheight - height of rectanglepublic RoiWrapper(ij.gui.Roi roi)
Roi as an ImgLib2 Box.roi - the Roi to be wrappedpublic boolean test(net.imglib2.RealLocalizable t)
In an attempt to be consistent with ImageJ 1.x
Roi.contains(int, int), only some of the edges are considered
"contained" by this rectangle. Therefore, this Box has
unspecified boundary
behavior.
test in interface Predicate<net.imglib2.RealLocalizable>public double realMin(int d)
realMin in interface net.imglib2.RealIntervalpublic double realMax(int d)
realMax in interface net.imglib2.RealIntervalpublic double sideLength(int d)
sideLength in interface net.imglib2.roi.geom.real.Boxpublic net.imglib2.roi.util.RealLocalizableRealPositionable center()
center in interface net.imglib2.roi.geom.real.Boxcenter in interface net.imglib2.roi.geom.real.WritableBoxpublic void setSideLength(int d,
double length)
UnsupportedOperationException.setSideLength in interface net.imglib2.roi.geom.real.WritableBoxUnsupportedOperationException - cannot modify width/height of
underlying Roipublic ij.gui.Roi getRoi()
IJRoiWrapperRoi.getRoi in interface IJRoiWrapper<ij.gui.Roi,net.imglib2.RealLocalizable>Roipublic boolean equals(Object obj)
equals in interface net.imglib2.roi.geom.real.Boxequals in interface net.imglib2.roi.MaskPredicate<net.imglib2.RealLocalizable>equals in class ObjectCopyright © 2009–2025 ImageJ. All rights reserved.