public class ROI3DArea extends ROI3DStack<ROI2DArea>
Modifier and Type | Class and Description |
---|---|
class |
ROI3DArea.ROI3DAreaPainter |
ROI3DStack.ROI3DStackPainter
ROI3D.ROI3DPainter
ROI.ROIGroupId, ROI.ROIIdComparator, ROI.ROINameComparator, ROI.ROIPainter
PROPERTY_USECHILDCOLOR
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 |
---|
ROI3DArea() |
ROI3DArea(BooleanMask2D mask2d,
int zMin,
int zMax)
Create a 3D Area ROI type from the specified
BooleanMask3D . |
ROI3DArea(BooleanMask3D mask)
Create a 3D Area ROI type from the specified
BooleanMask3D . |
ROI3DArea(Point3D pt) |
ROI3DArea(Point5D pt) |
ROI3DArea(ROI3DArea area)
Create a copy of the specified 3D Area ROI.
|
Modifier and Type | Method and Description |
---|---|
void |
add(BooleanMask3D mask)
Add the specified
BooleanMask3D content to this ROI3DArea |
void |
add(int z,
BooleanMask2D maskSlice)
Add the specified BooleanMask2D with the existing slice at given Z position.
|
ROI |
add(ROI roi,
boolean allowCreate)
Adds content of specified
ROI into this ROI . |
void |
addBrush(java.awt.geom.Point2D pos,
int z)
Add brush point at specified position and for specified Z slice.
|
void |
addPoint(int x,
int y,
int z)
Adds the specified point to this ROI
|
void |
downscale()
Fast 2x down scaling (each 2x2x2 block points become 1 point).
|
void |
downscale(int nbPointForTrue)
Fast 2x down scaling (each 2x2x2 block points become 1 point).
|
void |
downscale2D()
Fast 2x down scaling (each 2x2 block points become 1 point).
|
void |
downscale2D(int nbPointForTrue)
Fast 2x down scaling (each 2x2 block points become 1 point).
|
void |
exclusiveAdd(BooleanMask3D mask)
Exclusively add the specified
BooleanMask3D content to this ROI3DArea |
void |
exclusiveAdd(int z,
BooleanMask2D maskSlice)
Exclusively add the specified BooleanMask2D with the existing slice at given Z position.
|
ROI |
exclusiveAdd(ROI roi,
boolean allowCreate)
Sets the content of this
ROI to be the union of its current content and the
content of the specified ROI , minus their intersection. |
java.lang.String |
getDefaultName() |
Point3D[] |
getEdgePoints()
Deprecated.
Use
ROI3D.getBooleanMask(boolean) and BooleanMask3D.getContourPoints() instead. |
Point3D[] |
getPoints()
Deprecated.
Use
ROI3D.getBooleanMask(boolean) and BooleanMask3D.getPoints() instead. |
void |
intersect(BooleanMask3D mask)
Intersect the specified
BooleanMask3D content with this ROI3DArea |
void |
intersect(int z,
BooleanMask2D maskSlice)
Intersect the specified BooleanMask2D with the existing slice at given Z position.
|
ROI |
intersect(ROI roi,
boolean allowCreate)
Sets the content of this
ROI to the intersection of
its current content and the content of the specified ROI . |
boolean |
isEmpty()
Returns true if the ROI is empty (the mask does not contains any point).
|
boolean |
isOverEdge(IcyCanvas canvas,
double x,
double y,
double z)
Returns true if specified point coordinates overlap the ROI edge.
|
void |
onChanged(CollapsibleEvent object)
roi changed
|
void |
optimizeBounds()
Optimize the bounds size to the minimum surface which still include all mask.
|
void |
removeBrush(java.awt.geom.Point2D pos,
int z)
Remove brush point from the mask at specified position and for specified Z slice.
|
void |
removePoint(int x,
int y,
int z)
Remove a point from the mask.
|
void |
setAsBooleanMask(BooleanMask3D mask)
Set the mask from a BooleanMask3D object.
|
void |
setAsBooleanMask(Rectangle3D.Integer rect,
BooleanMask2D[] mask)
Set the 3D mask from a 2D boolean mask array
|
void |
setPoint(int x,
int y,
int z,
boolean value)
Set the value for the specified point in the mask.
|
void |
setPosition2D(java.awt.geom.Point2D newPosition)
Set all 2D slices ROI to same position.
|
void |
setSlice(int z,
BooleanMask2D maskSlice)
Sets the BooleanMask2D slice at given Z position to this 3D ROI
|
void |
setSlice(int z,
ROI2D roiSlice,
boolean merge)
Deprecated.
Use one of these methods instead :
#setSlice(int, ROI2DArea) , setSlice(int, BooleanMask2D) ,
#add(int, ROI2DArea) or add(BooleanMask3D) |
void |
subtract(BooleanMask3D mask)
Subtract the specified
BooleanMask3D from this ROI3DArea |
void |
subtract(int z,
BooleanMask2D maskSlice)
Subtract the specified BooleanMask2D from the existing slice at given Z position.
|
ROI |
subtract(ROI roi,
boolean allowCreate)
Subtract the specified
ROI content from current ROI . |
void |
translate(double dx,
double dy)
Deprecated.
Use
ROI3DStack.translate(double, double, double) instead. |
void |
upscale()
Fast up scaling by a factor of 2 (each point become a 2x2x2 block points)
|
void |
upscale2D()
Fast up scaling by a factor of 2 (each point become a 2x2 block points)
2D version (down scale is done on XY dimension only).
|
add, add, canTranslate, clear, computeBounds3D, computeNumberOfContourPoints, computeNumberOfPoints, computeSurfaceArea, contains, contains, exclusiveAdd, exclusiveAdd, getBooleanMask2D, getBooleanMask2D, getSizeZ, getSlice, getSlice, getUseChildColor, hasSelectedPoint, intersect, intersect, intersects, iterator, loadFromXML, overlayChanged, removeSlice, roiChanged, saveToXML, setC, setColor, setCreating, setFocused, setName, setReadOnly, setSelected, setSlice, setT, setUseChildColor, subtract, subtract, translate, translate, unselectAllPoints
canSetBounds, canSetPosition, computeBounds5D, contains, contains, contains, contains, contains, getBooleanMask, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask3D, getBounds, getBounds3D, getC, getDimension, getLength, getPosition, getPosition3D, getROI3DList, getROI3DList, getSurfaceArea, getSurfaceArea, getT, getVolume, intersects, intersects, intersects, isActiveFor, isActiveFor, isOverEdge, isOverEdge, isOverEdge, setBounds3D, setBounds5D, setPosition3D, setPosition5D
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, 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, intersects, isAttached, isCreating, isDefaultName, isEditable, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, mergeWith, nameChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, roiChanged, saveROIsToXML, selectionChanged, setColor, setDefaultColor, setDefaultOpacity, setDefaultShowName, setDefaultStroke, setEditable, setGroupId, setIcon, setMousePos, setOpacity, setProperty, setPropertyValue, setROIsFromXML, setSelected, setSelectedColor, setShowName, setStroke
public ROI3DArea()
public ROI3DArea(BooleanMask3D mask)
BooleanMask3D
.public ROI3DArea(BooleanMask2D mask2d, int zMin, int zMax)
BooleanMask3D
.public java.lang.String getDefaultName()
getDefaultName
in class ROI3DStack<ROI2DArea>
public void addPoint(int x, int y, int z)
public void removePoint(int x, int y, int z)
public void setPoint(int x, int y, int z, boolean value)
public void addBrush(java.awt.geom.Point2D pos, int z)
public void removeBrush(java.awt.geom.Point2D pos, int z)
public void add(BooleanMask3D mask)
BooleanMask3D
content to this ROI3DAreapublic void add(int z, BooleanMask2D maskSlice)
#setSlice(int, ROI2DArea)
with
new ROI2DArea(maskSlice)
z
- the position where the slice must be addedmaskSlice
- the 2D boolean mask to mergepublic void exclusiveAdd(BooleanMask3D mask)
BooleanMask3D
content to this ROI3DAreapublic void exclusiveAdd(int z, BooleanMask2D maskSlice)
#setSlice(int, ROI2DArea)
with
new ROI2DArea(maskSlice)
z
- the position where the slice must be exclusively addedmaskSlice
- the 2D boolean mask to mergepublic void intersect(BooleanMask3D mask)
BooleanMask3D
content with this ROI3DAreapublic void intersect(int z, BooleanMask2D maskSlice)
z
- the position where the slice must be setmaskSlice
- the 2D boolean mask to mergepublic void subtract(BooleanMask3D mask)
BooleanMask3D
from this ROI3DAreapublic void subtract(int z, BooleanMask2D maskSlice)
z
- the position where the slice must be subtractedmaskSlice
- the 2D boolean mask to subtractpublic ROI add(ROI roi, boolean allowCreate) throws java.lang.UnsupportedOperationException
ROI
ROI
into this ROI
.
The resulting content of this ROI
will include
the union of both ROI's contents.UnsupportedOperationException
is thrown if allowCreate
parameter
is set to false
, if the parameter is set to true
the result may be returned in a new
created ROI.
// Example: roi1 (before) + roi2 = roi1 (after) ################ ################ ################ ############## ############## ################ ############ ############ ################ ########## ########## ################ ######## ######## ################ ###### ###### ###### ###### #### #### #### #### ## ## ## ##
add
in class ROI3DStack<ROI2DArea>
roi
- the ROI
to be added to the current ROI
allowCreate
- if set to true
the method will create a new ROI to return the result of
the operation if it
cannot be directly processed on the current ROI
allowCreate
parameter was set to true
java.lang.UnsupportedOperationException
- if the two ROI cannot be added together.ROI.getUnion(ROI)
public ROI exclusiveAdd(ROI roi, boolean allowCreate) throws java.lang.UnsupportedOperationException
ROI
ROI
to be the union of its current content and the
content of the specified ROI
, minus their intersection.
The resulting ROI
will include only content that were contained in either this ROI
or
in the specified ROI
, but not in both.UnsupportedOperationException
is thrown if allowCreate
parameter is set to
false
, if the parameter is set to true
the result may be returned
in a new created ROI.
// Example: roi1 (before) xor roi2 = roi1 (after) ################ ################ ############## ############## ## ## ############ ############ #### #### ########## ########## ###### ###### ######## ######## ################ ###### ###### ###### ###### #### #### #### #### ## ## ## ##
exclusiveAdd
in class ROI3DStack<ROI2DArea>
roi
- the ROI
to be exclusively added to the current ROI
allowCreate
- if set to true
the method will create a new ROI to return the result of
the operation if it
cannot be directly processed on the current ROI
allowCreate
parameter was set to true
java.lang.UnsupportedOperationException
- if the two ROI cannot be exclusively added together.ROI.getExclusiveUnion(ROI)
public ROI intersect(ROI roi, boolean allowCreate) throws java.lang.UnsupportedOperationException
ROI
ROI
to the intersection of
its current content and the content of the specified ROI
.
The resulting ROI will include only contents that were contained in both ROI.UnsupportedOperationException
is thrown if allowCreate
parameter
is set to false
, if the parameter is set to true
the result may be returned in a new
created ROI.
// Example: roi1 (before) intersect roi2 = roi1 (after) ################ ################ ################ ############## ############## ############ ############ ############ ######## ########## ########## #### ######## ######## ###### ###### #### #### ## ##
intersect
in class ROI3DStack<ROI2DArea>
roi
- the ROI
to be intersected to the current ROI
allowCreate
- if set to true
the method will create a new ROI to return the result of
the operation if it
cannot be directly processed on the current ROI
allowCreate
parameter was set to true
java.lang.UnsupportedOperationException
- if the two ROI cannot be intersected together.ROI.getIntersection(ROI)
public ROI subtract(ROI roi, boolean allowCreate) throws java.lang.UnsupportedOperationException
ROI
ROI
content from current ROI
.UnsupportedOperationException
is thrown if allowCreate
parameter
is set to false
, if the parameter is set to true
the result may be returned in a new
created ROI.subtract
in class ROI3DStack<ROI2DArea>
roi
- the ROI
to subtract from the current ROI
allowCreate
- if set to true
the method will create a new ROI to return the result of
the operation if it
cannot be directly processed on the current ROI
allowCreate
parameter was set to true
java.lang.UnsupportedOperationException
- if we can't subtract the specified ROI
from this ROI
ROI.getSubtraction(ROI)
public void setSlice(int z, BooleanMask2D maskSlice)
z
- the position where the slice must be setmaskSlice
- the BooleanMask2D to set@Deprecated public void setSlice(int z, ROI2D roiSlice, boolean merge)
#setSlice(int, ROI2DArea)
, setSlice(int, BooleanMask2D)
,
#add(int, ROI2DArea)
or add(BooleanMask3D)
public boolean isEmpty()
isEmpty
in class ROI3DStack<ROI2DArea>
@Deprecated public Point3D[] getEdgePoints()
@Deprecated public void translate(double dx, double dy)
ROI3DStack.translate(double, double, double)
instead.public boolean isOverEdge(IcyCanvas canvas, double x, double y, double z)
ROI3D
ROI3D.contains(double, double, double)
to test for content overlap instead.
We provide a default implementation to not break compatibility.isOverEdge
in class ROI3D
public void setPosition2D(java.awt.geom.Point2D newPosition)
public void setAsBooleanMask(BooleanMask3D mask)
public void setAsBooleanMask(Rectangle3D.Integer rect, BooleanMask2D[] mask)
rect
- the 3D region defined by 2D boolean mask arraymask
- the 3D mask data (array length should be equals to rect.sizeZ)public void upscale()
public void downscale(int nbPointForTrue)
nbPointForTrue
- the minimum number of true
points from a 2x2x2 block to give a true
resulting
point.public void downscale()
public void upscale2D()
public void downscale2D(int nbPointForTrue)
nbPointForTrue
- the minimum number of true
points from a 2x2 block to give a true
resulting
point.public void downscale2D()
public void optimizeBounds()
public void onChanged(CollapsibleEvent object)
onChanged
in interface ChangeListener
onChanged
in class ROI