Class Ellipse
Object
org.anchoranalysis.mpp.mark.Mark
org.anchoranalysis.mpp.mark.MarkWithPosition
org.anchoranalysis.mpp.mark.conic.ConicBase
org.anchoranalysis.mpp.mark.conic.Ellipse
- All Implemented Interfaces:
Serializable
public class Ellipse extends ConicBase implements Serializable
Represents a 2D ellipse mark.
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description org.anchoranalysis.spatial.box.BoundingBoxbox(Dimensions dimensions, int regionID)Calculates the bounding box for a specific region of the mark.org.anchoranalysis.spatial.box.BoundingBoxboxAllRegions(Dimensions dimensions)Calculates the bounding box for all regions of the mark.doublecircumference(int regionID)Calculates the circumference of the ellipse for a given region.double[]createRadiiArray()Creates an array of radii in their original units.double[]createRadiiArrayResolved(Optional<Resolution> resolution)Creates an array of radii resolved to the given resolution.Ellipseduplicate()Creates a duplicate of this mark.booleanequalsDeep(Mark mark)Checks if this mark is equal to another mark by comparing all attributes.StringgetName()Returns the name of this mark type.org.anchoranalysis.spatial.orientation.OrientationgetOrientation()org.anchoranalysis.spatial.point.Point2dgetRadii()doublegetShell()The size of the shell, expressed as a ratio of the radius.byteisPointInside(org.anchoranalysis.spatial.point.Point3i point)Determines if a point is inside the mark.intnumberDimensions()Returns the number of dimensions of this mark.intnumberRegions()Returns the number of regions in this mark.Optional<QuickOverlapCalculation>quickOverlap()Provides an optional quick overlap calculation method.voidscale(org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor)Scales the mark in X and Y dimensions.voidscaleRadii(double multFactor)Scales the radii of the ellipse.voidsetMarks(org.anchoranalysis.spatial.point.Point2d radii, org.anchoranalysis.spatial.orientation.Orientation orientation)Sets the marks with radii and orientation.voidsetMarksExplicit(org.anchoranalysis.spatial.point.Point3d position)Sets the mark's position explicitly.voidsetMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation)Sets the mark's position and orientation explicitly.voidsetMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation, org.anchoranalysis.spatial.point.Point2d radii)Sets the marks explicitly with position, orientation, and radii.voidsetMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation, org.anchoranalysis.spatial.point.Point3d radii)Sets the mark's properties explicitly.voidsetShell(double shell)The size of the shell, expressed as a ratio of the radius.StringtoString()voidupdateshell(double shell)Updates the shell size and recalculates internal values.doublevolume(int regionID)Calculates the volume of a specific region of the mark.Methods inherited from class org.anchoranalysis.mpp.mark.conic.ConicBase
radiiOrdered, radiiOrderedResolvedMethods inherited from class org.anchoranalysis.mpp.mark.MarkWithPosition
centerPoint, getPosition, positionString, setPositionMethods inherited from class org.anchoranalysis.mpp.mark.Mark
deriveObject, equalsID, getIdentifier, identifier, setId
-
Constructor Details
-
Method Details
-
getName
Description copied from class:MarkReturns the name of this mark type. -
isPointInside
public final byte isPointInside(org.anchoranalysis.spatial.point.Point3i point)Description copied from class:MarkDetermines if a point is inside the mark.- Specified by:
isPointInsidein classMark- Parameters:
point- the point to check- Returns:
- a byte representing the region membership of the point
-
volume
public double volume(int regionID)Description copied from class:MarkCalculates the volume of a specific region of the mark. -
circumference
public double circumference(int regionID)Calculates the circumference of the ellipse for a given region.- Parameters:
regionID- the ID of the region- Returns:
- the circumference of the ellipse
-
duplicate
Description copied from class:MarkCreates a duplicate of this mark. -
toString
-
updateshell
public void updateshell(double shell)Updates the shell size and recalculates internal values.- Parameters:
shell- the new shell size as a ratio of the radius
-
setMarksExplicit
public void setMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation, org.anchoranalysis.spatial.point.Point2d radii)Sets the marks explicitly with position, orientation, and radii.- Parameters:
position- the 3D position of the ellipseorientation- the orientation of the ellipseradii- the radii of the ellipse
-
setMarksExplicit
public void setMarksExplicit(org.anchoranalysis.spatial.point.Point3d position)Description copied from class:ConicBaseSets the mark's position explicitly.- Specified by:
setMarksExplicitin classConicBase- Parameters:
position- the position of the mark
-
setMarksExplicit
public void setMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation)Description copied from class:ConicBaseSets the mark's position and orientation explicitly.- Specified by:
setMarksExplicitin classConicBase- Parameters:
position- the position of the markorientation- the orientation of the mark
-
setMarksExplicit
public void setMarksExplicit(org.anchoranalysis.spatial.point.Point3d position, org.anchoranalysis.spatial.orientation.Orientation orientation, org.anchoranalysis.spatial.point.Point3d radii)Description copied from class:ConicBaseSets the mark's properties explicitly.- Specified by:
setMarksExplicitin classConicBase- Parameters:
position- the position of the markorientation- the orientation of the markradii- the radii of the mark
-
box
Description copied from class:MarkCalculates the bounding box for a specific region of the mark. -
quickOverlap
Description copied from class:MarkProvides an optional quick overlap calculation method.- Overrides:
quickOverlapin classMark- Returns:
- an Optional containing a QuickOverlapCalculation, or empty if not available
-
setMarks
public void setMarks(org.anchoranalysis.spatial.point.Point2d radii, org.anchoranalysis.spatial.orientation.Orientation orientation)Sets the marks with radii and orientation.- Parameters:
radii- the radii of the ellipseorientation- the orientation of the ellipse
-
scaleRadii
public void scaleRadii(double multFactor)Scales the radii of the ellipse.- Parameters:
multFactor- the factor to multiply the radii by
-
scale
public void scale(org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor) throws CheckedUnsupportedOperationExceptionDescription copied from class:MarkScales the mark in X and Y dimensions.- Overrides:
scalein classMarkWithPosition- Parameters:
scaleFactor- how much to scale by- Throws:
CheckedUnsupportedOperationException- if scaling is not supported for this mark type
-
equalsDeep
Description copied from class:MarkWithPositionChecks if this mark is equal to another mark by comparing all attributes.- Overrides:
equalsDeepin classMarkWithPosition- Parameters:
mark- the mark to compare with- Returns:
- true if the marks are equal, false otherwise
-
numberDimensions
public int numberDimensions()Description copied from class:MarkReturns the number of dimensions of this mark.- Specified by:
numberDimensionsin classMark- Returns:
- the number of dimensions
-
createRadiiArray
public double[] createRadiiArray()Description copied from class:ConicBaseCreates an array of radii in their original units.- Specified by:
createRadiiArrayin classConicBase- Returns:
- an array of radii
-
createRadiiArrayResolved
Description copied from class:ConicBaseCreates an array of radii resolved to the given resolution.- Specified by:
createRadiiArrayResolvedin classConicBase- Parameters:
resolution- an optional resolution to consider- Returns:
- an array of resolved radii
-
numberRegions
public int numberRegions()Description copied from class:MarkReturns the number of regions in this mark.- Specified by:
numberRegionsin classMark- Returns:
- the number of regions
-
boxAllRegions
Description copied from class:MarkCalculates the bounding box for all regions of the mark.- Specified by:
boxAllRegionsin classMark- Parameters:
dimensions- the dimensions of the space- Returns:
- the bounding box
-
getShell
public double getShell()The size of the shell, expressed as a ratio of the radius. -
setShell
public void setShell(double shell)The size of the shell, expressed as a ratio of the radius. -
getRadii
public org.anchoranalysis.spatial.point.Point2d getRadii() -
getOrientation
public org.anchoranalysis.spatial.orientation.Orientation getOrientation()
-