public class RoiWrapper extends Object implements IJRealRoiWrapper<Roi>, 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)
|
RoiWrapper(Roi roi)
|
| Modifier and Type | Method and Description |
|---|---|
RealLocalizableRealPositionable |
center() |
boolean |
equals(Object obj) |
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(RealLocalizable t) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitnumDimensionsand, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xorboundaryType, isAll, knownConstantmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointpublic RoiWrapper(double x,
double y,
double width,
double height)
x - x coordinate of upper left cornery - y coordinate of upper left cornerwidth - width of rectangleheight - height of rectanglepublic boolean test(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<RealLocalizable>public double realMin(int d)
realMin in interface RealIntervalpublic double realMax(int d)
realMax in interface RealIntervalpublic double sideLength(int d)
sideLength in interface Boxpublic RealLocalizableRealPositionable center()
center in interface Boxcenter in interface WritableBoxpublic void setSideLength(int d,
double length)
UnsupportedOperationException.setSideLength in interface WritableBoxUnsupportedOperationException - cannot modify width/height of
underlying Roipublic Roi getRoi()
IJRoiWrapperRoi.getRoi in interface IJRoiWrapper<Roi,RealLocalizable>Roipublic boolean equals(Object obj)
equals in interface Boxequals in interface MaskPredicate<RealLocalizable>equals in class ObjectCopyright © 2014–2022 ImageJ. All rights reserved.