public interface ROIService extends ImageJService
Service
for working with Regions of Interest (ROI).Modifier and Type | Field and Description |
---|---|
static String |
ROI_PROPERTY |
Modifier and Type | Method and Description |
---|---|
default void |
add(Object roi,
Object img)
Attaches the given ROI to the given image
|
default void |
clear(Dataset img)
Clears all
MaskPredicate s associated with the given Dataset |
default WritableBox |
closedBox(double[] min,
double[] max)
Creates a
WritableBox with closed
boundary behavior. |
default WritableEllipsoid |
closedEllipsoid(double[] center,
double[] semiAxisLengths)
Creates an
WritableEllipsoid with closed boundary behavior. |
default WritablePolygon2D |
closedPolygon2D(double[] x,
double[] y)
Creates a
WritablePolygon2D with closed
boundary behavior. |
default WritablePolygon2D |
closedPolygon2D(List<? extends RealLocalizable> vertices)
Creates a
WritablePolygon2D with closed
boundary behavior. |
default WritableSphere |
closedSphere(double[] center,
double radius)
Creates a
WritableSphere with closed
boundary behavior. |
default WritableSuperEllipsoid |
closedSuperEllipsoid(double[] center,
double[] semiAxisLengths,
double exponent)
Creates a
WritableSuperEllipsoid with closed boundary behavior. |
default ROITree |
getROIs(Dataset img)
|
default boolean |
hasROIs(Object o)
Check if the given
Object is or has ROIs |
default <L extends RealLocalizable> |
kDTreeRealPointCollection(Collection<L> points)
Creates a read-only
RealPointCollection containing the given
points. |
default <L extends RealLocalizable> |
kDTreeRealPointCollection(KDTree<L> tree)
Creates a read-only
RealPointCollection containing the given
points. |
default WritableLine |
line(double[] pointOne,
double[] pointTwo,
boolean copy)
Creates a
WritableLine with the given endpoints. |
default WritableLine |
line(RealLocalizable pointOne,
RealLocalizable pointTwo)
Creates a
WritableLine with the given endpoints. |
default WritableBox |
openBox(double[] min,
double[] max)
Creates a
WritableBox with open boundary
behavior. |
default WritableEllipsoid |
openEllipsoid(double[] center,
double[] semiAxisLengths)
Creates an
WritableEllipsoid with open
boundary behavior. |
default WritablePolygon2D |
openPolygon2D(double[] x,
double[] y)
Creates a
WritablePolygon2D with open
boundary behavior. |
default WritablePolygon2D |
openPolygon2D(List<? extends RealLocalizable> vertices)
Creates a
WritablePolygon2D with open
boundary behavior. |
default WritableSphere |
openSphere(double[] center,
double radius)
Creates a
WritableSphere with open
boundary behavior. |
default WritableSuperEllipsoid |
openSuperEllipsoid(double[] center,
double[] semiAxisLengths,
double exponent)
Creates a
WritableSuperEllipsoid with open boundary behavior. |
default WritablePointMask |
pointMask(double[] point)
Creates a
WritablePointMask at the given location. |
default WritablePointMask |
pointMask(RealLocalizable point)
Creates a
WritablePointMask at the given location. |
default WritablePolygon2D |
polygon2D(double[] x,
double[] y)
Creates a
WritablePolygon2D with unspecified boundary behavior. |
default WritablePolygon2D |
polygon2D(List<? extends RealLocalizable> vertices)
Creates a
WritablePolygon2D with unspecified boundary behavior. |
default WritablePolyline |
polyline(List<? extends RealLocalizable> vertices)
Creates a
WritablePolyline containing the given vertices, in the
given order. |
default <L extends RealLocalizable> |
realPointCollection(Collection<L> points)
Creates a
WritableRealPointCollection containing the given points. |
default <L extends RealLocalizable> |
realPointCollection(HashMap<gnu.trove.list.array.TDoubleArrayList,L> points)
Creates a mutable
WritableRealPointCollection containing the given
points. |
default <L extends RealLocalizable> |
realPointSampleListRealPointCollection(Collection<L> points)
Creates a
WritableRealPointCollection containing the given points. |
default <L extends RealLocalizable> |
realPointSampleListRealPointCollection(RealPointSampleList<L> points)
Creates a
WritableRealPointCollection containing the given points. |
Mask |
toMask(Object o)
Attempts to convert the given
Object to a Mask |
MaskInterval |
toMaskInterval(Object o)
Attempts to convert the given
Object to a MaskInterval |
MaskPredicate<?> |
toMaskPredicate(Object o)
Attempts to convert the given
Object to a MaskPredicate . |
RandomAccessibleInterval<BoolType> |
toRandomAccessibleInterval(Object o)
Attempts to convert the given
Object to a
RandomAccessibleInterval<BoolType> ; otherwise, an exception is
thrown. |
RandomAccessible<BoolType> |
toRandomAcessible(Object o)
Attempts to convert the given
Object to a
RandomAccessible<BoolType> ; otherwise, an exception is thrown. |
RealMask |
toRealMask(Object o)
Attempts to convert the given
Object to a RealMask |
RealMaskRealInterval |
toRealMaskRealInterval(Object o)
Attempts to convert the given
Object to a
RealMaskRealInterval |
RealRandomAccessible<BoolType> |
toRealRandomAccessible(Object o)
Attempts to convert the given
Object to a
RealRandomAccessible . |
RealRandomAccessibleRealInterval<BoolType> |
toRealRandomAccessibleRealInterval(Object o)
Attempts to convert the given
Object to a
RealRandomAccessibleRealInterval . |
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
static final String ROI_PROPERTY
default void add(Object roi, Object img)
roi
- ROI (most likely MaskPredicate
) to be attachedimg
- image to attach ROI todefault boolean hasROIs(Object o)
Object
is or has ROIso
- Object
to checkdefault void clear(Dataset img)
MaskPredicate
s associated with the given Dataset
img
- Dataset
whose rois will be clearedMask toMask(Object o)
Object
to a Mask
o
- the Object to be converted. This object should be something like
an ImageJ 1.x Roi, RandomAccessible, etc.Mask
representation of the given object, if possibleMaskInterval toMaskInterval(Object o)
Object
to a MaskInterval
o
- the Object to be converted. This object should be something like
an ImageJ 1.x Roi, RandomAccessibleInterval, etc.MaskInterval
representation of the given object, if
possibleRealMask toRealMask(Object o)
Object
to a RealMask
o
- the Object to be converted. This object should be something like
an ImageJ 1.x Roi, RealRandomAccessible, etc.RealMask
representation of the given object, if possibleRealMaskRealInterval toRealMaskRealInterval(Object o)
Object
to a
RealMaskRealInterval
o
- the Object to be converted. This object should be something like
an ImageJ 1.x Roi, RealRandomAccessibleRealInterval, etc.RealMaskRealInterval
representation of the given object,
if possibleMaskPredicate<?> toMaskPredicate(Object o)
Object
to a MaskPredicate
.o
- the Object to be converted. This object should be something like
an ImageJ 1.x Roi, (Real)RandomAccessible, etc.MaskPredicate
representation of the given Object, if
possibleRandomAccessible<BoolType> toRandomAcessible(Object o)
Object
to a
RandomAccessible<BoolType>
; otherwise, an exception is thrown.o
- the Object to be converted. In general, this should be an ImageJ
1.x Roi or an Imglib2 MaskPredicate.RandomAccessibleInterval<BoolType> toRandomAccessibleInterval(Object o)
Object
to a
RandomAccessibleInterval<BoolType>
; otherwise, an exception is
thrown.o
- the Object to be converted. In general, this should be an ImageJ
1.x Roi or an ImgLib2 MaskPredicate.RealRandomAccessible<BoolType> toRealRandomAccessible(Object o)
Object
to a
RealRandomAccessible
.o
- the Object to be converted. In general, this should be an ImageJ
1.x Roi or an ImgLib2 MaskPredicate.RealRandomAccessibleRealInterval<BoolType> toRealRandomAccessibleRealInterval(Object o)
Object
to a
RealRandomAccessibleRealInterval
.o
- the Object to be converted. In general, this should be an ImageJ
1.x Roi or an ImgLib2 MaskPredicate.default WritableBox closedBox(double[] min, double[] max)
WritableBox
with closed
boundary behavior.min
- the minimum position of the Box in each dimensionmax
- the maximum position of the Box in each dimensionWritableBox
with the given min/maxdefault WritableBox openBox(double[] min, double[] max)
WritableBox
with open
boundary
behavior.min
- the minimum position of the Box in each dimensionmax
- the maximum position of the Box in each dimensionWritableBox
with the given min/maxdefault WritableEllipsoid closedEllipsoid(double[] center, double[] semiAxisLengths)
WritableEllipsoid
with closed
boundary behavior.center
- the position of the ellipsoid's centersemiAxisLengths
- the extension of the ellipsoid in each dimensiondefault WritableEllipsoid openEllipsoid(double[] center, double[] semiAxisLengths)
WritableEllipsoid
with open
boundary behavior.center
- the position of the ellipsoid's centersemiAxisLengths
- the extension of the ellipsoid in each dimensiondefault WritableLine line(RealLocalizable pointOne, RealLocalizable pointTwo)
WritableLine
with the given endpoints.pointOne
- position of the first endpoint of the linepointTwo
- position of the second endpoint of the linedefault WritableLine line(double[] pointOne, double[] pointTwo, boolean copy)
WritableLine
with the given endpoints.pointOne
- position of the first endpoint of the linepointTwo
- position of the second endpoint of the linecopy
- if true create copies are created and stored of the two arrays,
if false arrays are just storeddefault WritablePointMask pointMask(double[] point)
WritablePointMask
at the given location.point
- location of the pointdefault WritablePointMask pointMask(RealLocalizable point)
WritablePointMask
at the given location.point
- location of the pointdefault WritablePolygon2D polygon2D(List<? extends RealLocalizable> vertices)
WritablePolygon2D
with unspecified
boundary behavior.vertices
- a list containing the location of each vertex in 2D spacedefault WritablePolygon2D polygon2D(double[] x, double[] y)
WritablePolygon2D
with unspecified
boundary behavior.x
- the x-coordinates of the verticesy
- the y-coordinates of the verticesdefault WritablePolygon2D closedPolygon2D(List<? extends RealLocalizable> vertices)
WritablePolygon2D
with closed
boundary behavior.vertices
- a list containing the location of each vertex in 2D spacedefault WritablePolygon2D closedPolygon2D(double[] x, double[] y)
WritablePolygon2D
with closed
boundary behavior.x
- the x-coordinates of the verticesy
- the y-coordinates of the verticesdefault WritablePolygon2D openPolygon2D(List<? extends RealLocalizable> vertices)
WritablePolygon2D
with open
boundary behavior.vertices
- a list containing the location of each vertex in 2D spacedefault WritablePolygon2D openPolygon2D(double[] x, double[] y)
WritablePolygon2D
with open
boundary behavior.x
- the x-coordinates of the verticesy
- the y-coordinates of the verticesdefault WritablePolyline polyline(List<? extends RealLocalizable> vertices)
WritablePolyline
containing the given vertices, in the
given order.vertices
- contains the vertices of the polyline in order from start
to enddefault <L extends RealLocalizable> WritableRealPointCollection<L> realPointCollection(HashMap<gnu.trove.list.array.TDoubleArrayList,L> points)
WritableRealPointCollection
containing the given
points.points
- contains the locations of the points in this collectionWritableRealPointCollection
containing the given pointsdefault <L extends RealLocalizable> WritableRealPointCollection<L> realPointCollection(Collection<L> points)
WritableRealPointCollection
containing the given points.points
- contains the locations of the points in this collectionWritableRealPointCollection
containing the given pointsdefault <L extends RealLocalizable> RealPointCollection<L> kDTreeRealPointCollection(KDTree<L> tree)
RealPointCollection
containing the given
points.tree
- a KDTree
containing the location of each point in the
collectionRealPointCollection
containing the given pointsdefault <L extends RealLocalizable> RealPointCollection<L> kDTreeRealPointCollection(Collection<L> points)
RealPointCollection
containing the given
points.points
- contains the location of each point in the collectionRealPointCollection
containing the given pointsdefault <L extends RealLocalizable> WritableRealPointCollection<L> realPointSampleListRealPointCollection(RealPointSampleList<L> points)
WritableRealPointCollection
containing the given points.points
- contains the locations of the points in the collectionWritableRealPointCollection
containing the given pointsdefault <L extends RealLocalizable> WritableRealPointCollection<L> realPointSampleListRealPointCollection(Collection<L> points)
WritableRealPointCollection
containing the given points.points
- contains the locations of the points in the collectionWritableRealPointCollection
containing the given pointsdefault WritableSphere closedSphere(double[] center, double radius)
WritableSphere
with closed
boundary behavior.center
- location of the center of the sphereradius
- radius of the spheredefault WritableSphere openSphere(double[] center, double radius)
WritableSphere
with open
boundary behavior.center
- location of the center of the sphereradius
- radius of the spheredefault WritableSuperEllipsoid closedSuperEllipsoid(double[] center, double[] semiAxisLengths, double exponent)
WritableSuperEllipsoid
with closed
boundary behavior.center
- location of the center of the super-ellipsoidsemiAxisLengths
- extension of the super-ellipsoid in each dimensionsexponent
- exponent of the super-ellipsoiddefault WritableSuperEllipsoid openSuperEllipsoid(double[] center, double[] semiAxisLengths, double exponent)
WritableSuperEllipsoid
with open
boundary behavior.center
- location of the center of the super-ellipsoidsemiAxisLengths
- extension of the super-ellipsoid in each dimensionsexponent
- exponent of the super-ellipsoidCopyright © 2014–2022 ImageJ. All rights reserved.