public abstract class ROI2D extends ROI
Modifier and Type | Class and Description |
---|---|
class |
ROI2D.ROI2DPainter |
ROI.ROIGroupId, ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_C |
static java.lang.String |
ID_T |
static java.lang.String |
ID_Z |
DEFAULT_COLOR, DEFAULT_NORMAL_COLOR, DEFAULT_OPACITY, DEFAULT_STROKE, defaultColor, defaultOpacity, defaultShowName, defaultStroke, ID_CLASSNAME, ID_COLOR, ID_GROUPID, ID_ID, ID_NAME, ID_OPACITY, ID_PROPERTIES, ID_READONLY, ID_ROI, ID_SELECTED, ID_SHOWNAME, ID_STROKE, idComparator, nameComparator, PROPERTY_COLOR, PROPERTY_CREATING, PROPERTY_GROUPID, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_OPACITY, PROPERTY_READONLY, PROPERTY_SHOWNAME, PROPERTY_STROKE, ROI_CHANGED_ALL, ROI_CHANGED_POSITION
Constructor and Description |
---|
ROI2D() |
Modifier and Type | Method and Description |
---|---|
boolean |
canSetBounds()
Returns
true if this ROI accepts bounds change through the ROI.setBounds5D(Rectangle5D) method. |
boolean |
canSetPosition()
Returns
true if this ROI accepts position change through the ROI.setPosition5D(Point5D) method. |
boolean |
canTranslate()
Returns
true if the ROI support translate operation. |
abstract java.awt.geom.Rectangle2D |
computeBounds2D()
Calculate and returns the 2D bounding box of the
ROI . |
Rectangle5D |
computeBounds5D()
Calculate and returns the bounding box of the
ROI . |
double |
computeNumberOfContourPoints()
Compute and returns the number of point (pixel) composing the ROI contour.
|
double |
computeNumberOfPoints()
Generic implementation for ROI2D using the BooleanMask object so the result is just an
approximation.
|
double |
computePerimeter(Sequence sequence)
Deprecated.
Perimeter computation cannot be cached so directly use #getLength(Sequence) instead.
|
abstract boolean |
contains(double x,
double y)
Tests if the specified coordinates are inside the
ROI . |
abstract boolean |
contains(double x,
double y,
double w,
double h)
Tests if the
ROI entirely contains the specified rectangular area. |
boolean |
contains(double x,
double y,
double z,
double t,
double c)
Tests if a specified 5D point is inside the ROI.
|
boolean |
contains(double x,
double y,
double z,
double t,
double c,
double sizeX,
double sizeY,
double sizeZ,
double sizeT,
double sizeC)
Tests if the
ROI entirely contains the specified 5D rectangular area. |
boolean |
contains(java.awt.geom.Point2D p)
Tests if a specified
Point2D is inside the ROI. |
boolean |
contains(java.awt.geom.Rectangle2D r)
Tests if the interior of the
ROI entirely contains the specified Rectangle2D . |
boolean |
contains(ROI roi)
Tests if the
ROI entirely contains the specified ROI . |
double |
getArea()
Deprecated.
Use
ROI.getNumberOfPoints() instead. |
BooleanMask2D |
getAsBooleanMask()
Deprecated.
Use
getBooleanMask(boolean) instead. |
BooleanMask2D |
getAsBooleanMask(boolean inclusive)
Deprecated.
Use
getBooleanMask(boolean) instead. |
boolean[] |
getAsBooleanMask(int x,
int y,
int w,
int h)
Deprecated.
Use
getBooleanMask(boolean) instead. |
boolean[] |
getAsBooleanMask(int x,
int y,
int w,
int h,
boolean inclusive)
Deprecated.
Use
getBooleanMask(int, int, int, int, boolean) instead. |
boolean[] |
getAsBooleanMask(java.awt.Rectangle rect)
Deprecated.
Use
getBooleanMask(boolean) instead. |
boolean[] |
getAsBooleanMask(java.awt.Rectangle rect,
boolean inclusive)
Deprecated.
Use
getBooleanMask(Rectangle, boolean) instead. |
BooleanMask2D |
getBooleanMask()
Deprecated.
Use
getBooleanMask(boolean) instead. |
BooleanMask2D |
getBooleanMask(boolean inclusive)
Get the
BooleanMask2D object representing the roi. |
boolean[] |
getBooleanMask(int x,
int y,
int width,
int height)
Deprecated.
Use
getBooleanMask(int, int, int, int, boolean) instead |
boolean[] |
getBooleanMask(int x,
int y,
int width,
int height,
boolean inclusive)
Get the boolean bitmap mask for the specified rectangular area of the roi.
|
boolean[] |
getBooleanMask(java.awt.Rectangle rect)
Deprecated.
Use
getBooleanMask(Rectangle, boolean) instead |
boolean[] |
getBooleanMask(java.awt.Rectangle rect,
boolean inclusive)
Get the boolean bitmap mask for the specified rectangular area of the roi.
|
BooleanMask2D |
getBooleanMask2D(int z,
int t,
int c,
boolean inclusive)
Returns the
BooleanMask2D object representing the XY plan content at specified Z, T,
C position. |
boolean[] |
getBooleanMask2D(int x,
int y,
int width,
int height,
int z,
int t,
int c,
boolean inclusive)
Returns the boolean array mask for the specified rectangular region at specified C, Z, T
position.
|
java.awt.Rectangle |
getBounds()
Returns an integer
Rectangle that completely encloses the ROI . |
java.awt.geom.Rectangle2D |
getBounds2D()
Returns a high precision and more accurate bounding box of the
ROI than the getBounds
method. |
int |
getC()
Returns the C position.
|
java.lang.String |
getDefaultName() |
int |
getDimension()
Returns the number of dimension of the ROI:
2 for ROI2D 3 for ROI3D 4 for ROI4D 5 for ROI5D |
double |
getPerimeter()
Deprecated.
Use
ROI.getNumberOfContourPoints() instead. |
double |
getPerimeter(Sequence sequence)
Deprecated.
Use
ROI.getLength(Sequence) instead |
java.awt.Point |
getPosition()
Returns the upper left point of the ROI bounds.
|
java.awt.geom.Point2D |
getPosition2D()
Returns the ROI position which normally correspond to the minimum point of the ROI
bounds:
new Point2D.Double(getBounds2D().getX(), getBounds2D().getY()) |
static java.util.ArrayList<ROI2D> |
getROI2DList(java.util.ArrayList<ROI> rois)
Deprecated.
Use
getROI2DList(List) instead. |
static java.util.List<ROI2D> |
getROI2DList(java.util.List<ROI> rois)
Return ROI2D of ROI list.
|
static ROI2D[] |
getROI2DList(ROI[] rois)
Deprecated.
Use
getROI2DList(List) instead. |
ROI |
getSubROI(int z,
int t,
int c)
Returns a sub part of the ROI.
|
int |
getT()
Returns the T position.
|
int |
getZ()
Returns the Z position.
|
abstract boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of the
ROI intersects the interior of a specified
rectangular area. |
boolean |
intersects(double x,
double y,
double z,
double t,
double c,
double sizeX,
double sizeY,
double sizeZ,
double sizeT,
double sizeC)
Tests if the interior of the
ROI intersects the interior of a specified
rectangular area. |
boolean |
intersects(java.awt.geom.Rectangle2D r)
Tests if the interior of the
ROI intersects the interior of a specified Rectangle2D . |
boolean |
intersects(ROI roi)
Tests if the current
ROI intersects the specified ROI . |
boolean |
isActiveFor(IcyCanvas canvas)
Return true if the ROI is active for the specified canvas.
|
boolean |
isActiveFor(int z,
int t,
int c)
Return true if the ROI is active for the specified Z, T, C coordinates
|
boolean |
isOver(IcyCanvas canvas,
double x,
double y)
Deprecated.
Use
isOverEdge(IcyCanvas, double, double) instead. |
boolean |
isOver(IcyCanvas canvas,
java.awt.geom.Point2D p)
Deprecated.
Use
isOverEdge(IcyCanvas, Point2D) instead. |
abstract boolean |
isOverEdge(IcyCanvas canvas,
double x,
double y)
Returns true if specified point coordinates overlap the ROI edge.
|
boolean |
isOverEdge(IcyCanvas canvas,
double x,
double y,
double z,
double t,
double c)
Returns true if specified point coordinates overlap the ROI edge.
|
boolean |
isOverEdge(IcyCanvas canvas,
java.awt.geom.Point2D p)
Returns true if specified point coordinates overlap the ROI edge.
|
boolean |
isOverEdge(IcyCanvas canvas,
Point5D p)
Returns true if specified point coordinates overlap the ROI edge.
|
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
static ROI2D |
merge(ROI2D[] rois,
ShapeUtil.ShapeOperation operation)
Deprecated.
|
boolean |
saveToXML(org.w3c.dom.Node node)
SAVE
|
void |
setBounds2D(java.awt.geom.Rectangle2D bounds)
Set the
ROI 2D bounds. |
void |
setBounds5D(Rectangle5D bounds)
Set the
ROI bounds. |
void |
setC(int value)
Sets C position of this 2D ROI.
|
void |
setPosition(java.awt.geom.Point2D position)
Deprecated.
Use
setPosition2D(Point2D) instead. |
void |
setPosition2D(java.awt.geom.Point2D position)
Set the
ROI 2D position. |
void |
setPosition5D(Point5D position)
Set the
ROI position. |
void |
setT(int value)
Sets T position of this 3D ROI.
|
void |
setZ(int value)
Sets Z position of this 2D ROI.
|
static ROI2D |
substract(ROI2D roi1,
ROI2D roi2)
Deprecated.
Use
ROI.getSubtraction(ROI) instead. |
static ROI2D |
subtract(ROI2D roi1,
ROI2D roi2)
Deprecated.
Use
ROI.getSubtraction(ROI) instead. |
void |
translate(double dx,
double dy)
Translate the ROI position by the specified delta X/Y.
|
add, addListener, attachTo, beginUpdate, canvasToImageDeltaX, canvasToImageDeltaY, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, contains, contains, copyFrom, create, create, create, create, createFromXML, delete, delete, detachFrom, detachFromAll, detachFromAll, endUpdate, exclusiveAdd, focusChanged, getAdjustedStroke, getAdjustedStroke, getBooleanMask2D, getBounds5D, getClassName, getColor, getCopy, getDefaultColor, getDefaultOpacity, getDefaultShowName, getDefaultStroke, getDisplayColor, getExclusiveUnion, getFirstSequence, getFocusedColor, getGroupId, getIcon, getId, getIntersection, getLength, getName, getNameSuffix, getNumberOfContourPoints, getNumberOfPoints, getOpacity, getOverlay, getPainter, getPosition5D, getProperties, getProperty, getPropertyValue, getROICount, getROIList, getROIList, getROIList, getROIsFromXML, getSelectedColor, getSequences, getShowName, getSimpleClassName, getStroke, getSubtraction, getUnion, getVolume, hasSelectedPoint, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersect, intersects, isAttached, isCreating, isDefaultName, isEditable, isEmpty, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, mergeWith, nameChanged, onChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, roiChanged, saveROIsToXML, selectionChanged, setColor, setCreating, setDefaultColor, setDefaultOpacity, setDefaultShowName, setDefaultStroke, setEditable, setFocused, setGroupId, setIcon, setMousePos, setName, setOpacity, setProperty, setPropertyValue, setReadOnly, setROIsFromXML, setSelected, setSelected, setSelectedColor, setShowName, setStroke, subtract, unselectAllPoints
public static final java.lang.String ID_Z
public static final java.lang.String ID_T
public static final java.lang.String ID_C
public ROI2D()
public static java.util.List<ROI2D> getROI2DList(java.util.List<ROI> rois)
@Deprecated public static java.util.ArrayList<ROI2D> getROI2DList(java.util.ArrayList<ROI> rois)
getROI2DList(List)
instead.@Deprecated public static ROI2D[] getROI2DList(ROI[] rois)
getROI2DList(List)
instead.@Deprecated public static ROI2D merge(ROI2D[] rois, ShapeUtil.ShapeOperation operation)
ROIUtil.merge(List, icy.util.ShapeUtil.BooleanOperator)
instead.@Deprecated public static ROI2D substract(ROI2D roi1, ROI2D roi2)
ROI.getSubtraction(ROI)
instead.@Deprecated public static ROI2D subtract(ROI2D roi1, ROI2D roi2)
ROI.getSubtraction(ROI)
instead.public java.lang.String getDefaultName()
getDefaultName
in class ROI
public final int getDimension()
ROI
getDimension
in class ROI
public int getZ()
-1
is a special value meaning the ROI is set on all Z slices (infinite Z
dimension).public void setZ(int value)
-1
is a special value meaning
the ROI is set on all Z slices (infinite Z dimension).public int getT()
-1
is a special value meaning the ROI is set on all T frames (infinite T
dimension).public void setT(int value)
-1
is a special value meaning
the ROI is set on all T frames (infinite T dimension).public int getC()
-1
is a special value meaning the ROI is set on all C channels (infinite C
dimension).public void setC(int value)
-1
is a special value meaning
the ROI is set on all C channels (infinite C dimension).public boolean isActiveFor(IcyCanvas canvas)
ROI
isActiveFor
in class ROI
public boolean isActiveFor(int z, int t, int c)
@Deprecated public boolean isOver(IcyCanvas canvas, java.awt.geom.Point2D p)
isOverEdge(IcyCanvas, Point2D)
instead.@Deprecated public boolean isOver(IcyCanvas canvas, double x, double y)
isOverEdge(IcyCanvas, double, double)
instead.public boolean isOverEdge(IcyCanvas canvas, java.awt.geom.Point2D p)
contains(Point2D)
to test for content overlap instead.public abstract boolean isOverEdge(IcyCanvas canvas, double x, double y)
contains(double, double)
to test for content overlap instead.public boolean isOverEdge(IcyCanvas canvas, Point5D p)
ROI.contains(Point5D)
to test for content overlap instead.public boolean isOverEdge(IcyCanvas canvas, double x, double y, double z, double t, double c)
contains(double, double, double, double, double)
to test for content overlap
instead.public boolean contains(java.awt.geom.Point2D p)
Point2D
is inside the ROI.p
- the specified Point2D
to be testedtrue
if the specified Point2D
is inside the boundary of the ROI
;
false
otherwise.public boolean contains(java.awt.geom.Rectangle2D r)
ROI
entirely contains the specified Rectangle2D
. The
ROI.contains()
method allows a implementation to
conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the
Rectangle2D
are prohibitively expensive.
false
even though the ROI
contains the
Rectangle2D
.r
- The specified Rectangle2D
true
if the interior of the ROI
entirely contains the Rectangle2D
;
false
otherwise or, if the ROI
contains the Rectangle2D
and the
intersects
method returns true
and the containment calculations would be too
expensive to perform.contains(double, double, double, double)
public abstract boolean contains(double x, double y)
ROI
.x
- the specified X coordinate to be testedy
- the specified Y coordinate to be testedtrue
if the specified coordinates are inside the ROI
boundary;
false
otherwise.public abstract boolean contains(double x, double y, double w, double h)
ROI
entirely contains the specified rectangular area. All
coordinates that lie inside the rectangular area must lie within the ROI
for the
entire rectangular area to be considered contained within the ROI
.
The ROI.contains()
method allows a ROI
implementation to conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the rectangular area are
prohibitively expensive.
ROIs
this method might return false
even though the ROI
contains
the rectangular area.x
- the X coordinate of the upper-left corner of the specified rectangular areay
- the Y coordinate of the upper-left corner of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areatrue
if the interior of the ROI
entirely contains the
specified rectangular area; false
otherwise or, if the ROI
contains the
rectangular area and the intersects
method returns true
and the containment
calculations would be too expensive to perform.public boolean contains(double x, double y, double z, double t, double c)
ROI
public boolean contains(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
ROI
ROI
entirely contains the specified 5D rectangular area. All
coordinates that lie inside the rectangular area must lie within the ROI
for the
entire rectangular area to be considered contained within the ROI
.
The ROI.contains()
method allows a ROI
implementation to conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the rectangular area are
prohibitively expensive.
ROIs
this method might return false
even though the ROI
contains
the rectangular area.contains
in class ROI
x
- the X coordinate of the start corner of the specified rectangular areay
- the Y coordinate of the start corner of the specified rectangular areaz
- the Z coordinate of the start corner of the specified rectangular areat
- the T coordinate of the start corner of the specified rectangular areac
- the C coordinate of the start corner of the specified rectangular areasizeX
- the X size of the specified rectangular areasizeY
- the Y size of the specified rectangular areasizeZ
- the Z size of the specified rectangular areasizeT
- the T size of the specified rectangular areasizeC
- the C size of the specified rectangular areatrue
if the interior of the ROI
entirely contains the
specified rectangular area; false
otherwise or, if the ROI
contains the
rectangular area and the intersects
method returns true
and
the containment
calculations would be too expensive to perform.public boolean contains(ROI roi)
ROI
ROI
entirely contains the specified ROI
.
WARNING: this method may be "pixel accurate" only depending the internal implementation.public boolean intersects(java.awt.geom.Rectangle2D r)
ROI
intersects the interior of a specified Rectangle2D
.
The ROI.intersects()
method allows a ROI
implementation to conservatively return true
when:
Rectangle2D
and the ROI
intersect, but
ROIs
this method might return true
even though the Rectangle2D
does not intersect the ROI
.r
- the specified Rectangle2D
true
if the interior of the ROI
and the interior of the
specified Rectangle2D
intersect, or are both highly likely to intersect
and intersection calculations would be too expensive to perform; false
otherwise.intersects(double, double, double, double)
public abstract boolean intersects(double x, double y, double w, double h)
ROI
intersects the interior of a specified
rectangular area. The rectangular area is considered to intersect the ROI
if any
point is contained in both the interior of the ROI
and the specified rectangular
area.
The ROI.intersects()
method allows a ROI
implementation to conservatively return true
when:
ROI
intersect, but
ROIs
this method might return true
even though the rectangular area does
not intersect the ROI
.x
- the X coordinate of the upper-left corner of the specified rectangular areay
- the Y coordinate of the upper-left corner of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areatrue
if the interior of the ROI
and the interior of the
rectangular area intersect, or are both highly likely to intersect and intersection
calculations would be too expensive to perform; false
otherwise.public boolean intersects(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
ROI
ROI
intersects the interior of a specified
rectangular area. The rectangular area is considered to intersect the ROI
if any
point is contained in both the interior of the ROI
and the specified rectangular
area.
The ROI.intersects()
method allows a ROI
implementation to conservatively return true
when:
ROI
intersect, but
ROIs
this method might return true
even though the rectangular area does
not intersect the ROI
.intersects
in class ROI
true
if the interior of the ROI
and the interior of the
rectangular area intersect, or are both highly likely to intersect and intersection
calculations would be too expensive to perform; false
otherwise.public boolean intersects(ROI roi)
ROI
ROI
intersects the specified ROI
.intersects
in class ROI
true
if ROI
intersect, false
otherwise.public abstract java.awt.geom.Rectangle2D computeBounds2D()
ROI
.getBounds2D()
which should try to cache the result as the
bounding box calculation can take some computation time for complex ROI.public Rectangle5D computeBounds5D()
ROI
ROI
.ROI.getBounds5D()
which should try to cache the result as the
bounding box calculation can take some computation time for complex ROI.computeBounds5D
in class ROI
public java.awt.Rectangle getBounds()
Rectangle
that completely encloses the ROI
. Note that
there is no guarantee that the returned Rectangle
is the smallest bounding box
that encloses the ROI
, only that the ROI
lies entirely within the
indicated Rectangle
. The returned Rectangle
might also fail to
completely enclose the ROI
if the ROI
overflows the limited range
of the integer data type. The getBounds2D
method generally returns a tighter
bounding box due to its greater flexibility in representation.Rectangle
that completely encloses the ROI
.public java.awt.geom.Rectangle2D getBounds2D()
ROI
than the getBounds
method. Note that there is no guarantee that the returned Rectangle2D
is the smallest bounding box that
encloses the ROI
, only
that the ROI
lies entirely within the indicated Rectangle2D
. The
bounding box returned by this method is usually tighter than that returned by the getBounds
method
and never fails due to overflow problems since the return value
can be an instance of the Rectangle2D
that uses double precision values to store
the dimensions.Rectangle2D
that is a high-precision bounding box of the ROI
.public java.awt.Point getPosition()
getBounds().getLocation()
getBounds()
public java.awt.geom.Point2D getPosition2D()
new Point2D.Double(getBounds2D().getX(), getBounds2D().getY())
getBounds2D()
public boolean canSetBounds()
ROI
true
if this ROI accepts bounds change through the ROI.setBounds5D(Rectangle5D)
method.canSetBounds
in class ROI
public void setBounds2D(java.awt.geom.Rectangle2D bounds)
ROI
2D bounds.canSetBounds()
first to test if
the operation is supported.bounds
- new ROI 2D boundspublic void setBounds5D(Rectangle5D bounds)
ROI
ROI
bounds.ROI.canSetBounds()
first to test if
the operation is supported.setBounds5D
in class ROI
bounds
- new ROI boundspublic boolean canSetPosition()
ROI
true
if this ROI accepts position change through the ROI.setPosition5D(Point5D)
method.canSetPosition
in class ROI
@Deprecated public void setPosition(java.awt.geom.Point2D position)
setPosition2D(Point2D)
instead.public void setPosition2D(java.awt.geom.Point2D position)
ROI
2D position.canSetPosition()
first to test
if the operation is supported.position
- new ROI 2D positionpublic void setPosition5D(Point5D position)
ROI
ROI
position.ROI.canSetPosition()
first to test
if the operation is supported.setPosition5D
in class ROI
position
- new ROI positionpublic boolean canTranslate()
true
if the ROI support translate operation.translate(double, double)
public void translate(double dx, double dy)
canTranslate()
first.dx
- translation value to apply on X dimensiondy
- translation value to apply on Y dimensioncanTranslate()
,
setPosition2D(Point2D)
public boolean[] getBooleanMask2D(int x, int y, int width, int height, int z, int t, int c, boolean inclusive)
ROI
  result[((y1 - y) * width) + (x1 - x)] = true
  result[((y1 - y) * width) + (x1 - x)] = false
getBooleanMask2D
in class ROI
x
- the X coordinate of the upper-left corner of the specified rectangular regiony
- the Y coordinate of the upper-left corner of the specified rectangular regionwidth
- the width of the specified rectangular regionheight
- the height of the specified rectangular regionz
- Z position we want to retrieve the boolean maskt
- T position we want to retrieve the boolean maskc
- C position we want to retrieve the boolean maskinclusive
- If true then all partially contained (intersected) pixels are included in the mask.public boolean[] getBooleanMask(int x, int y, int width, int height, boolean inclusive)
x
- the X coordinate of the upper-left corner of the specified rectangular areay
- the Y coordinate of the upper-left corner of the specified rectangular areawidth
- the width of the specified rectangular areaheight
- the height of the specified rectangular areainclusive
- If true then all partially contained (intersected) pixels are included in the mask.@Deprecated public boolean[] getBooleanMask(int x, int y, int width, int height)
getBooleanMask(int, int, int, int, boolean)
insteadpublic boolean[] getBooleanMask(java.awt.Rectangle rect, boolean inclusive)
rect
- area we want to retrieve the boolean maskinclusive
- If true then all partially contained (intersected) pixels are included in the mask.@Deprecated public boolean[] getBooleanMask(java.awt.Rectangle rect)
getBooleanMask(Rectangle, boolean)
insteadpublic BooleanMask2D getBooleanMask2D(int z, int t, int c, boolean inclusive)
ROI
BooleanMask2D
object representing the XY plan content at specified Z, T,
C position.  mask[(y - bounds.y) * bounds.width) + (x - bounds.x)] = true
  mask[(y - bounds.y) * bounds.width) + (x - bounds.x)] = false
getBooleanMask2D
in class ROI
z
- Z position we want to retrieve the boolean mask.t
- T position we want to retrieve the boolean mask.c
- C position we want to retrieve the boolean mask.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.public BooleanMask2D getBooleanMask(boolean inclusive)
BooleanMask2D
object representing the roi.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.@Deprecated public BooleanMask2D getBooleanMask()
getBooleanMask(boolean)
instead.@Deprecated public BooleanMask2D getAsBooleanMask(boolean inclusive)
getBooleanMask(boolean)
instead.@Deprecated public boolean[] getAsBooleanMask(java.awt.Rectangle rect, boolean inclusive)
getBooleanMask(Rectangle, boolean)
instead.@Deprecated public boolean[] getAsBooleanMask(int x, int y, int w, int h, boolean inclusive)
getBooleanMask(int, int, int, int, boolean)
instead.@Deprecated public BooleanMask2D getAsBooleanMask()
getBooleanMask(boolean)
instead.@Deprecated public boolean[] getAsBooleanMask(java.awt.Rectangle rect)
getBooleanMask(boolean)
instead.@Deprecated public boolean[] getAsBooleanMask(int x, int y, int w, int h)
getBooleanMask(boolean)
instead.public double computeNumberOfContourPoints()
ROI
computeNumberOfContourPoints
in class ROI
public double computeNumberOfPoints()
computeNumberOfPoints
in class ROI
@Deprecated public double computePerimeter(Sequence sequence)
@Deprecated public double getPerimeter(Sequence sequence) throws java.lang.UnsupportedOperationException
ROI.getLength(Sequence)
insteadjava.lang.UnsupportedOperationException
@Deprecated public double getPerimeter()
ROI.getNumberOfContourPoints()
instead.getPerimeter
in class ROI
ROI.getNumberOfContourPoints()
,
computeNumberOfContourPoints()
@Deprecated public double getArea()
ROI.getNumberOfPoints()
instead.public ROI getSubROI(int z, int t, int c)
null
can be returned if result is empty.getSubROI
in class ROI
z
- the specific Z position (slice) we want to retrieve (-1
to retrieve the
whole ROI Z dimension)t
- the specific T position (frame) we want to retrieve (-1
to retrieve the
whole ROI T dimension)c
- the specific C position (channel) we want to retrieve (-1
to retrieve the
whole ROI C dimension)public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
loadFromXML
in class ROI
public boolean saveToXML(org.w3c.dom.Node node)
XMLPersistent
saveToXML
in interface XMLPersistent
saveToXML
in class ROI