Xmipp
v3.23.11-Nereus
|
Classes | |
class | SimpleGrid |
class | Grid |
class | GridVolumeT< T > |
Typedefs | |
typedef GridVolumeT< double > | GridVolume |
Functions | |
template<class T > | |
std::ostream & | operator<< (std::ostream &o, const GridVolumeT< T > &GV) |
UsefulGrids Some useful grids | |
These are already-built grids to make your task easier. You can find here Simple Cubic (CC), Face-Centered (FCC) and Body-Centered Cubic (BCC) grids. Most of them are supposed to have its origin in the middle of the two defining corners. The defining corners (corner1 and corner2) are directly related with lowest and highest indexes inside the grid respectively. The difference is that the corners are given ALWAYS in the universal coordinate system while the lowest and highest are vectors in the grid coordinate system | |
SimpleGrid | Create_CC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2, const Matrix1D< double > &origin) |
Grid | Create_CC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2) |
Grid | Create_CC_grid (double relative_size, int Zdim, int Ydim, int Xdim) |
Grid | Create_BCC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2) |
Grid | Create_FCC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2) |
SimpleGrid | Create_grid_within_sphere (double relative_size, const Matrix1D< double > &origin, const Matrix1D< double > &X, const Matrix1D< double > &Y, const Matrix1D< double > &Z, double R2) |
Grid | Create_CC_grid (double relative_size, double R) |
Grid | Create_BCC_grid (double relative_size, double R) |
Grid | Create_FCC_grid (double relative_size, double R) |
#define | CC 0 |
CC identifier. More... | |
#define | FCC 1 |
FCC identifier. More... | |
#define | BCC 2 |
BCC identifier. More... | |
The grids are one of the most basic things in the reconstruction process, since the reconstructed volumes are expressed as a linear combination of a volume basis function weighted and shifted to all positions defined by the grid. Grids in Xmipp may be as complex as you liked, a complex grid is supposed to be a superposition of simpler grids. Simple grids maintain information about the simple grids themselves (orientation, spacing, ...) while complex ones are only collections of simple grids. Usual grids as BCC (Body Centered Cubic) or FCC (Face Centered Cubic), can be expressed as the superposition of two CC (Cubic) grids.
It is important to notice that the existence of this class makes the reconstruction algorithms independent from the underlying grid, incrementing the reusability of the code.
typedef GridVolumeT<double> GridVolume |
Grid Create_BCC_grid | ( | double | relative_size, |
const Matrix1D< double > & | corner1, | ||
const Matrix1D< double > & | corner2 | ||
) |
Create a BCC grid as a Complex grid (two corners). This function constructs two CC Simple grids with the following parameters
As you see the BCC grid is the superposition of 2 CC grids one shifted with the other by (0.5,0.5,0.5) units in the grid coordinate system.
Definition at line 251 of file grids.cpp.
Grid Create_BCC_grid | ( | double | relative_size, |
double | R | ||
) |
Create a BCC grid such that a sphere of radius R and centered at the origin is inside.
Definition at line 446 of file grids.cpp.
SimpleGrid Create_CC_grid | ( | double | relative_size, |
const Matrix1D< double > & | corner1, | ||
const Matrix1D< double > & | corner2, | ||
const Matrix1D< double > & | origin | ||
) |
Create a CC grid as a Simple grid. The parameters of the CC grid are:
where the specified means that it has been specified as a parameter of the function. The resulting grid is ready to work. There are two roundings for the lowest and highest indexes, they are such that corner1 and corner2 are guaranteed to be inside the Cubic grid. It might be that due to the relative size you are including more points in the universal grid that needed. Look at the following example, imagine that you have a relative size of 2.75 and that you want a cubic grid between (-1,-1,-1) and (1,1,1) (in the universal coord. system), with origin at (0,0,0); then the smallest cubic grid that includes the corners is also defined between (-1,-1,-1) and (1,1,1) in the grid system, but in the universal system these points corresponds to (-2.75,-2.75,-2.75) and (2.75,2.75,2.75). You see that you are including points (specifically, (-2,-2,-2), (-2,-2,-1), ...) that you didn't intend at the beginning, but remember that with this relative size, the resulting CC grid is the smallest one which includes the given corners.
Definition at line 196 of file grids.cpp.
Grid Create_CC_grid | ( | double | relative_size, |
const Matrix1D< double > & | corner1, | ||
const Matrix1D< double > & | corner2 | ||
) |
Create a CC grid as a Complex grid (two corners). This function makes a call to the previous one with
That is to say, the origin of the grid is at its center, lowest and highest indexes are nearly symmetrical (lowest=-highest). The possible asymetries come from the ROUNDnD in the origin calculation.
Definition at line 217 of file grids.cpp.
Grid Create_CC_grid | ( | double | relative_size, |
int | Zdim, | ||
int | Ydim, | ||
int | Xdim | ||
) |
Create a CC grid as a Complex grid (size). This function makes a call to the previous one with
That is to say, the origin of the grid is at its center, corner1 and corner2 are chosen such that from corner1 to corner2 (both included) there are exactly (Xdim,Ydim,Zdim) samples in the universal grid. The resulting volume is symmetrical (corner1=-corner2) if the sizes are odd in all directions, and is not if the sizes are even.
Definition at line 234 of file grids.cpp.
Grid Create_CC_grid | ( | double | relative_size, |
double | R | ||
) |
Create a CC grid such that a sphere of radius R and centered at the origin is inside.
Definition at line 427 of file grids.cpp.
Grid Create_FCC_grid | ( | double | relative_size, |
const Matrix1D< double > & | corner1, | ||
const Matrix1D< double > & | corner2 | ||
) |
Create a FCC grid as a Complex grid (two corners). This function constructs four CC Simple grids with the following parameters
Definition at line 306 of file grids.cpp.
Grid Create_FCC_grid | ( | double | relative_size, |
double | R | ||
) |
Create a FCC grid such that a sphere of radius R and centered at the origin is inside.
Definition at line 465 of file grids.cpp.
SimpleGrid Create_grid_within_sphere | ( | double | relative_size, |
const Matrix1D< double > & | origin, | ||
const Matrix1D< double > & | X, | ||
const Matrix1D< double > & | Y, | ||
const Matrix1D< double > & | Z, | ||
double | R2 | ||
) |
Create a simple grid fitting the given sphere. Not all index combinations are within the sphere, so attention must be paid whether a certain point is within it or not.
The formula for the grid limits are computed as
Definition at line 376 of file grids.cpp.
std::ostream & operator<< | ( | std::ostream & | o, |
const GridVolumeT< T > & | GV | ||
) |