76 std::cout <<
"Reference images: " <<
fn_ref << std::endl
81 <<
"smin: " <<
smin << std::endl
82 <<
"smax: " <<
smax << std::endl
83 <<
"Pick: " <<
pick << std::endl
84 <<
"Show level: " <<
tell << std::endl
85 <<
"5D search: " <<
search5D << std::endl
93 addUsageLine(
"Make a projection assignment using wavelets on a discrete library of projections");
94 addUsageLine(
"+This program assigns Euler angles to experimental projections by matching ");
95 addUsageLine(
"+with ideal projections. This matching is done via a DWT correlation. For ");
96 addUsageLine(
"+every experimental projection, different in-plane rotations and shifts are ");
97 addUsageLine(
"+tried (by exhaustive search). For each possible combination of these two ");
98 addUsageLine(
"+variables, the best correlating ideal projection is sought using a fast ");
100 addUsageLine(
"+The method is fully described at http://www.ncbi.nlm.nih.gov/pubmed/15099579");
103 defaultComments[
"-i"].addComment(
"+ Alignment parameters can be provided ");
104 defaultComments[
"-i"].addComment(
"+ Only the shifts are taken in consideration ");
105 defaultComments[
"-i"].addComment(
"+ in global searches; in local searches, all ");
106 defaultComments[
"-i"].addComment(
"+ parameters in the initial docfile are considered.");
110 addParamsLine(
" --ref <selfile> : Metadata with the reference images and their angles");
111 addParamsLine(
" :+Must be created with [[angular_project_library_v3][angular_project_library]]");
112 addParamsLine(
" [--sym <symmetry_file=\"\">] : Symmetry file if any");
113 addParamsLine(
" :+The definition of the symmetry is described at [[transform_symmetrize_v3][transform_symmetrize]]");
114 addParamsLine(
" [--max_shift_change <r=0>] : Maximum change allowed in shift");
115 addParamsLine(
" [--psi_step <ang=5>] : Step in psi in degrees");
116 addParamsLine(
" [--shift_step <r=1>] : Step in shift in pixels");
118 addParamsLine(
" [--search5D] : Perform a 5D search instead of 3D+2D");
119 addParamsLine(
" [--dont_check_mirrors] : Do not check mirrors of the input images");
120 addParamsLine(
" :+In this case, the projection library should have the mirrors.");
121 addParamsLine(
" [--max_proj_change <ang=-1>] : Maximum change allowed in rot-tilt");
122 addParamsLine(
" [--max_psi_change <ang=-1>] : Maximum change allowed in psi");
123 addParamsLine(
" [--keep <th=50>] : How many images are kept each round (%)");
124 addParamsLine(
" [--smin <s=1>] : Finest scale to consider (lowest value=0)");
125 addParamsLine(
" [--smax <s=-1>] : Coarsest scale to consider (highest value=log2(Xdim))");
126 addParamsLine(
" [--pick <mth=1>] : 0 --> maximum of the first group");
128 addParamsLine(
" [--show_rot_tilt] : Show the rot-tilt process");
129 addParamsLine(
" [--show_psi_shift] : Show the psi-shift process");
130 addParamsLine(
" [--show_options] : Show final options among which");
133 addExampleLine(
"xmipp_angular_project_library -i referenceVolume.vol -o reference.stk --sampling_rate 5");
134 addExampleLine(
"xmipp_angular_discrete_assign -i projections.sel -o discrete_assignment.xmd --ref reference.doc");
142 size_t refYdim, refXdim, refZdim, refNdim;
146 "reference images must be of a size that is power of 2");
175 Mask.
R1 =
CEIL((
double)refXdim / 2.0);
176 Mask.
resize(refYdim, refXdim);
181 for (
int q = 0; q <= 3; q++)
183 if (q == 0 && s !=
smax)
233 std::cerr <<
"Generating reference library ...\n";
236 int n = 0, nstep =
XMIPP_MAX(1, number_of_imgs / 60);
243 I().statisticsAdjust(0., 1.);
251 double coef = I(
i,
j), coef2 = coef * coef;
253 for (
int mp = m; mp <
SBNo; mp++)
259 if (++n % nstep == 0 &&
verbose)
268 bool *candidate_list, std::vector<double> &cumulative_corr,
269 std::vector<double> &sumxy)
271 int refNo =
rot.size();
272 cumulative_corr.resize(refNo);
274 for (
int i = 0;
i < refNo;
i++)
276 candidate_list[
i] =
true;
277 sumxy[
i] = cumulative_corr[
i] = 0;
280 double dummy_rot =
rot[
i], dummy_tilt =
tilt[
i], dummy_psi;
283 dummy_rot, dummy_tilt, dummy_psi,
288 std::cout <<
"(" << I.
rot() <<
"," << I.
tilt() <<
") and (" 289 <<
rot[
i] <<
"," <<
tilt[
i] <<
") --> " << ang_distance << std::endl;
300 bool *candidate_list, std::vector<double> &cumulative_corr,
305 int imax =
rot.size();
307 std::vector<double> sortedCorr;
308 sortedCorr.reserve(imax);
309 for (
int i = 0;
i < imax;
i++)
311 if (candidate_list[
i])
315 unsigned long jmax=4*(dimp/4);
316 for (
int j = 0;
j < dimp;
j+=4)
326 for (
int j = jmax+1;
j<dimp;++
j)
333 cumulative_corr[
i] = corr;
334 sortedCorr.push_back(corr);
338 std::cout <<
"Candidate " << i <<
" corr= " << cumulative_corr[
i]
339 <<
" rot= " <<
rot[
i] <<
" tilt= " <<
tilt[
i] << std::endl;
343 std::sort(sortedCorr.begin(),sortedCorr.end());
344 auto idx=(int)
floor(sortedCorr.size()*(1-th/100.0));
346 double corr_th = sortedCorr[idx];
349 for (
int i = 0;
i < imax;
i++)
350 if (candidate_list[
i])
351 candidate_list[
i] = (cumulative_corr[
i] >= corr_th);
355 std::cout <<
"# Percentil " << corr_th << std::endl << std::endl;
360 double &assigned_rot,
double &assigned_tilt,
int &best_ref_idx)
365 "experimental images must be of a size that is power of 2");
368 auto* candidate_list=
new bool[
rot.size()];
369 std::vector<double> cumulative_corr;
370 std::vector<double> sumxy;
374 std::vector<Matrix1D<double> * > Idwt;
383 Idwt.push_back(subband);
386 I().statisticsAdjust(0., 1.);
394 (*(Idwt[
m]))(SBidx(m)++) = coef;
395 for (
int mp = m; mp <
SBNo; mp++)
407 std::cout <<
"# " << I.
name() <<
" m=" <<
m 408 <<
" current rot=" << I.
rot()
409 <<
" current tilt=" << I.
tilt() << std::endl;
411 candidate_list, cumulative_corr,
419 int imax =
rot.size();
420 for (
int i = 0;
i < imax;
i++)
421 if (candidate_list[
i])
429 else if (cumulative_corr[i] > cumulative_corr[best_i])
431 else if (cumulative_corr[i] == cumulative_corr[best_i])
438 std::cerr <<
"Predict_angles: Empty candidate list for image " 439 << I.
name() << std::endl;
440 assigned_rot = I.
rot();
441 assigned_tilt = I.
tilt();
449 for (
int i = 0; i < imax && selected >= 0; i++)
450 if (candidate_list[i])
451 if (cumulative_corr[i] == cumulative_corr[best_i])
462 assigned_rot =
rot[best_i];
463 assigned_tilt =
tilt[best_i];
464 best_ref_idx = best_i;
465 delete [] candidate_list;
466 return cumulative_corr[best_i];
471 const std::vector<double> &vscore,
472 const std::vector<int> &candidate_idx,
473 std::vector<double> &candidate_rate,
double weight)
476 int imax = vscore.size();
477 double min_score, max_score;
478 min_score = max_score = vscore[0];
479 for (
int i = 1;
i < imax;
i++)
481 if (vscore[
i] < min_score)
482 min_score = vscore [
i];
483 if (vscore[
i] > max_score)
484 max_score = vscore [
i];
488 double score_step = (max_score - min_score) / 10;
490 int jmax = candidate_idx.size();
491 for (
int j = 0;
j < jmax;
j++)
493 int i = candidate_idx[
j];
496 points =
FLOOR((vscore[i] - min_score) / score_step);
500 std::cout <<
"Candidate (" << i <<
") score=" << vscore[
i]
501 <<
" points=" << points << std::endl;
502 candidate_rate[
j] += weight * points;
506 std::cout <<
"Evaluation:" << candidate_rate << std::endl
507 <<
"Threshold for obtaining a 7 in score: " 508 << min_score + 7*score_step << std::endl;
509 return min_score + 7*score_step;
515 const std::vector<double> &vtilt,
const std::vector<double> &vpsi,
516 const std::vector<int> &best_idx,
const std::vector<int> &candidate_idx,
517 std::vector< std::vector<int> > &groups)
519 for (
size_t j = 0;
j < best_idx.size();
j++)
521 int i = candidate_idx[best_idx[
j]];
524 std::cout <<
"Looking for a group for image " << best_idx[
j] << std::endl;
527 double roti = vrot[
i];
528 double tilti = vtilt[
i];
529 double psii = vpsi[
i];
531 bool assigned =
false;
533 for (g = 0; g < groups.size(); g++)
536 for (
size_t jp = 0; jp < groups[
g].size(); jp++)
538 int ip = candidate_idx[groups[
g][jp]];
540 vrot[ip], vtilt[ip], vpsi[ip],
541 roti, tilti, psii,
false,
false,
false);
544 std::cout <<
" comparing with " << groups[
g][jp] <<
" d=" 545 << ang_distance << std::endl;
548 if (ang_distance > 15)
564 std::cout <<
"Creating a new group\n";
567 std::vector<int> group;
568 group.push_back(best_idx[
j]);
569 groups.push_back(group);
574 std::cout <<
"Assigning to group " << g << std::endl;
577 groups[
g].push_back(best_idx[
j]);
584 if (groups.size() == best_idx.size())
587 std::vector<int> group;
588 for (
size_t j = 0;
j < best_idx.size();
j++)
589 group.push_back(best_idx[
j]);
590 groups.push_back(group);
597 std::vector< std::vector<int> > &groups,
598 std::vector<double> &vscore,
599 const std::vector<int> &candidate_idx,
const std::vector<double> &candidate_rate)
604 double best_rate = -1e38;
605 int best_j=0, jmax = groups[0].size();
606 for (
int j = 0;
j < jmax;
j++)
608 if (vscore[candidate_idx[groups[0][
j]]] > best_rate)
611 best_rate = vscore[candidate_idx[groups[0][
j]]];
613 return groups[0][best_j];
615 else if (method == 1)
618 std::vector<double> group_rate;
619 group_rate.reserve(groups.size());
621 double best_group_rate = -1e38;
622 for (
size_t g = 0;
g < groups.size();
g++)
624 double temp_group_rate = 0;
625 for (
size_t j = 0;
j < groups[
g].size();
j++)
626 temp_group_rate += candidate_rate[groups[
g][
j]];
627 group_rate.push_back(temp_group_rate);
628 if (temp_group_rate > best_group_rate)
631 best_group_rate = group_rate[
g];
636 int groups_with_max_rate = 0;
637 for (
size_t g = 0;
g < groups.size();
g++)
638 if (group_rate[
g] == best_group_rate)
639 groups_with_max_rate++;
642 if (groups_with_max_rate > 1)
644 std::cout <<
"There are two groups with maximum rate\n";
650 double best_rate = -1e38;
651 for (
size_t j = 0;
j < groups[best_g].size();
j++)
655 if (candidate_rate[groups[best_g][
j]] > best_rate)
658 best_rate = candidate_rate[groups[best_g][
j]];
662 if (vscore[candidate_idx[groups[best_g][
j]]] > best_rate)
665 best_rate = vscore[candidate_idx[groups[best_g][
j]]];
670 int images_with_max_rate = 0;
671 for (
size_t j = 0;
j < groups[best_g].size();
j++)
674 if (candidate_rate[groups[best_g][
j]] == best_rate)
675 images_with_max_rate++;
678 if (vscore[candidate_idx[groups[best_g][
j]]] == best_rate)
679 images_with_max_rate++;
680 if (images_with_max_rate > 1)
684 double best_score = -1e38;
685 for (
size_t j = 0;
j < groups[best_g].size();
j++)
687 if (vscore[candidate_idx[groups[best_g][
j]]] > best_score &&
688 candidate_rate[groups[best_g][
j]] == best_rate)
691 best_score = vscore[candidate_idx[groups[best_g][
j]]];
695 return groups[best_g][best_j];
714 double best_rot, best_tilt, best_psi, best_shiftX, best_shiftY,
715 best_score = 0, best_rate;
722 double Xoff = img.
Xoff();
723 double Yoff = img.
Yoff();
741 std::vector<double> vshiftX, vshiftY, vpsi, vrot, vtilt, vcorr,
742 vproj_error, vproj_compact, vang_jump, vscore;
743 std::vector<int> vref_idx;
747 max_shift_change = 0;
751 img.
write(
"PPPoriginal.xmp");
752 double bestCorr=-1e38;
762 if ((shiftX - Xoff) * (shiftX - Xoff) + (shiftY - Yoff) * (shiftY - Yoff) > R2)
774 if (shiftX != 0 || shiftY != 0)
791 double proj_error = 0.0, proj_compact = 0.0;
799 double aux_rot = rotp, aux_tilt = tiltp, aux_psi =
psi;
802 aux_rot, aux_tilt, aux_psi,
803 false,
false,
false);
805 double shiftXp = shiftX;
806 double shiftYp = shiftY;
812 double newrot, newtilt, newpsi;
819 vshiftX.push_back(shiftXp);
820 vshiftY.push_back(shiftYp);
821 vrot.push_back(rotp);
822 vtilt.push_back(tiltp);
823 vpsi.push_back(psip);
824 vcorr.push_back(corrp);
825 vproj_error.push_back(proj_error);
826 vproj_compact.push_back(proj_compact);
827 vang_jump.push_back(ang_jump);
828 vref_idx.push_back(best_ref_idx);
832 if (corrp > bestCorr)
834 Ipsave.
write(
"PPPafter_denoising.xmp");
837 Iref.
write(
"PPPref.xmp");
838 std::cerr <<
"This is index " << vcorr.size() - 1 << std::endl;
839 std::cerr <<
"corrp=" << corrp <<
"\nPress any key\n";
852 double max_corr = vcorr[0], min_corr = vcorr[0];
853 double max_proj_error = vproj_error[0], min_proj_error = vproj_error[0];
854 double max_proj_compact = vproj_compact[0], min_proj_compact = vproj_compact[0];
855 for (
int i = 1;
i < N_trials;
i++)
858 if (vproj_error[
i] < min_proj_error)
859 min_proj_error = vproj_error[
i];
860 if (vproj_error[
i] > max_proj_error)
861 max_proj_error = vproj_error[
i];
864 if (vcorr[
i] < min_corr)
866 if (vcorr[
i] > max_corr)
870 if (vproj_compact[
i] < min_proj_compact)
871 min_proj_compact = vproj_compact[
i];
872 if (vproj_compact[
i] > max_proj_compact)
873 max_proj_compact = vproj_compact[
i];
877 vscore.reserve(vcorr.size());
878 for (
int i = 0;
i < N_trials;
i++)
880 vscore.push_back(vcorr[
i]);
882 std::cout <<
"i=" << i
883 <<
" shiftX= " << vshiftX[
i] <<
" shiftY= " << vshiftY[
i]
884 <<
" psi= " << vpsi[
i]
885 <<
" rot= " << vrot[
i]
886 <<
" tilt= " << vtilt[
i]
887 <<
" score= " << vscore[
i]
888 <<
" corr= " << vcorr[
i]
889 <<
" proj_error= " << vproj_error[
i]
890 <<
" proj_compact= " << vproj_compact[
i]
891 <<
" refidx= " << vref_idx[
i]
892 <<
" ang_jump= " << vang_jump[
i]
898 realWRAP(vpsi[N_trials-1], -180, 180);
901 double avg_score_maxima = 0;
902 std::vector<int> local_maxima;
904 std::cout <<
"Local maxima\n";
905 for (
int i = 0;
i < N_trials;
i++)
908 int il =
i - 1,
ir =
i + 1;
909 if (
i == 0 && circular)
911 else if (
i == N_trials - 1)
921 bool is_local_maxima =
true;
923 if (vscore[il] >= vscore[
i])
924 is_local_maxima =
false;
926 if (vscore[ir] >= vscore[i])
927 is_local_maxima =
false;
930 if (is_local_maxima )
931 avg_score_maxima += vscore[
i];
932 if (is_local_maxima )
934 local_maxima.push_back(i);
935 if (
tell & TELL_PSI_SHIFT)
936 std::cout <<
"i= " << i
937 <<
" psi= " << vpsi[
i] <<
" rot= " << vrot[
i] <<
" tilt= " 938 << vtilt[
i] <<
" score= " << vscore[
i] << std::endl;
941 avg_score_maxima /= local_maxima.size();
942 if (
tell & TELL_PSI_SHIFT)
943 std::cout <<
"Avg_maxima=" << avg_score_maxima << std::endl;
946 int jmax = local_maxima.size();
947 std::vector<int> candidate_local_maxima;
948 std::vector<double> candidate_rate;
949 if (
tell & TELL_PSI_SHIFT)
950 std::cout <<
"Keeping ...\n";
951 for (
int j = 0;
j < jmax;
j++)
953 int i = local_maxima[
j];
954 if (vscore[i] >= avg_score_maxima)
956 candidate_local_maxima.push_back(i);
957 candidate_rate.push_back(0);
958 if (
tell & TELL_PSI_SHIFT)
959 std::cout <<
"i= " << i
960 <<
" psi= " << vpsi[
i] <<
" rot= " << vrot[
i] <<
" tilt= " 961 << vtilt[
i] <<
" score= " << vscore[
i] << std::endl;
964 jmax = candidate_local_maxima.size();
970 if (
tell & TELL_PSI_SHIFT)
971 std::cout <<
"\nSelecting image\n";
973 for (
int j = 0;
j < jmax;
j++)
974 score(
j) = vscore[candidate_local_maxima[
j]];
980 std::cout << img.
name() << std::endl;
982 for (
int j = 0;
j < jmax;
j++)
984 int jp = idx_score(
j) - 1;
985 int i = candidate_local_maxima[jp];
986 std::cout <<
"i= " << i
987 <<
" psi= " << vpsi[
i] <<
" rot= " << vrot[
i] <<
" tilt= " 989 <<
" score= " << vscore[
i]
990 <<
" corr= " << vcorr[
i]
991 <<
" error= " << vproj_error[
i]
992 <<
" compact= " << vproj_compact[
i]
993 <<
" angjump= " << vang_jump[
i]
994 <<
" rate=" << candidate_rate[jp]
995 <<
" reference image #=" << vref_idx[
i] + 1 << std::endl;
997 std::cout << std::endl;
1002 int jtop = jmax - 1;
1003 std::vector<int> best_idx;
1004 int max_score_diff = 1;
1006 candidate_rate[idx_score(jmax-1)-1] -
1007 candidate_rate[idx_score(jtop-1)-1] <= max_score_diff)
1009 best_idx.push_back(idx_score(jtop) - 1);
1012 best_idx.push_back(idx_score(jtop) - 1);
1013 if (
tell & TELL_PSI_SHIFT)
1014 std::cout <<
"Best indices: " << best_idx << std::endl;
1018 if (jtop == jmax - 1)
1021 jbest = best_idx[0];
1022 ibest = candidate_local_maxima[jbest];
1028 std::vector< std::vector<int> > groups;
1029 group_views(vrot, vtilt, vpsi, best_idx, candidate_local_maxima, groups);
1030 if (
tell & TELL_PSI_SHIFT)
1031 std::cout <<
"Partition: " << groups << std::endl;
1035 candidate_local_maxima, candidate_rate);
1036 ibest = candidate_local_maxima[jbest];
1046 Iref().setXmippOrigin();
1048 if (Xoff == 0 && Yoff == 0)
1055 Ip().setXmippOrigin();
1057 double shiftX, shiftY;
1059 bestShift(Iref(), Ip(), shiftX, shiftY, aux);
1060 if (shiftX*shiftX + shiftY*shiftY > R2)
1062 shiftX = shiftY = 0;
1064 vshiftX[ibest] = Xoff + shiftX;
1065 vshiftY[ibest] = Yoff + shiftY;
1066 max_shift_change = backup_max_shift_change;
1070 best_rot = vrot[ibest];
1071 best_tilt = vtilt[ibest];
1072 best_psi = vpsi[ibest];
1073 best_shiftX = vshiftX[ibest];
1074 best_shiftY = vshiftY[ibest];
1075 best_score = vscore[ibest];
1076 best_rate = candidate_rate[jbest];
1080 std::cout <<
"Originally it had, psi=" << img.
psi() <<
" rot=" << img.
rot()
1081 <<
" tilt=" << img.
tilt() << std::endl;
1082 std::cout <<
"Finally I choose: ";
1083 if (
tell & TELL_PSI_SHIFT)
1084 std::cout << jbest <<
"\n";
1085 std::cout <<
"psi= " << best_psi <<
" rot= " << best_rot <<
" tilt= " 1086 << best_tilt <<
" shiftX=" << best_shiftX
1087 <<
" shiftY=" << best_shiftY <<
" score= " << best_score
1088 <<
" rate= " << best_rate << std::endl << std::endl;
Just to locate unclassified errors.
#define VECTOR_R2(v, x, y)
void init_progress_bar(long total)
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
void set_DWT_type(int DWT_type)
void resize(size_t Ndim, size_t Zdim, size_t Ydim, size_t Xdim, bool copy=true)
int Get_Max_Scale(int size)
double getDoubleParam(const char *param, int arg=0)
__host__ __device__ float2 floor(const float2 v)
ProgAngularDistance distance_prm
void group_views(const std::vector< double > &vrot, const std::vector< double > &vtilt, const std::vector< double > &vpsi, const std::vector< int > &best_idx, const std::vector< int > &candidate_idx, std::vector< std::vector< int > > &groups)
#define REPORT_ERROR(nerr, ErrormMsg)
double psi(const size_t n=0) const
#define FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY2D(m)
int pick_view(int method, std::vector< std::vector< int > > &groups, std::vector< double > &vscore, const std::vector< int > &candidate_idx, const std::vector< double > &candidate_rates)
void sqrt(Image< double > &op)
std::vector< double > rot
#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)
void Euler_mirrorY(double rot, double tilt, double psi, double &newrot, double &newtilt, double &newpsi)
const FileName & name() const
double rot(const size_t n=0) const
Incorrect MultidimArray size.
void setPsi(double psi, const size_t n=0)
int readApplyGeo(const FileName &name, const MDRow &row, const ApplyGeoParams ¶ms=DefaultApplyGeoParams)
#define FOR_ALL_ELEMENTS_IN_ARRAY2D(m)
void refine_candidate_list_with_correlation(int m, Matrix1D< double > &dwt, bool *candidate_list, std::vector< double > &cumulative_corr, Matrix1D< double > &x_power, std::vector< double > &sumxy, double th=50)
void defineParams()
Usage.
double tilt(const size_t n=0) const
void build_ref_candidate_list(const Image< double > &I, bool *candidate_list, std::vector< double > &cumulative_corr, std::vector< double > &sumxy)
void readParams()
Read argument from command line.
double computeDistance(double rot1, double tilt1, double psi1, double &rot2, double &tilt2, double &psi2, bool projdir_mode, bool check_mirrors, bool object_rotation=false, bool write_mirrors=true)
const char * getParam(const char *param, int arg=0)
void DWT(const MultidimArray< T > &v, MultidimArray< double > &result, int isign=1)
MultidimArray< int > Mask_no
std::vector< MultidimArray< double > > library
void resize(size_t Xdim, bool copy=true)
double Yoff(const size_t n=0) const
double evaluate_candidates(const std::vector< double > &vscore, const std::vector< int > &candidate_idx, std::vector< double > &candidate_rate, double weight)
void progress_bar(long rlen)
void addExampleLine(const char *example, bool verbatim=true)
int verbose
Verbosity level.
void sort(struct DCEL_T *dcel)
#define BINARY_DWT_CIRCULAR_MASK
ProgAngularDiscreteAssign()
Empty constructor.
#define NEXT_POWER_OF_2(x)
std::vector< FileName > library_name
void setValue(MDLabel label, const T &d, bool addLabel=true)
void generate_mask(bool apply_geo=false)
void translate(PDB *pdb_original, PDB *pdb_move, unsigned num_atoms, double x0, double y0, double z0)
virtual bool containsLabel(MDLabel label) const =0
double predict_rot_tilt_angles(Image< double > &I, double &assigned_rot, double &assigned_tilt, int &best_ref_idx)
double psi(const double x)
double Xoff(const size_t n=0) const
std::string Quadrant2D(int q)
std::vector< double > tilt
#define realWRAP(x, x0, xF)
template float bestShift(MultidimArray< float > &, float &, float &, const MultidimArray< int > *, int)
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 initZeros(const MultidimArray< T1 > &op)
const MultidimArray< int > & get_binary_mask() const
int getIntParam(const char *param, int arg=0)
void indexSort(MultidimArray< int > &indx) const
void addParamsLine(const String &line)
MultidimArray< double > library_power
std::map< String, CommentList > defaultComments
void setGeo(const MDRow &row, size_t n=0)