#include <vector>
#include <core/xmipp_image.h>
#include <core/geometry.h>
#include <core/args.h>
#include "core/matrix2d.h"
Go to the source code of this file.
|
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
|
#define | CC 0 |
| CC identifier. More...
|
|
#define | FCC 1 |
| FCC identifier. More...
|
|
#define | BCC 2 |
| BCC identifier. More...
|
|
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) |
|
◆ GRIDVOL_BY_GRIDVOL
#define GRIDVOL_BY_GRIDVOL |
( |
|
op | ) |
|
Value: if (VolumesNo()!=GV.VolumesNo()) \
\
result.G = G;\
result.LV.reserve(VolumesNo());
\ for (
size_t i=0;
i<VolumesNo();
i++) { \
try { \
arrayByArray((*
this)(
i)(),GV(
i)(),(*Vol_aux)(),op); \
result.LV.push_back(Vol_aux); \
std::cout << XE.what(); \
REPORT_ERROR(
ERR_GRID_SIZE,(std::string)
"GridVolume::"+op+
": Different shape of volume " +\
} \
} \
\
return result;
#define REPORT_ERROR(nerr, ErrormMsg)
String integerToString(int I, int _width, char fill_with)
if(fabs(c[*nmax+ *nmax *c_dim1])==0.e0)
Incorrect number of GRID volumes or shapes.
Definition at line 1064 of file grids.h.
◆ GRIDVOL_BY_GRIDVOLASSIG
#define GRIDVOL_BY_GRIDVOLASSIG |
( |
|
op | ) |
|
Value:if (VolumesNo()!=GV.VolumesNo()) \
for (
size_t i=0;
i<VolumesNo();
i++) { \
try { \
arrayByArray((*
this)(
i)(),GV(
i)(),(*
this)(
i)(),op); \
std::cout << XE.what(); \
REPORT_ERROR(
ERR_GRID_SIZE,(std::string)
"GridVolume::"+op+
"=: Different shape of volume " +\
} \
}
#define REPORT_ERROR(nerr, ErrormMsg)
String integerToString(int I, int _width, char fill_with)
Incorrect number of GRID volumes or shapes.
Definition at line 1128 of file grids.h.
◆ GRIDVOLUME_BY_SCALAR
#define GRIDVOLUME_BY_SCALAR |
( |
|
op | ) |
|
Value: result.G = G; \
result.LV.reserve(VolumesNo()); \
for (
size_t i=0;
i<VolumesNo();
i++) \
array_by_scalar((*
this)(
i)(),
f,result(
i)(),op); \
return result;
Definition at line 1008 of file grids.h.
◆ PACK_DOUBLE
#define PACK_DOUBLE |
( |
|
v | ) |
{jj=pos%Xdim; ii=pos/Xdim; pos++; VOLVOXEL(V,sli,ii,jj)=(T)(v);} |
◆ PACK_INT
Value:{jj=pos%Xdim; ii=pos/Xdim; pos++; \
temp_float = (float) (v); \
memcpy( &(
VOLVOXEL(V,sli,ii,jj)) , &temp_float, floatsize); \
}
#define VOLVOXEL(V, k, i, j)
◆ UNPACK_DOUBLE
#define UNPACK_DOUBLE |
( |
|
v, |
|
|
|
cast |
|
) |
| |
Value:#define VOLVOXEL(V, k, i, j)
◆ UNPACK_INT
#define UNPACK_INT |
( |
|
v, |
|
|
|
cast |
|
) |
| |
Value: memcpy( &temp_float, &(
VOLVOXEL(V,sli,ii,jj)),floatsize);\
(v)=(cast)temp_float;}
#define VOLVOXEL(V, k, i, j)
◆ operator-()
◆ operator/()