Xmipp
v3.23.11-Nereus
|
Namespaces | |
applyGeometryImpl | |
Functions | |
void | geo2TransformationMatrix (const MDRow &imageHeader, Matrix2D< double > &A, bool only_apply_shifts=false) |
bool | getLoopRange (double value, double min, double max, double delta, int loopLimit, int &minIter, int &maxIter) |
void | string2TransformationMatrix (const String &matrixStr, Matrix2D< double > &matrix, size_t dim=4) |
template<typename T > | |
void | transformationMatrix2Parameters2D (const Matrix2D< T > &A, bool &flip, T &scale, T &shiftX, T &shiftY, T &psi) |
void | transformationMatrix2Parameters3D (const Matrix2D< double > &A, bool &flip, double &scale, double &shiftX, double &shiftY, double &shiftZ, double &rot, double &tilt, double &psi) |
void | transformationMatrix2Geo (const Matrix2D< double > &A, MDRow &imageGeo) |
template<typename T > | |
void | rotation2DMatrix (T ang, Matrix2D< T > &m, bool homogeneous=true) |
template<typename T > | |
void | translation2DMatrix (const Matrix1D< T > &translation, Matrix2D< T > &resMatrix, bool inverse=false) |
void | rotation3DMatrix (double ang, char axis, Matrix2D< double > &m, bool homogeneous=true) |
void | rotation3DMatrix (double ang, const Matrix1D< double > &axis, Matrix2D< double > &m, bool homogeneous=true) |
void | alignWithZ (const Matrix1D< double > &axis, Matrix2D< double > &m, bool homogeneous=true) |
template<typename T > | |
void | translation3DMatrix (const Matrix1D< T > &translation, Matrix2D< T > &resMatrix, bool inverse=false) |
void | scale3DMatrix (const Matrix1D< double > &sc, Matrix2D< double > &m, bool homogeneous=true) |
void | rotation3DMatrixFromIcoOrientations (const char *icoFrom, const char *icoTo, Matrix2D< double > &R) |
template<typename T1 , typename T , typename T2 > | |
void | applyGeometry (int SplineDegree, MultidimArray< T > &__restrict__ V2, const MultidimArray< T1 > &__restrict__ V1, const Matrix2D< T2 > &At, bool inv, bool wrap, T outside=T(0), MultidimArray< double > *BcoeffsPtr=NULL) |
template<typename T > | |
void | applyGeometry (int SplineDegree, MultidimArray< T > &V2, const MultidimArrayGeneric &V1, const Matrix2D< double > &A, bool inv, bool wrap, T outside=0) |
template<typename T > | |
void | selfApplyGeometry (int SplineDegree, MultidimArray< T > &V1, const Matrix2D< double > &A, bool inv, bool wrap, T outside=0) |
template<> | |
void | applyGeometry (int SplineDegree, MultidimArray< std::complex< double > > &V2, const MultidimArray< std::complex< double > > &V1, const Matrix2D< double > &A, bool inv, bool wrap, std::complex< double > outside, MultidimArray< double > *BcoeffsPtr) |
template<> | |
void | selfApplyGeometry (int SplineDegree, MultidimArray< std::complex< double > > &V1, const Matrix2D< double > &A, bool inv, bool wrap, std::complex< double > outside) |
void | applyGeometry (int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, const Matrix2D< double > &A, bool inv, bool wrap, double outside) |
template<typename T > | |
void | produceSplineCoefficients (int SplineDegree, MultidimArray< double > &coeffs, const MultidimArray< T > &V1) |
void | produceSplineCoefficients (int SplineDegree, MultidimArray< double > &coeffs, const MultidimArray< std::complex< double > > &V1) |
template<typename T > | |
void | produceImageFromSplineCoefficients (int SplineDegree, MultidimArray< T > &img, const MultidimArray< double > &coeffs) |
template<typename T > | |
void | rotate (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T > &V1, double ang, char axis='Z', bool wrap=xmipp_transformation::DONT_WRAP, T outside=0) |
template<typename T > | |
void | selfRotate (int SplineDegree, MultidimArray< T > &V1, double ang, char axis='Z', bool wrap=xmipp_transformation::DONT_WRAP, T outside=0) |
template<typename T > | |
void | translate (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T > &V1, const Matrix1D< double > &v, bool wrap=xmipp_transformation::WRAP, T outside=0) |
template<typename T > | |
void | selfTranslate (int SplineDegree, MultidimArray< T > &V1, const Matrix1D< double > &v, bool wrap=xmipp_transformation::WRAP, T outside=0) |
template<typename T > | |
void | translateCenterOfMassToCenter (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T > &V1, bool wrap=xmipp_transformation::WRAP) |
template<typename T > | |
void | selfTranslateCenterOfMassToCenter (int SplineDegree, MultidimArray< T > &V1, bool wrap=xmipp_transformation::WRAP) |
template<typename T1 , typename T > | |
void | scaleToSize (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T1 > &V1, size_t Xdim, size_t Ydim, size_t Zdim=1) |
template<typename T > | |
void | scaleToSize (int SplineDegree, MultidimArray< T > &V2, const MultidimArrayGeneric &V1, int Xdim, int Ydim, int Zdim=1) |
template<typename T > | |
void | scaleToSize (int SplineDegree, MultidimArrayGeneric &V2, const MultidimArray< T > &V1, int Xdim, int Ydim, int Zdim=1) |
void | scaleToSize (int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, int Xdim, int Ydim, int Zdim=1) |
template<typename T > | |
void | selfScaleToSize (int SplineDegree, MultidimArray< T > &V1, int Xdim, int Ydim, int Zdim=1) |
void | selfScaleToSize (int SplineDegree, MultidimArrayGeneric &V1, int Xdim, int Ydim, int Zdim=1) |
void | scaleToSize (int SplineDegree, MultidimArray< std::complex< double > > &V2, const MultidimArray< std::complex< double > > &V1, int Xdim, int Ydim, int Zdim=1) |
void | selfScaleToSize (int SplineDegree, MultidimArray< std::complex< double > > &V1, int Xdim, int Ydim, int Zdim=1) |
template<typename T > | |
void | reduceBSpline (int SplineDegree, MultidimArray< double > &V2, const MultidimArray< T > &V1) |
template<typename T > | |
void | expandBSpline (int SplineDegree, MultidimArray< double > &V2, const MultidimArray< T > &V1) |
template<typename T > | |
void | pyramidReduce (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T > &V1, int levels=1) |
template<typename T > | |
void | selfPyramidReduce (int SplineDegree, MultidimArray< T > &V1, int levels=1) |
void | selfPyramidReduce (int SplineDegree, MultidimArrayGeneric &V1, int levels=1) |
template<typename T > | |
void | pyramidExpand (int SplineDegree, MultidimArray< T > &V2, const MultidimArray< T > &V1, int levels=1) |
void | pyramidExpand (int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, int levels=1) |
void | pyramidReduce (int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, int levels=1) |
template<typename T > | |
void | selfPyramidExpand (int SplineDegree, MultidimArray< T > &V1, int levels=1) |
void | selfPyramidExpand (int SplineDegree, MultidimArrayGeneric &V1, int levels=1) |
template<typename T > | |
void | radialAverage (const MultidimArray< T > &m, Matrix1D< int > ¢er_of_rot, MultidimArray< T > &radial_mean, MultidimArray< int > &radial_count, const bool &rounding=false) |
template<typename T > | |
void | radialAveragePrecomputeDistance (const MultidimArray< T > &m, Matrix1D< int > ¢er_of_rot, MultidimArray< int > &distance, int &dim, const bool &rounding=false) |
template<typename T > | |
void | fastRadialAverage (const MultidimArray< T > &m, const MultidimArray< int > &distance, int dim, MultidimArray< T > &radial_mean, MultidimArray< int > &radial_count) |
template<typename T > | |
void | radialAverageAxis (const MultidimArray< T > &in, char axis, MultidimArray< double > &out) |
template<typename T > | |
void | radialAverageNonCubic (const MultidimArray< T > &m, Matrix1D< int > ¢er_of_rot, MultidimArray< T > &radial_mean, MultidimArray< int > &radial_count, bool rounding=false) |
void | radiallySymmetrize (const MultidimArray< double > &img, MultidimArray< double > &radialImg) |
double | interpolatedElementBSplineDiffX (MultidimArray< double > &vol, double x, double y, double z, int SplineDegree=3) |
double | interpolatedElementBSplineDiffY (MultidimArray< double > &vol, double x, double y, double z, int SplineDegree=3) |
double | interpolatedElementBSplineDiffZ (MultidimArray< double > &vol, double x, double y, double z, int SplineDegree=3) |
void alignWithZ | ( | const Matrix1D< double > & | axis, |
Matrix2D< double > & | m, | ||
bool | homogeneous = true |
||
) |
Matrix which transforms the given axis into Z
A geometrical transformation matrix (4x4) is returned such that the given axis is rotated until it is aligned with the Z axis. This is very useful in order to produce rotational matrices, for instance, around any axis.
The returned matrix is such that A*axis=Z, where Z and axis are column vectors.
Definition at line 471 of file transformations.cpp.
void applyGeometry | ( | int | SplineDegree, |
MultidimArray< T > &__restrict__ | V2, | ||
const MultidimArray< T1 > &__restrict__ | V1, | ||
const Matrix2D< T2 > & | At, | ||
bool | inv, | ||
bool | wrap, | ||
T | outside = T(0) , |
||
MultidimArray< double > * | BcoeffsPtr = NULL |
||
) |
Applies a geometrical transformation.
Any geometrical transformation defined by the matrix A (double (4x4)!! ie, in homogeneous R3 coordinates) is applied to the volume V1. The result is stored in V2 (it cannot be the same as the input volume). An exception is thrown if the transformation matrix is not 4x4.
Structure of the transformation matrix: It should have the following components
r11 r12 r13 x r21 r22 r23 y r31 r32 r33 z 0 0 0 1
where (x,y,z) is the translation desired, and Rij are the components of the rotation matrix R. If you want to apply a scaling factor to the transformation, then multiply r11, r22 and r33 by it.
The result volume (with ndim=1) is resized to the same dimensions as V1 if V2 is empty (0x0) at the beginning, if it is not, ie, if V2 has got some size then only those values in the volume are filled, this is very useful for resizing the volume, then you manually resize the output volume to the desired size and then call this routine.
The relationship between the output coordinates and the input ones are
This function works independently from the logical indexing of each matrix, it sets the logical center and the physical center of the image and work with these 2 coordinate spaces. At the end the original logical indexing of each matrix is kept.
The procedure followed goes from coordinates in the output volume to the ones in the input one, so the inverse of the A matrix is needed. There is a flag telling if the given matrix is already the inverse one or the normal one. If it is the normal one internally the matrix is inversed. If you are to do many "rotations" then some time is spent in inverting the matrix. Normally the matrix is the normal one.
There is something else to tell about the geometrical tranformation. The value of the voxel in the output volume is computed via bilinear interpolation in the input volume. If any of the voxels participating in the interpolation falls outside the input volume, then automatically the corresponding output voxel is set to 0, unless that the wrap flag has been set to 1. In this case if the voxel falls out by the right hand then it is "wrapped" and the corresponding voxel in the left hand is used. The same is appliable to top-bottom. Usually wrap mode is off. Wrap mode is interesting for translations but not for rotations, for example.
The inverse mode and wrapping mode should be taken by default by the routine, g++ seems to have problems with template functions outside a class with default parameters. So, I'm sorry, you will have to put them always. The usual combination is
applyGeometry(..., IS_NOT_INV, DONT_WRAP).
Although you can also use the constants IS_INV, or WRAP.
Definition at line 531 of file transformations.h.
void applyGeometry | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArrayGeneric & | V1, | ||
const Matrix2D< double > & | A, | ||
bool | inv, | ||
bool | wrap, | ||
T | outside = 0 |
||
) |
Definition at line 1234 of file transformations.h.
void applyGeometry | ( | int | SplineDegree, |
MultidimArray< std::complex< double > > & | V2, | ||
const MultidimArray< std::complex< double > > & | V1, | ||
const Matrix2D< double > & | A, | ||
bool | inv, | ||
bool | wrap, | ||
std::complex< double > | outside, | ||
MultidimArray< double > * | BcoeffsPtr | ||
) |
Definition at line 668 of file transformations.cpp.
void applyGeometry | ( | int | SplineDegree, |
MultidimArrayGeneric & | V2, | ||
const MultidimArrayGeneric & | V1, | ||
const Matrix2D< double > & | A, | ||
bool | inv, | ||
bool | wrap, | ||
double | outside | ||
) |
Definition at line 713 of file transformations.cpp.
void expandBSpline | ( | int | SplineDegree, |
MultidimArray< double > & | V2, | ||
const MultidimArray< T > & | V1 | ||
) |
Expand a set of B-spline coefficients.
Knowing that V1 is a (single image of) B-spline coefficients, produce the expanded set of B-spline coefficients using the two-scale relationship.
Definition at line 144 of file transformations.cpp.
void fastRadialAverage | ( | const MultidimArray< T > & | m, |
const MultidimArray< int > & | distance, | ||
int | dim, | ||
MultidimArray< T > & | radial_mean, | ||
MultidimArray< int > & | radial_count | ||
) |
Definition at line 1854 of file transformations.h.
void geo2TransformationMatrix | ( | const MDRow & | imageHeader, |
Matrix2D< double > & | A, | ||
bool | only_apply_shifts = false |
||
) |
Get geometric transformation matrix from image geometry Now this info is stored in metadata The order is: first flip (if necessary), then rotate, then shift A=Translation*Rotation*(Mirror)
Definition at line 178 of file transformations.cpp.
bool getLoopRange | ( | double | value, |
double | min, | ||
double | max, | ||
double | delta, | ||
int | loopLimit, | ||
int & | minIter, | ||
int & | maxIter | ||
) |
Definition at line 603 of file transformations.cpp.
double interpolatedElementBSplineDiffX | ( | MultidimArray< double > & | vol, |
double | x, | ||
double | y, | ||
double | z, | ||
int | SplineDegree | ||
) |
Interpolates the value of the 3D matrix M at the point (x,y,z) knowing that this image is a set of B-spline coefficients. And making the diff of x, such-> V=sum(Coef diff(Bx) By Bz) Only for BSplines of degree 3!!
(x,y,z) are in logical coordinates.
Definition at line 853 of file transformations.cpp.
double interpolatedElementBSplineDiffY | ( | MultidimArray< double > & | vol, |
double | x, | ||
double | y, | ||
double | z, | ||
int | SplineDegree | ||
) |
Interpolates the value of the 3D matrix M at the point (x,y,z) knowing that this image is a set of B-spline coefficients. And making the diff of y, such-> V=sum(Coef Bx diff(By) Bz) Only for BSplines of degree 3!!
(x,y,z) are in logical coordinates.
Definition at line 1008 of file transformations.cpp.
double interpolatedElementBSplineDiffZ | ( | MultidimArray< double > & | vol, |
double | x, | ||
double | y, | ||
double | z, | ||
int | SplineDegree | ||
) |
Interpolates the value of the 3D matrix M at the point (x,y,z) knowing that this image is a set of B-spline coefficients. And making the diff of z, such-> V=sum(Coef Bx By diff(Bz)) Only for BSplines of degree 3!!
(x,y,z) are in logical coordinates.
Definition at line 1164 of file transformations.cpp.
void produceImageFromSplineCoefficients | ( | int | SplineDegree, |
MultidimArray< T > & | img, | ||
const MultidimArray< double > & | coeffs | ||
) |
Produce image from B-spline coefficients.
Note that the coeffs and img are only single images!
Definition at line 64 of file transformations.cpp.
void produceSplineCoefficients | ( | int | SplineDegree, |
MultidimArray< double > & | coeffs, | ||
const MultidimArray< T > & | V1 | ||
) |
Produce spline coefficients.
Create a single image with spline coefficients for the nth image
Definition at line 41 of file transformations.cpp.
void produceSplineCoefficients | ( | int | SplineDegree, |
MultidimArray< double > & | coeffs, | ||
const MultidimArray< std::complex< double > > & | V1 | ||
) |
Definition at line 727 of file transformations.cpp.
void pyramidExpand | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T > & | V1, | ||
int | levels = 1 |
||
) |
Expand the nth volume by 2 using a BSpline pyramid.
Definition at line 1640 of file transformations.h.
void pyramidExpand | ( | int | SplineDegree, |
MultidimArrayGeneric & | V2, | ||
const MultidimArrayGeneric & | V1, | ||
int | levels = 1 |
||
) |
Definition at line 819 of file transformations.cpp.
void pyramidReduce | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T > & | V1, | ||
int | levels = 1 |
||
) |
Reduce the nth volume by 2 using a BSpline pyramid.
Definition at line 1597 of file transformations.h.
void pyramidReduce | ( | int | SplineDegree, |
MultidimArrayGeneric & | V2, | ||
const MultidimArrayGeneric & | V1, | ||
int | levels = 1 |
||
) |
Definition at line 832 of file transformations.cpp.
void radialAverage | ( | const MultidimArray< T > & | m, |
Matrix1D< int > & | center_of_rot, | ||
MultidimArray< T > & | radial_mean, | ||
MultidimArray< int > & | radial_count, | ||
const bool & | rounding = false |
||
) |
Does a radial average of a 2D/3D image, around the voxel where is the origin.
A vector radial_mean is returned where:
A second vector radial_count is returned containing the number of voxels over which each radial average was calculated.
Sjors nov2003: if rounding=true, element=round(distance);
Definition at line 1711 of file transformations.h.
void radialAverageAxis | ( | const MultidimArray< T > & | in, |
char | axis, | ||
MultidimArray< double > & | out | ||
) |
Definition at line 1880 of file transformations.h.
void radialAverageNonCubic | ( | const MultidimArray< T > & | m, |
Matrix1D< int > & | center_of_rot, | ||
MultidimArray< T > & | radial_mean, | ||
MultidimArray< int > & | radial_count, | ||
bool | rounding = false |
||
) |
Definition at line 1375 of file transformations.cpp.
void radialAveragePrecomputeDistance | ( | const MultidimArray< T > & | m, |
Matrix1D< int > & | center_of_rot, | ||
MultidimArray< int > & | distance, | ||
int & | dim, | ||
const bool & | rounding = false |
||
) |
Definition at line 1789 of file transformations.h.
void radiallySymmetrize | ( | const MultidimArray< double > & | img, |
MultidimArray< double > & | radialImg | ||
) |
Definition at line 1312 of file transformations.cpp.
void reduceBSpline | ( | int | SplineDegree, |
MultidimArray< double > & | V2, | ||
const MultidimArray< T > & | V1 | ||
) |
Reduce a set of B-spline coefficients.
Knowing that V1 is a (single image of) B-spline coefficients, produce the reduced set of B-spline coefficients using the two-scale relationship.
Definition at line 87 of file transformations.cpp.
void rotate | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T > & | V1, | ||
double | ang, | ||
char | axis = 'Z' , |
||
bool | wrap = xmipp_transformation::DONT_WRAP , |
||
T | outside = 0 |
||
) |
Rotate an array around a given system axis.
The rotation angle is in degrees, and the rotational axis is either 'X', 'Y' or 'Z' for 3D arrays and only 'Z' for 2D arrays. An exception is thrown if the axis given is not one of these.
Definition at line 1323 of file transformations.h.
void rotation2DMatrix | ( | T | ang, |
Matrix2D< T > & | m, | ||
bool | homogeneous = true |
||
) |
Creates a rotational matrix (3x3) for images
The rotation angle is in degrees. m must have been already resized to 3x3
Definition at line 361 of file transformations.cpp.
void rotation3DMatrix | ( | double | ang, |
char | axis, | ||
Matrix2D< double > & | m, | ||
bool | homogeneous = true |
||
) |
Creates a rotational matrix (4x4) for volumes around system axis
The rotation angle is in degrees, and the rotational axis is either 'X', 'Y' or 'Z'. An exception is thrown if the axis given is not one of these.
The returned matrices are respectively alpha degrees around Z
alpha degrees around Y
alpha degrees around X
Definition at line 426 of file transformations.cpp.
void rotation3DMatrix | ( | double | ang, |
const Matrix1D< double > & | axis, | ||
Matrix2D< double > & | m, | ||
bool | homogeneous = true |
||
) |
Creates a rotational matrix (4x4) for volumes around any axis
The rotation angle is in degrees, and the rotational axis is given as a R3 vector. An exception is thrown if the axis is not a R3 vector. The axis needs not to be unitary.
Definition at line 517 of file transformations.cpp.
void rotation3DMatrixFromIcoOrientations | ( | const char * | icoFrom, |
const char * | icoTo, | ||
Matrix2D< double > & | R | ||
) |
Creates a rotation matrix (R) to change the orientation from one standard orientation (icoFrom) to another one (icoTo)
Definition at line 1332 of file transformations.cpp.
void scale3DMatrix | ( | const Matrix1D< double > & | sc, |
Matrix2D< double > & | m, | ||
bool | homogeneous = true |
||
) |
Creates a scaling matrix (4x4) for volumes
The scaling factors for the different axis must be given as a vector. So that, XX(sc)=scale for X axis, YY(sc)=...
Definition at line 584 of file transformations.cpp.
void scaleToSize | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T1 > & | V1, | ||
size_t | Xdim, | ||
size_t | Ydim, | ||
size_t | Zdim = 1 |
||
) |
Scales to a new size.
The volume is scaled (resampled) to fill a new size. It is not the same as "selfWindow" in this same class. The size can be larger or smaller than the actual one.
Definition at line 1451 of file transformations.h.
|
inline |
Scales to a new size.
The volume is scaled (resampled) to fill a new size. Same as previous, but in this case the input is a MultidimArrayGeneric.
Definition at line 1497 of file transformations.h.
|
inline |
Scales to a new size.
The volume is scaled (resampled) to fill a new size. Same as previous, but in this case the input is a MultidimArrayGeneric.
Definition at line 1517 of file transformations.h.
void scaleToSize | ( | int | SplineDegree, |
MultidimArrayGeneric & | V2, | ||
const MultidimArrayGeneric & | V1, | ||
int | Xdim, | ||
int | Ydim, | ||
int | Zdim = 1 |
||
) |
Scales to a new size.
The volume is scaled (resampled) to fill a new size. Same as previous, but in this case the input is a MultidimArrayGeneric.
Definition at line 746 of file transformations.cpp.
void scaleToSize | ( | int | SplineDegree, |
MultidimArray< std::complex< double > > & | V2, | ||
const MultidimArray< std::complex< double > > & | V1, | ||
int | Xdim, | ||
int | Ydim, | ||
int | Zdim = 1 |
||
) |
Definition at line 759 of file transformations.cpp.
void selfApplyGeometry | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
const Matrix2D< double > & | A, | ||
bool | inv, | ||
bool | wrap, | ||
T | outside = 0 |
||
) |
Applies a geometrical transformation and overwrites the input matrix.
The same as the previous function, but input array is overwritten
Definition at line 1253 of file transformations.h.
void selfApplyGeometry | ( | int | SplineDegree, |
MultidimArray< std::complex< double > > & | V1, | ||
const Matrix2D< double > & | A, | ||
bool | inv, | ||
bool | wrap, | ||
std::complex< double > | outside | ||
) |
Definition at line 704 of file transformations.cpp.
void selfPyramidExpand | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
int | levels = 1 |
||
) |
Expand the nth volume by 2 using a BSpline pyramid.
The same as the previous function, but input array is overwritten
Definition at line 1675 of file transformations.h.
void selfPyramidExpand | ( | int | SplineDegree, |
MultidimArrayGeneric & | V1, | ||
int | levels | ||
) |
Same as previous but for MultidimArrayGeneric
Definition at line 809 of file transformations.cpp.
void selfPyramidReduce | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
int | levels = 1 |
||
) |
Reduce the nth volume by 2 using a BSpline pyramid.
The same as the previous function, but input array is overwritten
Definition at line 1621 of file transformations.h.
void selfPyramidReduce | ( | int | SplineDegree, |
MultidimArrayGeneric & | V1, | ||
int | levels | ||
) |
Same as previous but for MultidimArrayGeneric
Same as template version but for MultidimArrayGeneric
Definition at line 798 of file transformations.cpp.
void selfRotate | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
double | ang, | ||
char | axis = 'Z' , |
||
bool | wrap = xmipp_transformation::DONT_WRAP , |
||
T | outside = 0 |
||
) |
Rotate an array around a given system axis.
The same as the previous function, but input array is overwritten
Definition at line 1350 of file transformations.h.
void selfScaleToSize | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
int | Xdim, | ||
int | Ydim, | ||
int | Zdim = 1 |
||
) |
Scales to a new size.
The same as the previous function, but input array is overwritten
Definition at line 1546 of file transformations.h.
void selfScaleToSize | ( | int | SplineDegree, |
MultidimArrayGeneric & | V1, | ||
int | Xdim, | ||
int | Ydim, | ||
int | Zdim = 1 |
||
) |
Definition at line 736 of file transformations.cpp.
void selfScaleToSize | ( | int | SplineDegree, |
MultidimArray< std::complex< double > > & | V1, | ||
int | Xdim, | ||
int | Ydim, | ||
int | Zdim = 1 |
||
) |
Definition at line 789 of file transformations.cpp.
void selfTranslate | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
const Matrix1D< double > & | v, | ||
bool | wrap = xmipp_transformation::WRAP , |
||
T | outside = 0 |
||
) |
Translate an array.
The same as the previous function, but input array is overwritten
Definition at line 1394 of file transformations.h.
void selfTranslateCenterOfMassToCenter | ( | int | SplineDegree, |
MultidimArray< T > & | V1, | ||
bool | wrap = xmipp_transformation::WRAP |
||
) |
Translate center of mass to center
The same as the previous function, but input array is overwritten
Definition at line 1430 of file transformations.h.
void string2TransformationMatrix | ( | const String & | matrixStr, |
Matrix2D< double > & | matrix, | ||
size_t | dim = 4 |
||
) |
Retrieve the matrix from an string representation Valid formats are: [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] or 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 or 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
Definition at line 241 of file transformations.cpp.
Retrieve the geometry transfomations from matrix
Definition at line 330 of file transformations.cpp.
void transformationMatrix2Parameters2D | ( | const Matrix2D< T > & | A, |
bool & | flip, | ||
T & | scale, | ||
T & | shiftX, | ||
T & | shiftY, | ||
T & | psi | ||
) |
Retrieve the geometry transformations from matrix for 2D.
Definition at line 272 of file transformations.cpp.
void transformationMatrix2Parameters3D | ( | const Matrix2D< double > & | A, |
bool & | flip, | ||
double & | scale, | ||
double & | shiftX, | ||
double & | shiftY, | ||
double & | shiftZ, | ||
double & | rot, | ||
double & | tilt, | ||
double & | psi | ||
) |
Retrieve the geometry transformations from matrix for D.
Definition at line 295 of file transformations.cpp.
void translate | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T > & | V1, | ||
const Matrix1D< double > & | v, | ||
bool | wrap = xmipp_transformation::WRAP , |
||
T | outside = 0 |
||
) |
Translate a array.
The shift is given as a R2 or R3 vector (shift_X, shift_Y, shift_Z) for 2D and 3D arrays, respectively. An exception is thrown if the displacement is not a R3 vector.
Definition at line 1372 of file transformations.h.
void translateCenterOfMassToCenter | ( | int | SplineDegree, |
MultidimArray< T > & | V2, | ||
const MultidimArray< T > & | V1, | ||
bool | wrap = xmipp_transformation::WRAP |
||
) |
Translate center of mass to center
If the input has very high values, it is better to rescale it to be between 0 and 1.
Definition at line 1411 of file transformations.h.
void translation2DMatrix | ( | const Matrix1D< T > & | translation, |
Matrix2D< T > & | resMatrix, | ||
bool | inverse = false |
||
) |
Creates a translational matrix (3x3) for images
The shift is given as a R2 vector (shift_X, shift_Y). An exception is thrown if the displacement is not a R2 vector.
Definition at line 405 of file transformations.cpp.
void translation3DMatrix | ( | const Matrix1D< T > & | translation, |
Matrix2D< T > & | resMatrix, | ||
bool | inverse = false |
||
) |
Creates a translational matrix (4x4) for volumes
The shift is given as a R3 vector (shift_X, shift_Y, shift_Z). An exception is thrown if the displacement is not a R3 vector.
Definition at line 563 of file transformations.cpp.