public abstract class ROI5D extends ROI
ROI.ROIGroupId, ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
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 |
---|
ROI5D() |
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. |
double |
computeNumberOfContourPoints()
Compute and returns the number of point (pixel) composing the ROI contour.
|
double |
computeNumberOfPoints()
Compute and returns the number of point (pixel) contained in the ROI.
|
boolean |
contains(ROI roi)
Tests if the
ROI entirely contains the specified ROI . |
BooleanMask5D |
getBooleanMask(boolean inclusive)
Get the
BooleanMask5D object representing 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. |
BooleanMask3D |
getBooleanMask3D(int t,
int c,
boolean inclusive)
Returns the
BooleanMask3D object representing the XYZ volume content at specified T,
C position. |
BooleanMask3D |
getBooleanMask3D(int z,
int t,
int c,
boolean inclusive)
Returns the
BooleanMask3D object representing the XYZ volume content at specified Z,
T, C position. |
BooleanMask4D |
getBooleanMask4D(int c,
boolean inclusive)
Get the
BooleanMask4D object representing the roi for specified C position. |
BooleanMask4D |
getBooleanMask4D(int z,
int t,
int c,
boolean inclusive)
Returns the
BooleanMask4D object representing the XYZT space content at specified Z
and C position. |
BooleanMask5D |
getBooleanMask5D(int z,
int t,
int c,
boolean inclusive)
Returns the
BooleanMask5D object representing the XYZTC space content at specified Z,
T, C position. |
Rectangle5D.Integer |
getBounds()
Returns an integer
Rectangle5D that completely encloses the ROI . |
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 |
Point5D.Integer |
getPosition()
Returns the integer ROI position which normally correspond to the minimum point of the
ROI bounds.
|
static java.util.ArrayList<ROI5D> |
getROI5DList(java.util.ArrayList<ROI> rois)
Deprecated.
Use
getROI5DList(List) instead. |
static java.util.List<ROI5D> |
getROI5DList(java.util.List<ROI> rois)
Return all 5D ROI from the ROI list
|
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.
|
void |
setBounds5D(Rectangle5D bounds)
Set the
ROI bounds. |
void |
setPosition5D(Point5D position)
Set the
ROI position. |
void |
translate(double dx,
double dy,
double dz,
double dt,
double dc)
Translate the ROI position by the specified delta X/Y/Z/T.
|
add, addListener, attachTo, beginUpdate, canvasToImageDeltaX, canvasToImageDeltaY, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, computeBounds5D, contains, contains, contains, contains, copyFrom, create, create, create, create, createFromXML, delete, delete, detachFrom, detachFromAll, detachFromAll, endUpdate, exclusiveAdd, focusChanged, getAdjustedStroke, getAdjustedStroke, getBooleanMask2D, 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, getPerimeter, getPosition5D, getProperties, getProperty, getPropertyValue, getROICount, getROIList, getROIList, getROIList, getROIsFromXML, getSelectedColor, getSequences, getShowName, getSimpleClassName, getStroke, getSubROI, getSubtraction, getUnion, getVolume, hasSelectedPoint, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersect, intersects, intersects, isAttached, isCreating, isDefaultName, isEditable, isEmpty, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadFromXML, loadROIsFromXML, merge, mergeWith, nameChanged, onChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, roiChanged, saveROIsToXML, saveToXML, 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 ROI5D()
@Deprecated public static java.util.ArrayList<ROI5D> getROI5DList(java.util.ArrayList<ROI> rois)
getROI5DList(List)
instead.public static java.util.List<ROI5D> getROI5DList(java.util.List<ROI> rois)
public java.lang.String getDefaultName()
getDefaultName
in class ROI
public final int getDimension()
ROI
getDimension
in class ROI
public boolean isActiveFor(IcyCanvas canvas)
ROI
isActiveFor
in class ROI
public Rectangle5D.Integer getBounds()
Rectangle5D
that completely encloses the ROI
. Note
that there is no guarantee that the returned Rectangle5D
is the smallest
bounding box that encloses the ROI
, only that the ROI
lies entirely
within the indicated Rectangle5D
. The returned Rectangle5D
might
also fail to completely enclose the ROI
if the ROI
overflows the
limited range of the integer data type. The getBounds5D
method generally returns
a tighter bounding box due to its greater flexibility in representation.Rectangle5D
that completely encloses the ROI
.public Point5D.Integer getPosition()
getBounds()
public boolean canSetBounds()
ROI
true
if this ROI accepts bounds change through the ROI.setBounds5D(Rectangle5D)
method.canSetBounds
in class ROI
public 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
public 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.public void translate(double dx, double dy, double dz, double dt, double dc)
canTranslate()
first.dx
- translation value to apply on X dimensiondy
- translation value to apply on Y dimensiondz
- translation value to apply on Z dimensiondt
- translation value to apply on T dimensiondc
- translation value to apply on C dimensioncanTranslate()
,
setPosition5D(Point5D)
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(ROI roi)
ROI
ROI
intersects the specified ROI
.intersects
in class ROI
true
if ROI
intersect, false
otherwise.public 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 BooleanMask3D getBooleanMask3D(int z, int t, int c, boolean inclusive)
BooleanMask3D
object representing the XYZ volume content at specified Z,
T, C position.z
- Z position we want to retrieve the boolean mask or -1 to retrieve the whole Z
dimensiont
- 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 BooleanMask3D getBooleanMask3D(int t, int c, boolean inclusive)
BooleanMask3D
object representing the XYZ volume content at specified T,
C position.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.public BooleanMask4D getBooleanMask4D(int z, int t, int c, boolean inclusive)
BooleanMask4D
object representing the XYZT space content at specified Z
and C position.z
- Z position we want to retrieve the boolean mask or -1 to retrieve the whole Z
dimensiont
- T position we want to retrieve the boolean mask or -1 to retrieve the whole T
dimensionc
- C position we want to retrieve the boolean mask.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.public BooleanMask4D getBooleanMask4D(int c, boolean inclusive)
BooleanMask4D
object representing the roi for specified C position.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.public BooleanMask5D getBooleanMask5D(int z, int t, int c, boolean inclusive)
BooleanMask5D
object representing the XYZTC space content at specified Z,
T, C position.z
- Z position we want to retrieve the boolean mask or -1 to retrieve the whole Z
dimensiont
- T position we want to retrieve the boolean mask or -1 to retrieve the whole T
dimensionc
- C position we want to retrieve the boolean mask or -1 to retrieve the whole C
dimensioninclusive
- If true then all partially contained (intersected) pixels are included in the mask.public BooleanMask5D getBooleanMask(boolean inclusive)
BooleanMask5D
object representing the roi.inclusive
- If true then all partially contained (intersected) pixels are included in the mask.public double computeNumberOfContourPoints()
ROI
computeNumberOfContourPoints
in class ROI
public double computeNumberOfPoints()
ROI
computeNumberOfPoints
in class ROI