public abstract class AbstractWritableSuperEllipsoid extends AbstractEuclideanSpace implements WritableSuperEllipsoid
WritableSuperEllipsoid
implementations.Modifier and Type | Field and Description |
---|---|
protected double[] |
center |
protected double |
exponent |
protected double[] |
semiAxisLengths |
n
Constructor and Description |
---|
AbstractWritableSuperEllipsoid(double[] center,
double[] semiAxisLengths,
double exponent)
Creates an n-d superellipsoid, where n is determined by the length of the
smaller array.
|
Modifier and Type | Method and Description |
---|---|
RealLocalizableRealPositionable |
center()
Returns the center.
|
protected double |
distancePowered(RealLocalizable l)
Computes the unit distance between a given location and the center of the
superellipsoid.
|
boolean |
equals(Object obj)
Determines whether this superellipsoid describes the same region as
another one.
|
double |
exponent()
Returns the exponent of this superellipsoid
|
int |
hashCode() |
double |
realMax(int d)
Get the maximum in dimension d.
|
double |
realMin(int d)
Get the minimum in dimension d.
|
double |
semiAxisLength(int d)
Returns the semi-axis length of the superellipsoid in a given dimension d
|
void |
setExponent(double exponent)
Sets the exponent.
|
void |
setSemiAxisLength(int d,
double length)
Sets the semi-axis length in dimension d.
|
numDimensions
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, maskType
and, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xor
boundaryType, isAll, knownConstant
numDimensions
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
protected double exponent
protected final double[] center
protected final double[] semiAxisLengths
public AbstractWritableSuperEllipsoid(double[] center, double[] semiAxisLengths, double exponent)
center
- position of the superellipsoid in space, given in pixel
coordinatessemiAxisLengths
- array containing n elements representing half values of
width/height/depth/...exponent
- exponent of the superellipsoidpublic double realMin(int d)
RealInterval
realMin
in interface RealInterval
d
- dimensionpublic double realMax(int d)
RealInterval
realMax
in interface RealInterval
d
- dimensionpublic double exponent()
SuperEllipsoid
exponent
in interface SuperEllipsoid
public double semiAxisLength(int d)
SuperEllipsoid
semiAxisLength
in interface SuperEllipsoid
public RealLocalizableRealPositionable center()
center
in interface SuperEllipsoid
center
in interface WritableSuperEllipsoid
public void setExponent(double exponent)
WritableSuperEllipsoid
setExponent
in interface WritableSuperEllipsoid
public void setSemiAxisLength(int d, double length)
WritableSuperEllipsoid
setSemiAxisLength
in interface WritableSuperEllipsoid
public boolean equals(Object obj)
SuperEllipsoid
equals
in interface SuperEllipsoid
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
obj
- The superellipsoid to compare with this one.MaskPredicate.equals(Object)
,
SuperEllipsoid.equals(SuperEllipsoid, SuperEllipsoid)
protected double distancePowered(RealLocalizable l)
l
- location to checkexponent
Copyright © 2015–2022 ImgLib2. All rights reserved.