34 addUsageLine(
"Iterative Data Refinement applied to the reconstruction of X-ray tomography projections.");
37 addParamsLine(
"-i <md_file> : Metadata file with input projections");
39 addParamsLine(
" [--oroot <rootname=\"idr_xray\">] : Rootname used for refined projections");
40 addParamsLine(
" [-o <Vol_file=\"idr_recon_vol.mrc\">] : Filename for refined output volume");
42 addParamsLine(
" [--start <start_vol_file=\"\">] : Start from this basis volume. The reconstruction is performed in the same grid as the one ");
45 addParamsLine(
"[--thr <threads=1>] : Number of concurrent threads.");
48 addParamsLine(
" [-l <...>] : Relaxation factor, by default 1.8 (recommended range 0.0 - 2.0). ");
49 addParamsLine(
" : A list of lambda values is also accepted as \"-l lambda0 lambda1 ...\"");
53 addParamsLine(
"[--recons <recons_type=ART>] : Reconstruction method to be used");
61 addParamsLine(
"[--psf <psf_param_file=\"\">] : XRay-Microscope parameters file. If not set, then default parameters are chosen.");
62 addParamsLine(
"[--threshold <thr=0.0>] :+ Normalized threshold relative to maximum of PSF to reduce the volume into slabs");
91 size_t listSize = list.size();
97 for (
size_t k = 0;
k < listSize;
k++)
159 conv.
read(arguments);
165 std::vector<MDLabel> desiredLabels;
194 double rot, tilt,
psi;
202 std::cout <<
"== Iteration " <<
iter << std::endl;
203 std::cout <<
"Projecting ..." <<std::endl;
213 double meanError = 0.;
234 fixedProj.
read(fnProj);
259 meanError += fabs(
dAi(mPrevFProj,
n) -
dAi(mFixedProj,
n));
270 std::cout <<
"Mean error = " << meanError <<std::endl;
272 std::cout <<
"Reconstructing ..." << std::endl;
300 double factor = 1/13.734;
314 FileName fnAngles(
"idr_xray_tomo_to_tomo3d_angles.txt");
315 std::vector<MDLabel> desiredLabels;
338 return system(exec.c_str());
346 formatString(
" -v 0 --thr %d -i %s -o %s",
nThr, input.c_str(), output.c_str());
359 program->read(arguments);
371 arguments +=
" -n 10";
373 arguments +=
" -l 0.2";
377 program->read(arguments);
int nThr
Number of threads;.
int itNum
Number of iterations.
double getDoubleParam(const char *param, int arg=0)
virtual void read(int argc, const char **argv, bool reportErrors=true)
void forcePositive(MultidimArray< double > &V)
FileName fnPSF
Xray Microscope PSF Parameters.
#define REPORT_ERROR(nerr, ErrormMsg)
FileName replaceExtension(const String &newExt) const
void reconstruct(const FileName &fnProjs, const FileName &fnVol)
FileName removePrefixNumber() const
FileName fnRootInter
Rootname for intermediate/exchange projections metadatas and files.
void initProgress(size_t total, size_t stepBin=60)
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)
ProgReconsBase * createReconsProgram(const FileName &input, const FileName &output)
void XrayRotateAndProjectVolumeOffCentered(XrayProjPhantom &phantom, XRayPSF &psf, Projection &P, Projection &standardP, int Ydim, int Xdim)
Image< double > iniVol
Phantom Xmipp volume.
Cannot read image from file.
FileName fnInputProjMD
Metadafile with angles and projection file names.
virtual void defineParams()
void getListParam(const char *param, StringVector &list)
XRayPSF psf
Xray PSF Object.
FileName fnOutVol
Reconstructed output volume file name.
std::vector< String > StringVector
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
FileName removeAllPrefixes() const
ProgReconsBase * reconsProgram
void log(Image< double > &op)
const char * getParam(const char *param, int arg=0)
virtual void readParams()
void read(const FileName &fn, bool readVolume=true)
FileName fnStart
Initial volume.
float textToFloat(const char *str)
int reconsTomo3D(const MetaData &MD, const FileName &fnOut, const String ¶ms)
#define FOR_ALL_DIRECT_ELEMENTS_IN_MULTIDIMARRAY(v)
int verbose
Switch to control verbose mode.
int verbose
Verbosity level.
bool contains(const String &str) const
void alias(const MultidimArray< T > &m)
#define STR_EQUAL(str1, str2)
void calculateParams(double _dxo, double _dzo=-1, double threshold=0.)
Produce Side information.
void setProgress(size_t value=0)
void read(const ParametersProjectionTomography &prm)
double psi(const double x)
double psfThr
threshold for psfSlabs
String formatString(const char *format,...)
void resizeNoCopy(int Xdim)
bool checkParam(const char *param)
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)
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)
Matrix1D< double > lambda_list
Relaxation parameter.
enum ProgIDRXrayTomo::@5 reconsMethod