public class VectorString3D extends Object implements VectorString
| Modifier and Type | Field and Description |
|---|---|
static byte |
CLOSED |
static byte |
MIRROR_X |
static byte |
MIRROR_Y |
static byte |
MIRROR_Z |
static byte |
REVERSED |
X_AXIS, Y_AXIS, Z_AXIS| Constructor and Description |
|---|
VectorString3D(double[] x,
double[] y,
double[] z,
boolean closed) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependent(double[] a)
Add an array that will get resampled along; must be of the same length as the value returned by length()
|
void |
calibrate(ij.measure.Calibration cal)
Scale to match cal.pixelWidth, cal.pixelHeight and computed depth.
|
VectorString3D |
chain(VectorString3D vs)
Returns a new VectorString3D which is the result of the optimal chaining of this and the given VectorString.
|
Object |
clone() |
Point3d |
computeCenterOfMass() |
double |
computeLength()
The physical length of this sequence of points.
|
static VectorString3D |
createInterpolated(Editions ed,
double alpha) |
VectorString3D |
createInterpolated(VectorString3D other,
Editions ed,
double alpha)
Create an interpolated VectorString3D between this and the given one, with the proper weight 'alpha' which must be 0 <= weight <= 1 (otherwise returns null)
|
static VectorString3D |
createInterpolatedPoints(Editions ed,
double alpha)
Create a new VectorString3D which is the weighted average between the two VectorString3D that make the Editions.
|
static VectorString3D |
createInterpolatedPoints(Editions ed,
double alpha,
int first,
int last)
Create a new VectorString3D which is the weighted average between the two VectorString3D that make the Editions.
|
static VectorString3D |
createRandom(int length,
double delta,
boolean closed) |
void |
debug() |
static double |
distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
double |
distance(int i,
Point3d p)
Distance from the point at i to p.
|
double |
distance(int i,
VectorString vs,
int j)
Distance from point i in this to point j in vs2.
|
static double |
distance(VectorString3D vs1,
int i,
VectorString3D vs2,
int j) |
void |
equalize(double target_delta)
Expand or shrink the points in this 3D path so that the average point interdistance becomes delta.
|
double |
getAverageDelta()
Return the average point interdistance.
|
static double |
getAverageVectorLength(int[] i,
VectorString3D[] vs) |
ij.measure.Calibration |
getCalibrationCopy() |
double |
getDelta()
If not resampled, the returned delta is zero.
|
double[] |
getDependent(int i) |
double |
getDiffVectorLength(int i,
int j,
VectorString vsb)
Subtracts vs2 vector j to this vector i and returns its length, without changing any data.
|
int |
getDimensions() |
int |
getNSources()
Returns the number of VectorString3D that have contributed to this VectorString3D, via merging with createInterpolated(...).
|
double |
getPoint(int dim,
int i)
Get the value at index i for dimension dim; dimensions start at 0 and go up to n-dimensions -1, for example for VectorString3D, 0=X, 1=Y, 2=Z; to get y[32] call getPoint(1, 32);
|
double[] |
getPoints(int dim)
Get the array at dimension dim which ranges from 0 to n-dimensions -1; 0=X, 1=Y, 2=Z, et cetera depending on how many dimensions this VectorString supports.
|
double |
getRelativeVector(int dim,
int i) |
ArrayList<ArrayList<Point3d>> |
getSource()
Returns a list of lists of Point3d, one list of lists for each point in this VectorString3D; may be null.
|
double[] |
getStdDevAtEachPoint()
If null != source, compute the StdDev at each point in this VectorString3D, by comparing it with its associated source points.
|
byte |
getTags() |
double |
getVector(int dim,
int i) |
double[] |
getVectors(int dim) |
boolean |
isCalibrated() |
boolean |
isClosed() |
boolean |
isMirroredX() |
boolean |
isMirroredY() |
boolean |
isMirroredZ() |
boolean |
isNear(VectorString3D vs,
double radius)
Determine if any point of the given VectorString3D falls within a radius of any of the points in this VectorString3D.
|
boolean |
isReversed() |
int |
length()
The length of this string, that is, the number of points (and vectors) in it.
|
VectorString3D |
makeReversedCopy() |
void |
mirror(int axis)
Where axis is any of VectorString.X_AXIS, .Y_AXIS or .Z_AXIS,
and the mirroring is done relative to the local 0,0 of this VectorString.
|
void |
relative()
Create the relative vectors, that is, the differences of one vector to the next.
|
void |
reorder(int new_zero)
Reorder the arrays so that the index zero becomes new_zero -the arrays are circular.
|
void |
resample(double delta) |
void |
resample(double delta,
boolean with_source)
Homogenize the average point interdistance to 'delta'.
|
void |
reverse()
Invert the order of points.
|
void |
setCalibration(ij.measure.Calibration cal)
Sets but does NOT apply the given calibration.
|
static double |
sqDistance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
VectorString3D |
substring(int first,
int last)
Makes a substring starting at @param first (inclusive) and finishing at @param last (non-inclusive, aka last-1).
|
VectorString |
subVectorString(int first,
int last)
Create a new VectorString for the given range.
|
Vector3d |
sumVector()
The sum of all vectors, or what is the same: a vector from first to last points.
|
void |
transform(Transform3D t) |
void |
translate(Vector3d v) |
public static final byte CLOSED
public static final byte REVERSED
public static final byte MIRROR_X
public static final byte MIRROR_Y
public static final byte MIRROR_Z
public void addDependent(double[] a)
throws Exception
Exceptionpublic double[] getDependent(int i)
public double getAverageDelta()
public double getDelta()
getDelta in interface VectorStringpublic void resample(double delta)
resample in interface VectorStringpublic void resample(double delta,
boolean with_source)
resample in interface VectorStringpublic final int length()
length in interface VectorStringpublic double[] getPoints(int dim)
VectorStringgetPoints in interface VectorStringpublic double[] getVectors(int dim)
getVectors in interface VectorStringpublic double getPoint(int dim,
int i)
VectorStringgetPoint in interface VectorStringpublic double getVector(int dim,
int i)
getVector in interface VectorStringpublic double getRelativeVector(int dim,
int i)
public final boolean isClosed()
isClosed in interface VectorStringpublic void debug()
public ArrayList<ArrayList<Point3d>> getSource()
public int getNSources()
public void reorder(int new_zero)
reorder in interface VectorStringpublic double getDiffVectorLength(int i,
int j,
VectorString vsb)
getDiffVectorLength in interface VectorStringpublic VectorString3D makeReversedCopy()
public void relative()
public void equalize(double target_delta)
public static VectorString3D createRandom(int length, double delta, boolean closed) throws Exception
Exceptionpublic void calibrate(ij.measure.Calibration cal)
public void setCalibration(ij.measure.Calibration cal)
public boolean isCalibrated()
public ij.measure.Calibration getCalibrationCopy()
public void reverse()
reverse in interface VectorStringpublic boolean isReversed()
public static VectorString3D createInterpolated(Editions ed, double alpha) throws Exception
Exceptionpublic VectorString3D createInterpolated(VectorString3D other, Editions ed, double alpha) throws Exception
Exceptionpublic void mirror(int axis)
public boolean isMirroredX()
public boolean isMirroredY()
public boolean isMirroredZ()
public byte getTags()
public double computeLength()
public Vector3d sumVector()
public static final double distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
public static final double sqDistance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
public static final double distance(VectorString3D vs1, int i, VectorString3D vs2, int j)
public double distance(int i,
VectorString vs,
int j)
distance in interface VectorStringpublic final double distance(int i,
Point3d p)
public void translate(Vector3d v)
public void transform(Transform3D t)
public Point3d computeCenterOfMass()
public VectorString subVectorString(int first, int last) throws Exception
subVectorString in interface VectorStringExceptionpublic static VectorString3D createInterpolatedPoints(Editions ed, double alpha)
alpha - is the weight, between 0 and 1.public static VectorString3D createInterpolatedPoints(Editions ed, double alpha, int first, int last)
alpha - is the weight, between 0 and 1.first - is the first index to consider for the interpolated VectorString3D.last - is the last index to consider for the interpolated VectorString3D.public VectorString3D chain(VectorString3D vs)
public VectorString3D substring(int first, int last)
public int getDimensions()
getDimensions in interface VectorStringpublic static final double getAverageVectorLength(int[] i,
VectorString3D[] vs)
public boolean isNear(VectorString3D vs, double radius)
public double[] getStdDevAtEachPoint()
Copyright © 2015–2021 Fiji. All rights reserved.