public class ROI3DShape extends ROI3D implements Shape3D
Modifier and Type | Class and Description |
---|---|
class |
ROI3DShape.ROI3DShapePainter |
ROI3D.ROI3DPainter
ROI.ROIGroupId, ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_POINT |
static java.lang.String |
ID_POINTS |
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 |
---|
ROI3DShape(Shape3D shape) |
Modifier and Type | Method and Description |
---|---|
Anchor3D |
addNewPoint(Point3D pos,
boolean insert)
Add a new point to the Polyline 3D ROI.
|
void |
addPoint(Anchor3D pt,
int index)
Internal use only, use
addNewPoint(Point3D, boolean) instead. |
boolean |
canAddPoint()
Return true if this ROI support adding new point
|
boolean |
canRemovePoint()
Return true if this ROI support removing point
|
boolean |
canTranslate()
Returns
true if the ROI support translate operation. |
Rectangle3D |
computeBounds3D()
Calculate and returns the 3D bounding box of the
ROI . |
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.
|
double |
computeSurfaceArea(Sequence sequence)
Compute the surface area in um2 given the pixel size informations from the specified Sequence.
|
boolean |
contains(double x,
double y,
double z)
Tests if the specified coordinates are inside the
ROI . |
boolean |
contains(double x,
double y,
double z,
double sizeX,
double sizeY,
double sizeZ)
Tests if the
ROI entirely contains the specified 3D rectangular area. |
boolean |
contains(Point3D p)
Tests if a specified
Point3D is inside the ROI. |
boolean |
contains(Rectangle3D r)
Tests if the interior of the
ROI entirely contains the specified Rectangle3D . |
void |
controlPointOverlayChanged(OverlayEvent event)
Called when anchor overlay changed
|
void |
controlPointPositionChanged(Anchor3D source)
Called when anchor position changed
|
java.util.List<Anchor3D> |
getControlPoints()
Return the list of control points for this ROI.
|
java.lang.String |
getDefaultName() |
double |
getLength(Sequence sequence)
Computes and returns the length/perimeter of the ROI in um given the pixel size informations from the specified
Sequence.
|
java.util.List<Point3D> |
getPoints()
Return the list of position for all control points of the ROI.
|
Shape3D |
getShape() |
boolean |
hasSelectedPoint()
Returns true if the ROI has a (control) point which is currently focused/selected
|
boolean |
intersects(double x,
double y,
double z,
double sizeX,
double sizeY,
double sizeZ)
Tests if the interior of the
ROI intersects the interior of a specified
3D rectangular area. |
boolean |
intersects(Rectangle3D r)
Tests if the interior of the
ROI intersects the interior of a specified Rectangle3D . |
boolean |
isOverEdge(IcyCanvas canvas,
double x,
double y,
double z)
Returns true if specified point coordinates overlap the ROI edge.
|
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
void |
onChanged(CollapsibleEvent object)
roi changed
|
boolean |
removePoint(Anchor3D pt)
This method give you lower level access on point remove operation but can be unsafe.
|
boolean |
removeSelectedPoint(IcyCanvas canvas)
Remove the current selected point.
|
void |
translate(double dx,
double dy,
double dz)
Translate the ROI position by the specified delta X/Y/Z.
|
void |
unselectAllPoints()
Remove focus/selected state on all (control) points.
|
canSetBounds, canSetPosition, computeBounds5D, contains, contains, contains, getBooleanMask, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask3D, getBounds, getBounds3D, getC, getDimension, getPosition, getPosition3D, getROI3DList, getROI3DList, getSurfaceArea, getSurfaceArea, getT, getVolume, intersects, intersects, isActiveFor, isActiveFor, isOverEdge, isOverEdge, isOverEdge, saveToXML, setBounds3D, setBounds5D, setC, setPosition3D, setPosition5D, setT
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, 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, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersect, intersects, isAttached, isCreating, isDefaultName, isEditable, isEmpty, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, mergeWith, nameChanged, 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
public static final java.lang.String ID_POINTS
public static final java.lang.String ID_POINT
public ROI3DShape(Shape3D shape)
public java.lang.String getDefaultName()
getDefaultName
in class ROI3D
public boolean canAddPoint()
public boolean canRemovePoint()
public void addPoint(Anchor3D pt, int index)
addNewPoint(Point3D, boolean)
instead.public Anchor3D addNewPoint(Point3D pos, boolean insert)
pos
- position of the new pointinsert
- if set to true
the new point will be inserted between the 2 closest
points (in pixels distance) else the new point is inserted at the end of the point
listpublic boolean removePoint(Anchor3D pt)
removeSelectedPoint(IcyCanvas)
when possible.public boolean removeSelectedPoint(IcyCanvas canvas)
public boolean hasSelectedPoint()
ROI
hasSelectedPoint
in class ROI
public void unselectAllPoints()
ROI
unselectAllPoints
in class ROI
public double getLength(Sequence sequence)
ROI
getLength
in class ROI3D
ROI.getNumberOfContourPoints()
public double computeSurfaceArea(Sequence sequence)
ROI3D
computeSurfaceArea
in class ROI3D
public double computeNumberOfContourPoints()
ROI
computeNumberOfContourPoints
in class ROI3D
public java.util.List<Anchor3D> getControlPoints()
public java.util.List<Point3D> getPoints()
public boolean isOverEdge(IcyCanvas canvas, double x, double y, double z)
isOverEdge
in class ROI3D
public boolean contains(Point3D p)
ROI3D
Point3D
is inside the ROI.public boolean contains(Rectangle3D r)
ROI3D
ROI
entirely contains the specified Rectangle3D
. The
ROI.contains()
method allows a implementation to
conservatively return false
when:
intersect
method returns true
and
ROI
entirely contains the
Rectangle3D
are prohibitively expensive.
false
even though the ROI
contains the
Rectangle3D
.contains
in interface Shape3D
contains
in class ROI3D
r
- The specified Rectangle3D
true
if the interior of the ROI
entirely contains the Rectangle3D
;
false
otherwise or, if the ROI
contains the Rectangle3D
and the
intersects
method returns true
and the containment calculations would be too
expensive to perform.ROI3D.contains(double, double, double, double, double, double)
public boolean contains(double x, double y, double z)
ROI3D
ROI
.contains
in interface Shape3D
contains
in class ROI3D
x
- the specified X coordinate to be testedy
- the specified Y coordinate to be testedz
- the specified Z coordinate to be testedtrue
if the specified 3D coordinates are inside the ROI
boundary;
false
otherwise.public boolean contains(double x, double y, double z, double sizeX, double sizeY, double sizeZ)
ROI3D
ROI
entirely contains the specified 3D 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 interface Shape3D
contains
in class ROI3D
x
- the X coordinate of the minimum corner position of the specified rectangular areay
- the Y coordinate of the minimum corner position of the specified rectangular areaz
- the Z coordinate of the minimum corner position of the specified rectangular areasizeX
- size for X dimension of the specified rectangular areasizeY
- size for Y dimension of the specified rectangular areasizeZ
- size for Z dimension of the specified rectangular areatrue
if the interior of the ROI
entirely contains the
specified 3D rectangular area; false
otherwise or, if the ROI
contains the 3D
rectangular area and the intersects
method returns true
and the containment
calculations would be too
expensive to perform.public boolean intersects(Rectangle3D r)
ROI3D
ROI
intersects the interior of a specified Rectangle3D
.
The ROI.intersects()
method allows a ROI
implementation to conservatively return true
when:
Rectangle3D
and the ROI
intersect, but
ROIs
this method might return true
even though the Rectangle3D
does not intersect the ROI
.intersects
in interface Shape3D
intersects
in class ROI3D
r
- the specified Rectangle3D
true
if the interior of the ROI
and the interior of the
specified Rectangle3D
intersect, or are both highly likely to intersect
and intersection calculations would be too expensive to perform; false
otherwise.ROI3D.intersects(double, double, double,double, double, double)
public boolean intersects(double x, double y, double z, double sizeX, double sizeY, double sizeZ)
ROI3D
ROI
intersects the interior of a specified
3D rectangular area. The 3D 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 3D rectangular area
does not intersect the ROI
.intersects
in interface Shape3D
intersects
in class ROI3D
x
- the X coordinate of the minimum corner position of the specified rectangular areay
- the Y coordinate of the minimum corner position of the specified rectangular areaz
- the Z coordinate of the minimum corner position of the specified rectangular areasizeX
- size for X dimension of the specified rectangular areasizeY
- size for Y dimension of the specified rectangular areasizeZ
- size for Z dimension 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 Rectangle3D computeBounds3D()
ROI3D
ROI
.ROI3D.getBounds3D()
which should try to cache the result as the
bounding box calculation can take some computation time for complex ROI.computeBounds3D
in class ROI3D
public boolean canTranslate()
ROI3D
true
if the ROI support translate operation.canTranslate
in class ROI3D
ROI3D.translate(double, double, double)
public void translate(double dx, double dy, double dz)
ROI3D
ROI3D.canTranslate()
first.translate
in class ROI3D
dx
- translation value to apply on X dimensiondy
- translation value to apply on Y dimensiondz
- translation value to apply on Z dimensionROI3D.canTranslate()
,
ROI3D.setPosition3D(Point3D)
public void controlPointPositionChanged(Anchor3D source)
public void controlPointOverlayChanged(OverlayEvent event)
public void onChanged(CollapsibleEvent object)
onChanged
in interface ChangeListener
onChanged
in class ROI
public double computeNumberOfPoints()
ROI
computeNumberOfPoints
in class ROI3D
public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
loadFromXML
in class ROI3D