public class VectorString2D extends Object implements VectorString
X_AXIS, Y_AXIS, Z_AXIS
Constructor and Description |
---|
VectorString2D(double[] x,
double[] y,
double z,
boolean closed)
Construct a new String of Vectors from the given points and desired resampling point interdistance 'delta'.
|
Modifier and Type | Method and Description |
---|---|
void |
calibrate(ij.measure.Calibration cal)
Scale to match cal.pixelWidth, cal.pixelHeight and computed depth.
|
Object |
clone()
Does NOT clone the vector arrays, which are initialized to NULL; only the x,y,delta,z.
|
static double |
distance(double x1,
double y1,
double x2,
double y2) |
double |
distance(int i,
VectorString vs,
int j)
Distance from point i in this to point j in vs2.
|
double |
getAverageDelta() |
ij.measure.Calibration |
getCalibrationCopy() |
double |
getDelta()
If not resampled, returns zero.
|
double |
getDiffVectorLength(int i,
int j,
VectorString vs2)
Subtracts vs2 vector j to this vector i and returns its length, without changing any data.
|
int |
getDimensions() |
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 |
getVector(int dim,
int i) |
double[] |
getVectors(int dim) |
boolean |
isCalibrated() |
boolean |
isClosed() |
int |
length() |
static void |
main(String[] args) |
void |
reorder(int new_zero) |
void |
resample(double delta)
Homogenize the average point interdistance to 'delta'.
|
void |
resample(double delta,
boolean with_source)
Same as resample(delta).
|
void |
reverse()
Invert the order of points.
|
VectorString |
subVectorString(int first,
int last)
Create a new VectorString for the given range.
|
public Object clone()
public int length()
length
in interface VectorString
public double getDelta()
getDelta
in interface VectorString
public double[] getPoints(int dim)
VectorString
getPoints
in interface VectorString
public double[] getVectors(int dim)
getVectors
in interface VectorString
public double getPoint(int dim, int i)
VectorString
getPoint
in interface VectorString
public double getVector(int dim, int i)
getVector
in interface VectorString
public boolean isClosed()
isClosed
in interface VectorString
public double getAverageDelta()
public void resample(double delta, boolean with_source)
resample
in interface VectorString
public void resample(double delta)
resample
in interface VectorString
public void reorder(int new_zero)
reorder
in interface VectorString
public double getDiffVectorLength(int i, int j, VectorString vs2)
getDiffVectorLength
in interface VectorString
public double distance(int i, VectorString vs, int j)
distance
in interface VectorString
public static double distance(double x1, double y1, double x2, double y2)
public VectorString subVectorString(int first, int last) throws Exception
subVectorString
in interface VectorString
Exception
public void reverse()
reverse
in interface VectorString
public int getDimensions()
getDimensions
in interface VectorString
public void calibrate(ij.measure.Calibration cal)
public boolean isCalibrated()
public ij.measure.Calibration getCalibrationCopy()
public static final void main(String[] args)
Copyright © 2015–2021 Fiji. All rights reserved.