public abstract class WarpFunction3
extends java.lang.Object
Warping is the computation of the image g(y) = f(x(y)). Unwarping is the computation of the image f(x) = g(y(x)).
For warping, we need the function x(y) = y-u(x(y)) = y-uy(y). We compute the displacement uy(y) by iteration so that uy(y) = u(x(y)).
We also define a midpoint m(x) = (x+y(x))/2, and compute the displacement um(m) = u(x(m)) from u(x) by iteration so that um(m) = u(x(m)).
Modifier | Constructor and Description |
---|---|
protected |
WarpFunction3(int n1,
int n2,
int n3) |
Modifier and Type | Method and Description |
---|---|
static WarpFunction3 |
constant(double u1,
double u2,
double u3,
int n1,
int n2,
int n3)
Returns a warping for a constant shift.
|
static WarpFunction3 |
constantPlusSinusoid(double c1,
double c2,
double c3,
double u1,
double u2,
double u3,
int n1,
int n2,
int n3)
Returns a constant-plus-sinusoidal warping.
|
static WarpFunction3 |
gaussian(double u1,
double u2,
double u3,
int n1,
int n2,
int n3)
Returns a derivative-of-Gaussian warping.
|
static WarpFunction3 |
sinusoid(double u1,
double u2,
double u3,
int n1,
int n2,
int n3)
Returns a sinusoidal warping.
|
abstract double |
u1(double x1,
double x2,
double x3)
Returns the 1st component of the shift u(x).
|
float[][][] |
u1m()
Returns an array[n3][n2][n1] of 1st components of shifts um(m) = u(x(m)).
|
double |
u1m(double m1,
double m2,
double m3)
Returns the 1st component of the shift um(m) = u(x(m)).
|
float[][][] |
u1x()
Returns an array[n3][n2][n1] of 1st components of shifts u(x).
|
double |
u1x(double x1,
double x2,
double x3)
Returns the 1st component of the shift u(x).
|
float[][][] |
u1y()
Returns an array[n3][n2][n1] of 1st components of shifts uy(y) = u(x(y)).
|
double |
u1y(double y1,
double y2,
double y3)
Returns the 1st component of the shift uy(y) = u(x(y)).
|
abstract double |
u2(double x1,
double x2,
double x3)
Returns the 2nd component of the shift u(x).
|
float[][][] |
u2m()
Returns an array[n3][n2][n1] of 2nd components of shifts um(m) = u(x(m)).
|
double |
u2m(double m1,
double m2,
double m3)
Returns the 2nd component of the shift um(m) = u(x(m)).
|
float[][][] |
u2x()
Returns an array[n3][n2][n1] of 2nd components of shifts u(x).
|
double |
u2x(double x1,
double x2,
double x3)
Returns the 2nd component of the shift u(x).
|
float[][][] |
u2y()
Returns an array[n3][n2][n1] of 2nd components of shifts uy(y) = u(x(y)).
|
double |
u2y(double y1,
double y2,
double y3)
Returns the 2nd component of the shift uy(y) = u(x(y)).
|
abstract double |
u3(double x1,
double x2,
double x3)
Returns the 3rd component of the shift u(x).
|
float[][][] |
u3m()
Returns an array[n3][n2][n1] of 3rd components of shifts um(m) = u(x(m)).
|
double |
u3m(double m1,
double m2,
double m3)
Returns the 3rd component of the shift um(m) = u(x(m)).
|
float[][][] |
u3x()
Returns an array[n3][n2][n1] of 3rd components of shifts u(x).
|
double |
u3x(double x1,
double x2,
double x3)
Returns the 3rd component of the shift u(x).
|
float[][][] |
u3y()
Returns an array[n3][n2][n1] of 3rd components of shifts uy(y) = u(x(y)).
|
double |
u3y(double y1,
double y2,
double y3)
Returns the 3rd component of the shift uy(y) = u(x(y)).
|
float[][][] |
unwarp(float[][][] g)
Unwarps a sampled function using only all components of shifts.
|
float[][][] |
unwarp1(float[][][] g)
Unwarps a sampled function using only 1st components of shifts.
|
float[][][] |
warp(float[][][] f)
Warps a sampled function using only all components of shifts.
|
float[][][] |
warp1(float[][][] f)
Warps a sampled function using only 1st components of shifts.
|
public static WarpFunction3 constant(double u1, double u2, double u3, int n1, int n2, int n3)
u1
- shift in 1st dimension.u2
- shift in 2nd dimension.u3
- shift in 3rd dimension.n1
- number of samples in 1st dimension.n2
- number of samples in 2nd dimension.n3
- number of samples in 3rd dimension.public static WarpFunction3 gaussian(double u1, double u2, double u3, int n1, int n2, int n3)
u1
- maximum shift in 1st dimension.u2
- maximum shift in 2nd dimension.u3
- maximum shift in 3rd dimension.n1
- number of samples in 1st dimension.n2
- number of samples in 2nd dimension.n3
- number of samples in 3rd dimension.public static WarpFunction3 sinusoid(double u1, double u2, double u3, int n1, int n2, int n3)
u1
- maximum shift in 1st dimension.u2
- maximum shift in 2nd dimension.u3
- maximum shift in 3rd dimension.n1
- number of samples in 1st dimension.n2
- number of samples in 2nd dimension.n3
- number of samples in 3rd dimension.public static WarpFunction3 constantPlusSinusoid(double c1, double c2, double c3, double u1, double u2, double u3, int n1, int n2, int n3)
c1
- constant shift in 1st dimension.c2
- constant shift in 2nd dimension.c3
- constant shift in 3rd dimension.u1
- maximum sinusoidal shift in 1st dimension.u2
- maximum sinusoidal shift in 2nd dimension.u3
- maximum sinusoidal shift in 3rd dimension.n1
- number of samples in 1st dimension.n2
- number of samples in 2nd dimension.n3
- number of samples in 3rd dimension.public abstract double u1(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public abstract double u2(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public abstract double u3(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public double u1x(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public double u2x(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public double u3x(double x1, double x2, double x3)
x1
- 1st coordinate of the point x.x2
- 2nd coordinate of the point x.x3
- 3rd coordinate of the point x.public double u1m(double m1, double m2, double m3)
m1
- 1st coordinate of the point m.m2
- 2nd coordinate of the point m.m3
- 3rd coordinate of the point m.public double u2m(double m1, double m2, double m3)
m1
- 1st coordinate of the point m.m2
- 2nd coordinate of the point m.m3
- 3rd coordinate of the point m.public double u3m(double m1, double m2, double m3)
m1
- 1st coordinate of the point m.m2
- 2nd coordinate of the point m.m3
- 3rd coordinate of the point m.public double u1y(double y1, double y2, double y3)
y1
- 1st coordinate of the point y.y2
- 2nd coordinate of the point y.y3
- 3rd coordinate of the point y.public double u2y(double y1, double y2, double y3)
y1
- 1st coordinate of the point y.y2
- 2nd coordinate of the point y.y3
- 3rd coordinate of the point y.public double u3y(double y1, double y2, double y3)
y1
- 1st coordinate of the point y.y2
- 2nd coordinate of the point y.y3
- 3rd coordinate of the point y.public float[][][] u1x()
public float[][][] u2x()
public float[][][] u3x()
public float[][][] u1m()
public float[][][] u2m()
public float[][][] u3m()
public float[][][] u1y()
public float[][][] u2y()
public float[][][] u3y()
public float[][][] warp1(float[][][] f)
f
- array of values f(x).public float[][][] warp(float[][][] f)
f
- array of values f(x).public float[][][] unwarp1(float[][][] g)
g
- array of values g(x).public float[][][] unwarp(float[][][] g)
g
- array of values g(x).