Class Ellipsoid
Object
Mark
MarkWithPosition
ConicBase
Ellipsoid
- All Implemented Interfaces:
Serializable
Represents a 3D ellipsoid mark with multiple sub-regions.
The ellipsoid has the following sub-marks:
- Sub-Mark 0: Center Ellipsoid (inner core)
- Sub-Mark 1: Ellipsoid with shell
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbox(Dimensions dimensions, int regionID) Calculates the bounding box for a specific region of the mark.boxAllRegions(Dimensions dimensions) Calculates the bounding box for all regions of the mark.double[]Creates an array of radii in their original units.double[]createRadiiArrayResolved(Optional<Resolution> resolution) Creates an array of radii resolved to the given resolution.Creates a duplicate of this mark.booleanequalsDeep(Mark m) Checks if this mark is equal to another mark by comparing all attributes.EllipsoidMatrixCalculatorCalculator for ellipsoid-related matrices.static doublegetEllipsoidSum(double x, double y, double z, cern.colt.matrix.DoubleMatrix2D mat) Calculates the sum of squared coordinates relative to the ellipsoid's matrix.doubleThe distance to the inner core, expressed as a ratio of the radii.getName()Returns the name of this mark type.The orientation of the ellipsoid.getRadii()The radii of the ellipsoid in 3D.doublegetShell()The size of the shell, expressed as a ratio of the radii.final byteisPointInside(Point3i point) Determines if a point is inside the mark.intReturns the number of dimensions of this mark.intReturns the number of regions in this mark.Provides an optional quick overlap calculation method.voidscale(ScaleFactor scaleFactor) Scales the mark in X and Y dimensions.voidsetInnerCoreDistance(double innerCoreDistance) The distance to the inner core, expressed as a ratio of the radii.voidsetMarksExplicit(Point3d position) Sets the mark's position explicitly.voidsetMarksExplicit(Point3d position, Orientation orientation) Sets the mark's position and orientation explicitly.voidsetMarksExplicit(Point3d pos, Orientation orientation, Point3d radii) Sets the mark's properties explicitly.voidsetShell(double shell) The size of the shell, expressed as a ratio of the radii.toString()voidUpdates internal calculations after a change in the mark's properties.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
-
Ellipsoid
public Ellipsoid()Creates a new Ellipsoid with default values. -
Ellipsoid
Creates a new Ellipsoid by copying an existing one.- Parameters:
src- the Ellipsoid to copy from
-
-
Method Details
-
getName
Description copied from class:MarkReturns the name of this mark type. -
getEllipsoidSum
public static double getEllipsoidSum(double x, double y, double z, cern.colt.matrix.DoubleMatrix2D mat) Calculates the sum of squared coordinates relative to the ellipsoid's matrix.- Parameters:
x- x-coordinatey- y-coordinatez- z-coordinatemat- the ellipsoid matrix- Returns:
- the sum of squared coordinates
-
isPointInside
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
-
duplicate
Description copied from class:MarkCreates a duplicate of this mark. -
toString
-
volume
public double volume(int regionID) Description copied from class:MarkCalculates the volume of a specific region of the mark. -
updateAfterMarkChange
public void updateAfterMarkChange()Updates internal calculations after a change in the mark's properties. -
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
-
setMarksExplicit
Description copied from class:ConicBaseSets the mark's properties explicitly.- Specified by:
setMarksExplicitin classConicBase- Parameters:
pos- the position of the markorientation- the orientation of the markradii- the radii of the mark
-
setMarksExplicit
Description copied from class:ConicBaseSets the mark's position explicitly.- Specified by:
setMarksExplicitin classConicBase- Parameters:
position- the position of the mark
-
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
-
scale
Description 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:
m- 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
-
setMarksExplicit
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
-
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 radii. -
setShell
public void setShell(double shell) The size of the shell, expressed as a ratio of the radii. -
getInnerCoreDistance
public double getInnerCoreDistance()The distance to the inner core, expressed as a ratio of the radii. -
setInnerCoreDistance
public void setInnerCoreDistance(double innerCoreDistance) The distance to the inner core, expressed as a ratio of the radii. -
getRadii
The radii of the ellipsoid in 3D. -
getOrientation
The orientation of the ellipsoid. -
getEllipsoidCalculator
public EllipsoidMatrixCalculator getEllipsoidCalculator()Calculator for ellipsoid-related matrices.
-