|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mines.jtk.dsp.EigenTensors3
public class EigenTensors3
An array of eigen-decompositions of tensors for 3D image processing. Each tensor is a symmetric positive-semidefinite 3-by-3 matrix:
|a11 a12 a13|
A = |a12 a22 a23|
|a13 a23 a33|
Such tensors can be used to parameterize anisotropic image processing.
The eigen-decomposition of the matrix A is
A = au*u*u' + av*v*v' + aw*w*w'
= (au-av)*u*u' + (aw-av)*w*w' + av*I
where u, v, and w are orthogonal unit eigenvectors of A. (The notation
u' denotes the transpose of u.) The outer products of eigenvectors are
scaled by the non-negative eigenvalues au, av, and aw. The second
equation exploits the identity u*u' + v*v' + w*w' = I, and makes
apparent the redundancy of the vector v.
Only the 1st and 2nd components of the eigenvectors u and w are stored. Except for a sign, the 3rd components may be computed from the 1st and 2nd. Because the tensors are independent of the choice of sign, the eigenvectors u and w are stored with an implied non-negative 3rd component.
Storage may be further reduced by compression, whereby eigenvalues and eigenvectors are quantized. Quantization errors for eigenvalues (au,av,aw) are less than 0.001*(au+av+aw). Quantization errors for eigenvectors are less than one degree of arc on the unit sphere. Memory required to store each tensor is 12 bytes if compressed, and 28 bytes if not compressed.
| Constructor Summary | |
|---|---|
EigenTensors3(float[][][] u1,
float[][][] u2,
float[][][] w1,
float[][][] w2,
float[][][] au,
float[][][] av,
float[][][] aw,
boolean compressed)
Constructs tensors for specified array dimensions and eigenvalues. |
|
EigenTensors3(int n1,
int n2,
int n3,
boolean compressed)
Constructs tensors for specified array dimensions. |
|
| Method Summary | |
|---|---|
void |
getEigenvalues(float[][][] au,
float[][][] av,
float[][][] aw)
Gets eigenvalues for all tensors. |
float[] |
getEigenvalues(int i1,
int i2,
int i3)
Gets eigenvalues for the tensor with specified indices. |
void |
getEigenvalues(int i1,
int i2,
int i3,
float[] a)
Gets eigenvalues for the tensor with specified indices. |
float[] |
getEigenvectorU(int i1,
int i2,
int i3)
Gets the eigenvector u for the tensor with specified indices. |
void |
getEigenvectorU(int i1,
int i2,
int i3,
float[] u)
Gets the eigenvector u for the tensor with specified indices. |
float[] |
getEigenvectorV(int i1,
int i2,
int i3)
Gets the eigenvector v for the tensor with specified indices. |
void |
getEigenvectorV(int i1,
int i2,
int i3,
float[] v)
Gets the eigenvector v for the tensor with specified indices. |
float[] |
getEigenvectorW(int i1,
int i2,
int i3)
Gets the eigenvector w for the tensor with specified indices. |
void |
getEigenvectorW(int i1,
int i2,
int i3,
float[] w)
Gets the eigenvector w for the tensor with specified indices. |
int |
getN1()
Gets the number of tensors in the 1st dimension. |
int |
getN2()
Gets the number of tensors in the 2nd dimension. |
int |
getN3()
Gets the number of tensors in the 3rd dimension. |
float[] |
getTensor(int i1,
int i2,
int i3)
Gets tensor elements for specified indices. |
void |
getTensor(int i1,
int i2,
int i3,
float[] a)
Gets tensor elements for specified indices. |
void |
setEigenvalues(float[][][] au,
float[][][] av,
float[][][] aw)
Sets eigenvalues for all tensors. |
void |
setEigenvalues(float au,
float av,
float aw)
Sets eigenvalues for all tensors. |
void |
setEigenvalues(int i1,
int i2,
int i3,
float[] a)
Sets eigenvalues for the tensor with specified indices. |
void |
setEigenvalues(int i1,
int i2,
int i3,
float au,
float av,
float aw)
Sets eigenvalues for the tensor with specified indices. |
void |
setEigenvectorU(int i1,
int i2,
int i3,
float[] u)
Sets the eigenvector u for the tensor with specified indices. |
void |
setEigenvectorU(int i1,
int i2,
int i3,
float u1,
float u2,
float u3)
Sets the eigenvector u for the tensor with specified indices. |
void |
setEigenvectorW(int i1,
int i2,
int i3,
float[] w)
Sets the eigenvector w for the tensor with specified indices. |
void |
setEigenvectorW(int i1,
int i2,
int i3,
float w1,
float w2,
float w3)
Sets the eigenvector w for the tensor with specified indices. |
void |
setTensor(int i1,
int i2,
int i3,
float[] a)
Sets tensor elements for specified indices. |
void |
setTensor(int i1,
int i2,
int i3,
float a11,
float a12,
float a13,
float a22,
float a23,
float a33)
Sets tensor elements for specified indices. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EigenTensors3(int n1,
int n2,
int n3,
boolean compressed)
n1 - number of tensors in 1st dimension.n2 - number of tensors in 2nd dimension.n3 - number of tensors in 3rd dimension.compressed - true, for compressed tensors; false, otherwise.
public EigenTensors3(float[][][] u1,
float[][][] u2,
float[][][] w1,
float[][][] w2,
float[][][] au,
float[][][] av,
float[][][] aw,
boolean compressed)
u1 - array of 1st components of u.u2 - array of 2nd components of u.w1 - array of 1st components of w.w2 - array of 2nd components of w.au - array of eigenvalues au.av - array of eigenvalues av.aw - array of eigenvalues aw.compressed - true, for compressed tensors; false, otherwise.| Method Detail |
|---|
public int getN1()
public int getN2()
public int getN3()
public void getTensor(int i1,
int i2,
int i3,
float[] a)
getTensor in interface Tensors3i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.a - array {a11,a12,a13,a22,a23,a33} of tensor elements.
public float[] getTensor(int i1,
int i2,
int i3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.
public void getEigenvalues(int i1,
int i2,
int i3,
float[] a)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.a - array {au,av,aw} of eigenvalues.
public float[] getEigenvalues(int i1,
int i2,
int i3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.
public void getEigenvalues(float[][][] au,
float[][][] av,
float[][][] aw)
au - array of eigenvalues au.av - array of eigenvalues av.aw - array of eigenvalues aw.
public void getEigenvectorU(int i1,
int i2,
int i3,
float[] u)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.u - array {u1,u2,u3} of eigenvector components.
public float[] getEigenvectorU(int i1,
int i2,
int i3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.
public void getEigenvectorV(int i1,
int i2,
int i3,
float[] v)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.v - array {v1,v2,v3} of eigenvector components.
public float[] getEigenvectorV(int i1,
int i2,
int i3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.
public void getEigenvectorW(int i1,
int i2,
int i3,
float[] w)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.w - array {w1,w2,w3} of eigenvector components.
public float[] getEigenvectorW(int i1,
int i2,
int i3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.
public void setTensor(int i1,
int i2,
int i3,
float[] a)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.a - array {a11,a12,a13,a22,a23,a33} of tensor elements.
public void setTensor(int i1,
int i2,
int i3,
float a11,
float a12,
float a13,
float a22,
float a23,
float a33)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.a11 - tensor element a11.a12 - tensor element a12.a13 - tensor element a13.a22 - tensor element a22.a23 - tensor element a23.a33 - tensor element a33.
public void setEigenvalues(float au,
float av,
float aw)
au - eigenvalue au.av - eigenvalue av.aw - eigenvalue aw.
public void setEigenvalues(float[][][] au,
float[][][] av,
float[][][] aw)
au - array of eigenvalues au.av - array of eigenvalues av.aw - array of eigenvalues aw.
public void setEigenvalues(int i1,
int i2,
int i3,
float au,
float av,
float aw)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.au - eigenvalue au.av - eigenvalue av.aw - eigenvalue aw.
public void setEigenvalues(int i1,
int i2,
int i3,
float[] a)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.a - array {au,av,aw} of eigenvalues.
public void setEigenvectorU(int i1,
int i2,
int i3,
float u1,
float u2,
float u3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.u1 - 1st component of u.u2 - 2nd component of u.u3 - 3nd component of u.
public void setEigenvectorU(int i1,
int i2,
int i3,
float[] u)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.u - {u1,u2,u3} of eigenvector components.
public void setEigenvectorW(int i1,
int i2,
int i3,
float w1,
float w2,
float w3)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.w1 - 1st component of w.w2 - 2nd component of w.w3 - 3nd component of w.
public void setEigenvectorW(int i1,
int i2,
int i3,
float[] w)
i1 - index for 1st dimension.i2 - index for 2nd dimension.i3 - index for 3rd dimension.w - {w1,w2,w3} of eigenvector components.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||