Xmipp
v3.23.11-Nereus
|
#include <angular_projection_matching.h>
Public Member Functions | |
virtual void | readParams () |
Read arguments from command line. More... | |
virtual void | defineParams () |
Define arguments accepted. More... | |
void | show () |
void | run () |
virtual void | produceSideInfo () |
void | rotationallyAlignOneImage (Matrix2D< double > &img, int imgno, int &opt_samplenr, double &opt_psi, bool &opt_flip, double &maxcorr) |
void | translationallyAlignOneImage (MultidimArray< double > &img, const int &samplenr, const double &psi, const bool &opt_flip, double &opt_xoff, double &opt_yoff, double &maxcorr) |
void | scaleAlignOneImage (MultidimArray< double > &img, const int &samplenr, const double &psi, const bool &opt_flip, const double &opt_xoff, const double &opt_yoff, const double &old_scale, double &opt_scale, double &maxcorr) |
void | getCurrentReference (int refno, Polar_fftw_plans &local_plans) |
virtual void | processAllImages () |
void | processSomeImages (const std::vector< size_t > &imagesToProcess) |
void | getCurrentImage (size_t imgid, Image< double > &img) |
virtual void | writeOutputFiles () |
void | destroyAndClean () |
Public Member Functions inherited from XmippProgram | |
const char * | getParam (const char *param, int arg=0) |
const char * | getParam (const char *param, const char *subparam, int arg=0) |
int | getIntParam (const char *param, int arg=0) |
int | getIntParam (const char *param, const char *subparam, int arg=0) |
double | getDoubleParam (const char *param, int arg=0) |
double | getDoubleParam (const char *param, const char *subparam, int arg=0) |
float | getFloatParam (const char *param, int arg=0) |
float | getFloatParam (const char *param, const char *subparam, int arg=0) |
void | getListParam (const char *param, StringVector &list) |
int | getCountParam (const char *param) |
bool | checkParam (const char *param) |
bool | existsParam (const char *param) |
void | addParamsLine (const String &line) |
void | addParamsLine (const char *line) |
ParamDef * | getParamDef (const char *param) const |
virtual void | quit (int exit_code=0) const |
virtual int | tryRun () |
void | initProgress (size_t total, size_t stepBin=60) |
void | setProgress (size_t value=0) |
void | endProgress () |
void | processDefaultComment (const char *param, const char *left) |
void | setDefaultComment (const char *param, const char *comment) |
virtual void | initComments () |
void | setProgramName (const char *name) |
void | addUsageLine (const char *line, bool verbatim=false) |
void | clearUsage () |
void | addExampleLine (const char *example, bool verbatim=true) |
void | addSeeAlsoLine (const char *seeAlso) |
void | addKeywords (const char *keywords) |
const char * | name () const |
virtual void | usage (int verb=0) const |
virtual void | usage (const String ¶m, int verb=2) |
int | version () const |
virtual void | show () const |
virtual void | read (int argc, const char **argv, bool reportErrors=true) |
virtual void | read (int argc, char **argv, bool reportErrors=true) |
void | read (const String &argumentsLine) |
XmippProgram () | |
XmippProgram (int argc, const char **argv) | |
virtual | ~XmippProgram () |
Additional Inherited Members | |
Protected Member Functions inherited from XmippProgram | |
void | defineCommons () |
Protected Attributes inherited from XmippProgram | |
int | errorCode |
ProgramDef * | progDef |
Program definition and arguments parser. More... | |
std::map< String, CommentList > | defaultComments |
int | argc |
Original command line arguments. More... | |
const char ** | argv |
projection_matching parameters.
Definition at line 64 of file angular_projection_matching.h.
|
virtual |
Define arguments accepted.
Reimplemented from XmippProgram.
Reimplemented in MpiProgAngularProjectionMatching.
Definition at line 83 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::destroyAndClean | ( | ) |
destroy and clean
Definition at line 197 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::getCurrentImage | ( | size_t | imgid, |
Image< double > & | img | ||
) |
Read current image into memory and translate according to previous optimal Xoff and Yoff
Definition at line 1194 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::getCurrentReference | ( | int | refno, |
Polar_fftw_plans & | local_plans | ||
) |
Get pointer to the current reference image If this image wasn't stored in memory yet, read it from disc and store FT of the polar transform as well as the original image
a delete _DATA_ALL
Definition at line 408 of file angular_projection_matching.cpp.
|
virtual |
Get images to process. This function will return the id's of images to process. It will be specially useful for MPI case when images will be distributed by the master node. Return false if there aren't more images to process
Reimplemented in MpiProgAngularProjectionMatching.
Definition at line 977 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::processSomeImages | ( | const std::vector< size_t > & | imagesToProcess | ) |
Loop over all images
a
Definition at line 991 of file angular_projection_matching.cpp.
|
virtual |
Make shiftmask and calculate nr_psi
Reimplemented in MpiProgAngularProjectionMatching.
Definition at line 209 of file angular_projection_matching.cpp.
|
virtual |
Read arguments from command line.
Reimplemented from XmippProgram.
Reimplemented in MpiProgAngularProjectionMatching.
Definition at line 44 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::rotationallyAlignOneImage | ( | Matrix2D< double > & | img, |
int | imgno, | ||
int & | opt_samplenr, | ||
double & | opt_psi, | ||
bool & | opt_flip, | ||
double & | maxcorr | ||
) |
Rotational alignment using polar coordinates The input image is assumed to be in FTs of polar rings
|
virtual |
Run.
Reimplemented from XmippProgram.
Definition at line 182 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::scaleAlignOneImage | ( | MultidimArray< double > & | img, |
const int & | samplenr, | ||
const double & | psi, | ||
const bool & | opt_flip, | ||
const double & | opt_xoff, | ||
const double & | opt_yoff, | ||
const double & | old_scale, | ||
double & | opt_scale, | ||
double & | maxcorr | ||
) |
Translational alignment using cartesian coordinates The optimal direction is re-projected from the volume
a
Definition at line 871 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::show | ( | ) |
Show.
Definition at line 124 of file angular_projection_matching.cpp.
void ProgAngularProjectionMatching::translationallyAlignOneImage | ( | MultidimArray< double > & | img, |
const int & | samplenr, | ||
const double & | psi, | ||
const bool & | opt_flip, | ||
double & | opt_xoff, | ||
double & | opt_yoff, | ||
double & | maxcorr | ||
) |
Translational alignment using cartesian coordinates The optimal direction is re-projected from the volume
Definition at line 776 of file angular_projection_matching.cpp.
|
virtual |
Write out results to disk This function should be override in MPI class, only master should write.
Reimplemented in MpiProgAngularProjectionMatching.
Definition at line 1238 of file angular_projection_matching.cpp.
double ProgAngularProjectionMatching::avail_memory |
Available memory for storage of all references (in Gb)
Definition at line 84 of file angular_projection_matching.h.
std::vector<size_t> ProgAngularProjectionMatching::convert_refno_to_stack_position |
Vector to assign reference number to stack positions
Definition at line 100 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::counter_refs_in_memory |
Counter for current filling of memory with references
Definition at line 95 of file angular_projection_matching.h.
MetaDataDb ProgAngularProjectionMatching::DFexp |
Docfile with experimental images
Definition at line 72 of file angular_projection_matching.h.
MetaDataDb ProgAngularProjectionMatching::DFo |
Docfile with results
Definition at line 74 of file angular_projection_matching.h.
size_t ProgAngularProjectionMatching::dim |
dimension of the images and padded images
Definition at line 76 of file angular_projection_matching.h.
WriteModeMetaData ProgAngularProjectionMatching::do_overwrite |
Definition at line 137 of file angular_projection_matching.h.
bool ProgAngularProjectionMatching::do_scale |
scale params
Definition at line 136 of file angular_projection_matching.h.
FileName ProgAngularProjectionMatching::fn_ctf |
Definition at line 70 of file angular_projection_matching.h.
FileName ProgAngularProjectionMatching::fn_exp |
Filenames
Definition at line 70 of file angular_projection_matching.h.
FileName ProgAngularProjectionMatching::fn_out |
Definition at line 70 of file angular_projection_matching.h.
FileName ProgAngularProjectionMatching::fn_ref |
Definition at line 70 of file angular_projection_matching.h.
Polar<std::complex<double> > * ProgAngularProjectionMatching::fP_img |
Definition at line 104 of file angular_projection_matching.h.
Polar<std::complex<double> >* ProgAngularProjectionMatching::fP_ref |
Array with Polars of references and of translated images and their mirrors
Definition at line 104 of file angular_projection_matching.h.
Polar<std::complex<double> > * ProgAngularProjectionMatching::fPm_img |
Definition at line 104 of file angular_projection_matching.h.
Polar_fftw_plans ProgAngularProjectionMatching::global_plans |
Global plans for fftw transformers of all polar rings
Definition at line 108 of file angular_projection_matching.h.
std::vector<size_t> ProgAngularProjectionMatching::ids |
Array containing the images ids in metadata
Definition at line 102 of file angular_projection_matching.h.
bool ProgAngularProjectionMatching::loop_forward_refs |
Flag whether to loop from low to high or from high to low through the references
Definition at line 115 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::max_nr_imgs_in_memory |
Maximum number of references that can be stored in memory The difference between this and the previous varible is that the previous one is the MIN(max_nr_refs_in_memory, number of references)
Definition at line 91 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::max_nr_refs_in_memory |
Maximum number of references to store in memory
Definition at line 86 of file angular_projection_matching.h.
double ProgAngularProjectionMatching::max_shift |
Maximum allowed shift
Definition at line 80 of file angular_projection_matching.h.
MultidimArray<double> ProgAngularProjectionMatching::Mctf |
CTF image
Definition at line 123 of file angular_projection_matching.h.
Sampling ProgAngularProjectionMatching::mysampling |
sampling object
Definition at line 112 of file angular_projection_matching.h.
size_t ProgAngularProjectionMatching::nr_trans |
Number of translations in 5D search
Definition at line 131 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::numOrientations |
Definition at line 129 of file angular_projection_matching.h.
double ProgAngularProjectionMatching::pad |
Padding factor (only for applying CTF to references)
Definition at line 78 of file angular_projection_matching.h.
size_t ProgAngularProjectionMatching::paddim |
Definition at line 76 of file angular_projection_matching.h.
bool ProgAngularProjectionMatching::phase_flipped |
Are the experimental images phase flipped?
Definition at line 125 of file angular_projection_matching.h.
std::vector<int> ProgAngularProjectionMatching::pointer_allrefs2refsinmem |
Pointers for reference retrieval
Definition at line 97 of file angular_projection_matching.h.
std::vector<int> ProgAngularProjectionMatching::pointer_refsinmem2allrefs |
Definition at line 98 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::progress_bar_step |
Progress bar
Definition at line 142 of file angular_projection_matching.h.
MultidimArray<double>* ProgAngularProjectionMatching::proj_ref |
Array with reference images
Definition at line 106 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::Ri |
Inner and outer radii to limit the rotational search
Definition at line 82 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::Ro |
Definition at line 82 of file angular_projection_matching.h.
double ProgAngularProjectionMatching::scale_nsteps |
Definition at line 139 of file angular_projection_matching.h.
double ProgAngularProjectionMatching::scale_step |
Definition at line 138 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::search5d_shift |
5D-search: maximum offsets (+/- pixels)
Definition at line 117 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::search5d_step |
5D-search: offset step (pixels)
Definition at line 119 of file angular_projection_matching.h.
std::vector<int> ProgAngularProjectionMatching::search5d_xoff |
5D-search: actual displacement vectors
Definition at line 121 of file angular_projection_matching.h.
std::vector<int> ProgAngularProjectionMatching::search5d_yoff |
Definition at line 121 of file angular_projection_matching.h.
double * ProgAngularProjectionMatching::stddev_img |
Definition at line 110 of file angular_projection_matching.h.
double* ProgAngularProjectionMatching::stddev_ref |
vector with stddevs for all reference projections
Definition at line 110 of file angular_projection_matching.h.
barrier_t ProgAngularProjectionMatching::thread_barrier |
Thread barrier
Definition at line 133 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::threads |
Threads
Definition at line 127 of file angular_projection_matching.h.
int ProgAngularProjectionMatching::total_nr_refs |
Total number of references
Definition at line 93 of file angular_projection_matching.h.