public class GeomTransform3D
extends java.lang.Object
Constructor and Description |
---|
GeomTransform3D()
Constructor for the Transform3D object create an identity transform
|
GeomTransform3D(ArrayUtil transform)
Constructor for the GeomTransform3D object
|
GeomTransform3D(double[][] transfmatrix)
Constructor for the Transform3D object create an identity transform
|
GeomTransform3D(double tx,
double ty,
double tz,
double rx,
double ry,
double rz)
Constructor for the GeomTranform3D object
|
Modifier and Type | Method and Description |
---|---|
void |
addTransform(ArrayUtil transfo)
Adds a feature to the Transform attribute of the GeomTransform3D object
|
void |
addTransform(GeomTransform3D transfo)
Adds a feature to the Transform attribute of the GeomTransform3D object
|
static ImageHandler |
getImageTransformedMultiThread(ImageHandler img,
GeomTransform3D transform3D) |
double[][] |
getMatrix()
Gets the matrix attribute of the GeomTransform3D object
|
double |
getValue(int row,
int column)
Gets the value of the matrix of the Transform3D object at position
[row][column]
|
Vector3D |
getVectorTransformed(Vector3D P,
Vector3D C)
Apply the transform to a point described by a vector
|
void |
invert()
Description of the Method
|
static void |
invert4x4(double[][] mi,
double[][] m)
taken from volumeJ Invert 4x4 matrix m into inverse mi.
|
boolean |
isIdentity()
Gets the identity attribute of the GeomTransform3D object
|
void |
reset()
Reset the matrix to identity
|
void |
setRotation(double angleRadianXAxis,
double angleRadianYAxis,
double angleRadianZAxis)
Sets the rotation attribute of the Transform3D object
|
void |
setRotation(Vector3D axis,
double angle)
Sets the rotation around an axis with an angle
|
void |
setRotationDegrees(double angleDegreesXAxis,
double angleDegreesYAxis,
double angleDegreesZAxis)
Sets the rotation attribute of the Transform3D object
|
void |
setRotationXAxis(double angleRadian)
Sets the rotation on the X Axis for the Transform
|
void |
setRotationYAxis(double angleRadian)
Sets the rotation on the Y Axis for the Transform
|
void |
setRotationZAxis(double angleRadian)
Sets the rotationZAxis attribute of the Transform3D object
|
void |
setScale(double sx,
double sy,
double sz)
Scale factor
|
void |
setTransform(double tx,
double ty,
double tz,
double rx,
double ry,
double rz)
Sets a new transformation
|
void |
setTranslation(double x,
double y,
double z)
Sets the translation attribute of the Transform
|
public GeomTransform3D()
public GeomTransform3D(double[][] transfmatrix)
transfmatrix
- matrix in double arraypublic GeomTransform3D(ArrayUtil transform)
transform
- matrix in 1D array of 6 values translation then rotationpublic GeomTransform3D(double tx, double ty, double tz, double rx, double ry, double rz)
tx
- x translationty
- y translationtz
- z translationrx
- x rotationry
- y rotationrz
- z rotationpublic void reset()
public void setTransform(double tx, double ty, double tz, double rx, double ry, double rz)
tx
- x translationty
- y translationtz
- z translationrx
- x rotationry
- y rotationrz
- z rotationpublic void setTranslation(double x, double y, double z)
x
- The new translation value on x axisy
- The new translation value on y axisz
- The new translation value on z axispublic void setScale(double sx, double sy, double sz)
sx
- scale in Xsy
- scale in Ysz
- scale in Zpublic void setRotationXAxis(double angleRadian)
angleRadian
- The angle of rotation in radianpublic void setRotationYAxis(double angleRadian)
angleRadian
- The angle of rotation in radianpublic void setRotationZAxis(double angleRadian)
angleRadian
- The angle of rotation in radianpublic void setRotation(double angleRadianXAxis, double angleRadianYAxis, double angleRadianZAxis)
angleRadianXAxis
- The angle of rotation in radian on the X axisangleRadianYAxis
- The angle of rotation in radian on the Y axisangleRadianZAxis
- The angle of rotation in radian on the Z axispublic void setRotation(Vector3D axis, double angle)
axis
- the axis as a vectorangle
- the angle in radianpublic void setRotationDegrees(double angleDegreesXAxis, double angleDegreesYAxis, double angleDegreesZAxis)
angleDegreesXAxis
- The new x rotationDegrees value in degreesangleDegreesYAxis
- The new y rotationDegrees value in degreesangleDegreesZAxis
- The new z rotationDegrees value in degreespublic void addTransform(GeomTransform3D transfo)
transfo
- The feature to be added to the Transform attributepublic void addTransform(ArrayUtil transfo)
transfo
- The feature to be added to the Transform attributepublic double getValue(int row, int column)
row
- row number of the matrixcolumn
- column number of the matrixpublic double[][] getMatrix()
public void invert()
public boolean isIdentity()
public Vector3D getVectorTransformed(Vector3D P, Vector3D C)
P
- Original pointC
- Center for rotationpublic static void invert4x4(double[][] mi, double[][] m)
mi
- a double[4][4] that will be overwritten with the inverse ofm
- a double[4][4] that contains the matrix.public static ImageHandler getImageTransformedMultiThread(ImageHandler img, GeomTransform3D transform3D)