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 VectorStringpublic double getDelta()
getDelta 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 boolean isClosed()
isClosed in interface VectorStringpublic double getAverageDelta()
public void resample(double delta,
boolean with_source)
resample in interface VectorStringpublic void resample(double delta)
resample in interface VectorStringpublic void reorder(int new_zero)
reorder in interface VectorStringpublic double getDiffVectorLength(int i,
int j,
VectorString vs2)
getDiffVectorLength in interface VectorStringpublic double distance(int i,
VectorString vs,
int j)
distance in interface VectorStringpublic static double distance(double x1,
double y1,
double x2,
double y2)
public VectorString subVectorString(int first, int last) throws Exception
subVectorString in interface VectorStringExceptionpublic void reverse()
reverse in interface VectorStringpublic int getDimensions()
getDimensions in interface VectorStringpublic 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.