40 addUsageLine(
"Generate 3D reconstructions from projections using ART on x-ray tomograms.");
41 addUsageLine(
"+This program reconstructs based on irregular grids given by pseudo atomic structures. ");
42 addUsageLine(
"+In case of regular grids, please refer to other programs as reconstruct_art ");
43 addUsageLine(
"+or reconstruct_fourier. Optionally, a deformation file generated by Nodal Mode ");
44 addUsageLine(
"+Alignment (NMA) can be passed with --nma parameter.");
48 addParamsLine(
" -i <md_file> : Metadata file with input projections");
49 addParamsLine(
" [-o <volume_file=\"rec_xray_art.vol\">] : Filename for output volume.");
50 addParamsLine(
" --psf <psf_param_file> : XRay-Microscope parameters file");
51 addParamsLine(
" [--start <basisvolume_file=\"\">] : Start from this basis volume. The reconstruction is performed in the same grid as the one ");
52 addParamsLine(
" : in which the basis volume was stored (any -FCC or -CC or grid size value are useless)");
53 addParamsLine(
" [--sampling_rate <Ts=1>] : Pixel size (Angstrom)");
55 addParamsLine(
" [--threshold <thr=0.05>] : Normalized Threshold relative to maximum of PSF to reduce the volume into slabs");
58 addParamsLine(
" [--thr <N=1>] : Number of threads to use. NOTE: Not available when using MPI.");
102 volVoxels().initZeros();
107 volVoxels().setXmippOrigin();
115 double rot,
double tilt,
double psi)
119 size_t iniXdim, iniYdim, iniZdim, newXdim, newYdim, newZdim;
121 iniXdim =
XSIZE(muVol);
122 iniYdim =
YSIZE(muVol);
123 iniZdim =
ZSIZE(muVol);
167 imTemp.
write(
"IgeoVol.vol");
178 projTheo.
write(
"theproj.spi");
179 projNorm.
write(
"projNorm.spi");
184 double mean_error = 0;
198 mean_error /=
YXSIZE(mdaProjExp);
200 projNorm.
write(
"projNorm_2.spi");
202 imTemp().alias(Idiff);
203 imTemp.
write(
"iDiff.spi");
219 for (
int it=0; it<
Nit; it++)
223 for (
size_t objId :
MDin.
ids())
239 projExp().setXmippOrigin();
248 std::cerr <<
"Error at iteration " << it <<
" = " << itError << std::endl;
double singleStep(MultidimArray< double > &muVol, const Projection &projExp, double rot, double tilt, double psi)
void resize(size_t Ndim, size_t Zdim, size_t Ydim, size_t Xdim, bool copy=true)
double getDoubleParam(const char *param, int arg=0)
FileName fnDoc
Selfile with the input images.
double psi(const size_t n=0) const
#define FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY2D(m)
void Euler_angles2matrix(T alpha, T beta, T gamma, Matrix2D< T > &A, bool homogeneous)
void resizeNoCopy(const MultidimArray< T1 > &v)
FileName fnStart
Start Volume Filename.
#define DIRECT_A2D_ELEM(v, i, j)
void write(const FileName &name="", size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE, CastWriteMode castMode=CW_CAST, int _swapWrite=0)
#define MULTIDIM_ARRAY(v)
double rot(const size_t n=0) const
int projXdim
Projection X dimension.
FileName fnOut
Output filename.
double tilt(const size_t n=0) const
void projectXrayGridVolume(MultidimArray< double > &muVol, XRayPSF &psf, MultidimArray< double > &IgeoVol, Projection &proj, MultidimArray< double > *projNorm, int FORW, ThreadManager *thMgr)
Project as in an X-ray microscope using a grids and blobs.
double psfThr
threshold for psfSlabs
const char * getParam(const char *param, int arg=0)
void read(const FileName &fn, bool readVolume=true)
int Nit
Number of iterations.
void preProcess(Image< double > &volVoxels)
void calculateParams(double _dxo, double _dzo=-1, double threshold=0.)
Produce Side information.
int projYdim
Projection Y dimension.
MetaDataVec MDin
Metadata with projections info.
FileName fnPSF
psf Filename
void adjustParam()
Calculate if a resize of the X-Y plane is needed to avoid the Nyquist Limit.
XRayPSF psf
Microscope parameters.
double psi(const double x)
void read(const FileName &fn, const bool only_apply_shifts=false, DataMode datamode=DATA, MDRow *row=nullptr)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
void addUsageLine(const char *line, bool verbatim=false)
void setAngles(double _rot, double _tilt, double _psi)
void initZeros(const MultidimArray< T1 > &op)
int getIntParam(const char *param, int arg=0)
MultidimArray< double > IgeoVol
Vol with the Igeometrical distribution along specimen volume.
double sampling
Sampling rate.
void addParamsLine(const String &line)