 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
35 while ( field && field->
id != field_id )
68 switch ( mg_select ) {
86 error_show(
"Error: No appropriate micrograph has been selected!", __FILE__, __LINE__);
109 for ( i=1, mg = field->
mg; mg && i < n; mg = mg->next, i++ ) ;
112 cerr <<
"Error: The micrograph index you wish to find (" << n <<
") is greater" << endl;
113 cerr <<
"than the number of micrographs (" << i <<
") in the field (" << field->
id <<
")" << endl;
152 float* focal_series =
new float[nmgs];
155 for ( i = 0, mg = field->
mg; mg; mg = mg->
next, i++ ) {
158 else cerr <<
"Warning in field_find_micrograph_by_focus: CTF structure not allocated!" << endl;
161 qsort((
void *) focal_series, nmgs,
sizeof(
float), (
int (*)(
const void *,
const void *))
QsortSmallToLargeFloat);
164 if ( focus_opt == 0 ) focus = focal_series[0+iselect];
165 if ( focus_opt == 1 ) focus = focal_series[nmgs-1-iselect];
166 for ( count = 0, i=0; i<nmgs; i++ )
if ( focus == focal_series[i] ) count++;
168 delete[] focal_series;
174 cout <<
"Focus of selected micrograph: " << focus << endl;
176 if ( (count > 1) || (count == 0) ) {
177 cerr <<
"Error: There are " << count <<
" micrographs with focus levels of " << focus << endl;
178 cerr <<
"Please check data or select with a different criterion" << endl;
202 double closest_angle(0);
203 double mindiff = 1e37;
207 for ( mindiff = 1e37, mg = field->
mg; mg; mg = mg->
next ) {
208 if ( fabs(rotang - mg->
rot_angle) < mindiff ) {
214 for ( count = 0, mg = field->
mg; mg; mg = mg->
next)
215 if ( fabs(closest_angle - mg->
rot_angle) < 1e-10 ) count++;
217 for ( mg = field->
mg; mg && closest_angle != mg->
rot_angle; mg = mg->
next ) ;
219 if ( (count > 1) || (count == 0) ) {
220 cerr <<
"Error: There are " << count <<
" micrographs with the rotational angle of "
221 << closest_angle*180/
M_PI << endl;
222 cerr <<
"Please check data or select with a different criterion" << endl;
246 double closest_angle(0);
247 double mindiff = 1e37;
251 for ( mindiff = 1e37, mg = field->
mg; mg; mg = mg->
next ) {
252 if ( fabs(tiltang - mg->
tilt_angle) < mindiff ) {
258 for ( count = 0, mg = field->
mg; mg; mg = mg->
next)
259 if ( fabs(closest_angle - mg->
tilt_angle) < 1e-10 ) count++;
261 for ( mg = field->
mg; mg && (closest_angle != mg->
tilt_angle); mg = mg->
next ) ;
263 if ( (count > 1) || (count == 0) ) {
264 cerr <<
"Error: There are " << count <<
" micrographs with the tilt angle of "
265 << closest_angle*180/
M_PI << endl;
266 cerr <<
"Please check data or select with a different criterion" << endl;
283 if ( !field )
return NULL;
285 double min_angle(
M_PI);
289 for ( mg = field->
mg; mg; mg = mg->
next ) {
298 cerr <<
"Warning: No zero tilt micrograph found!" << endl;
314 if ( !field )
return NULL;
316 double min_angle =
M_PI;
320 for ( mg = field->
mg; mg; mg = mg->
next ) {
357 for ( mg = field->
mg; mg; mg = mg->
next ) nmg++;
374 for ( mg = field->
mg; mg; mg = mg->
next )
if ( mg->
select ) nmg++;
405 if ( rec->
select ) nrec++;
423 for ( mg = field->
mg; mg; mg = mg->
next )
424 for ( part = mg->
part; part; part = part->
next ) npart++;
445 for ( mg = field->
mg; mg; mg = mg->
next )
446 for ( part = mg->
part; part; part = part->
next )
447 if ( part->
sel > 0 ) nsel++;
471 for ( mg = field->
mg; mg; mg = mg->
next )
472 for ( part = mg->
part; part; part = part->
next )
473 if ( part->
sel == num_select ) nsel++;
491 for ( mg = field->
mg; mg; mg = mg->
next ) {
492 for ( part = mg->
part; part && part->
next; part = part->
next )
513 for ( part = rec->
part; part; part = part->
next ) npart++;
530 for ( part = rec->
part; part; part = part->
next )
531 if ( part->
sel ) npart++;
548 for ( part = rec->
part; part && part->
next; part = part->
next )
572 for ( mg = field->
mg; mg; mg = mg->
next )
573 for ( fil=mg->
fil; fil; fil=fil->
next )
596 for ( mg = field->
mg; mg; mg = mg->
next )
597 for ( fil=mg->
fil; fil; fil=fil->
next )
598 for ( fnode=fil->
node; fnode; fnode=fnode->
next )
619 for ( fil = rec->
fil; fil; fil = fil->
next )
641 for ( fil = rec->
fil; fil; fil = fil->
next )
642 for ( fnode = fil->
node; fnode; fnode = fnode->
next )
661 for ( nfield=0; field; nfield++ ) field = field->
next;
676 for ( mg = field->
mg; mg; mg = mg->
next ) nmg++;
691 for ( mg = field->
mg; mg; mg = mg->
next )
if ( mg->
select ) nmg++;
707 for ( mg = field->
mg; mg; mg = mg->
next )
708 for ( part = mg->
part; part; part = part->
next ) npart++;
726 for ( nmg=0; mg; nmg++ ) mg = mg->
next;
741 for ( part = mg->
part; part; part = part->
next ) npart++;
759 for ( npart=0; part; npart++ ) part = part->
next;
777 for ( nsel=0; part; part=part->
next )
if ( part->
sel > 0 ) nsel++;
795 for ( nfil=0; fil; fil=fil->
next ) nfil++;
814 for ( nfil=0; fil; fil=fil->
next )
815 for ( fnode=fil->
node; fnode; fnode=fnode->
next ) nfil++;
835 for ( mg = field->
mg; mg; mg = mg->
next )
836 for ( part = mg->
part; part; part = part->
next )
837 if ( smax < part->sel ) smax = part->
sel;
840 for ( part = rec->
part; part; part = part->
next )
841 if ( smax < part->sel ) smax = part->
sel;
856 long i, maxsel, nsel(0);
863 if ( field && field->
mg && field->
mg->
part ) {
865 for ( mg = field->
mg; mg; mg = mg->
next )
866 for ( part = mg->
part; part; part = part->
next )
867 if ( maxsel < part->sel ) maxsel = part->
sel;
869 sel =
new int[maxsel];
870 for ( i=0; i<maxsel; i++ ) sel[i] = 0;
872 for ( mg = field->
mg; mg; mg = mg->
next )
873 for ( part = mg->
part; part; part = part->
next )
874 if ( part->
sel > 0 ) sel[part->
sel]++;
875 cout <<
"Micrograph selection numbers: ";
876 for ( i=1; i<maxsel; i++ )
877 if ( sel[i] ) cout <<
tab << i;
882 if ( rec && rec->
part ) {
884 for ( part = rec->
part; part; part = part->
next )
885 if ( maxsel < part->sel ) maxsel = part->
sel;
887 sel =
new int[maxsel];
888 for ( i=0; i<maxsel; i++ ) sel[i] = 0;
890 for ( part = rec->
part; part; part = part->
next )
891 if ( part->
sel > 0 ) sel[part->
sel]++;
892 cout <<
"Reconstruction selection numbers: ";
893 for ( i=1; i<maxsel; i++ )
894 if ( sel[i] ) cout <<
tab << i;
912 long nmg(0), nrec(0), ntotsel(0);
922 if ( npart && field && field->
mg ) {
926 for ( mg = field->
mg; mg; mg = mg->
next )
928 for ( part = mg->
part; part; part = part->
next )
929 if ( smax < part->sel ) smax = part->
sel;
931 cout <<
"Micrographs selected: " << nmg << endl;
932 cout <<
"Maximum selection number: " << smax << endl;
934 vector<int> nsel(smax+1, 0);
935 vector<int> ntot(smax+1, 0);
936 vector<int> npercent(smax+1, 0);
937 vector<int> fom(smax+1, 0);
938 for ( f=0; f<
NFOM; f++ ) {
939 fomavg[f] = fomstd[f] = 0;
944 cout <<
"Field\tMgraph";
945 for ( i=0; i<=smax; i++ ) cout <<
tab << i;
949 for ( mg = field->
mg; mg; mg = mg->
next )
if ( mg->
select ) {
950 for ( i=0; i<=smax; i++ ) nsel[i] = 0;
951 for ( part = mg->
part; part; part = part->
next ) {
952 if ( part->
sel > -1 ) {
954 fom[part->
sel] += part->
fom[0];
955 if ( part->
sel > 0 ) {
957 for ( f=0; f<
NFOM; f++ ) {
958 fomavg[f] += part->
fom[f];
959 fomstd[f] += part->
fom[f]*part->
fom[f];
960 if ( fommin[f] > part->
fom[f] ) fommin[f] = part->
fom[f];
961 if ( fommax[f] < part->
fom[f] ) fommax[f] = part->
fom[f];
966 for ( i=0; i<=smax; i++ ) ntot[i] += nsel[i];
968 cout << field->
id <<
tab << mg->
id;
969 for ( i=0; i<=smax; i++ ) cout <<
tab << nsel[i];
974 for ( i=0; i<=smax; i++ ) {
975 if ( ntot[i] ) fom[i] /= ntot[i];
976 if ( npart ) npercent[i] = ntot[i]*100.0/npart;
979 for ( f=0; f<
NFOM; f++ ) {
980 fomavg[f] /= ntotsel;
981 fomstd[f] = fomstd[f]/ntotsel - fomavg[f]*fomavg[f];
982 if ( fomstd[f] > 0 ) fomstd[f] = sqrt(fomstd[f]);
988 for ( i=0; i<=smax; i++ ) cout <<
tab << ntot[i];
989 cout << endl <<
"Percent\t";
990 for ( i=0; i<=smax; i++ ) cout <<
tab << npercent[i];
991 cout << endl <<
"FOM\t";
992 for ( i=0; i<=smax; i++ ) cout <<
tab << fom[i];
993 cout << endl << endl;
995 if ( npart ) pp = ntotsel*100.0/npart;
996 cout <<
"Overall selected FOM average and standard deviation:" << endl;
997 cout <<
"Selected particle images: " << ntotsel <<
" (" << pp <<
"%)" << endl;
999 cout <<
"FOM" << f <<
": " <<
1000 fommin[f] <<
tab << fommax[f] <<
tab << fomavg[f] <<
tab << fomstd[f] << endl;
1006 if ( npart && rec && rec->
part ) {
1010 for ( part = rec->
part; part; part = part->
next )
1011 if ( smax < part->sel ) smax = part->
sel;
1013 cout <<
"Reconstructions selected: " << nrec << endl;
1014 cout <<
"Maximum particle selection number:" << smax << endl;
1016 vector<int> nsel(smax+1, 0);
1017 vector<int> ntot(smax+1, 0);
1018 vector<int> npercent(smax+1, 0);
1019 vector<int> fom(smax+1, 0);
1020 for ( f=0; f<
NFOM; f++ ) {
1021 fomavg[f] = fomstd[f] = 0;
1027 for ( i=0; i<=smax; i++ ) cout <<
tab << i;
1031 for ( i=0; i<=smax; i++ ) nsel[i] = 0;
1032 for ( part = rec->
part; part; part = part->
next ) {
1033 if ( part->
sel > -1 ) {
1035 fom[part->
sel] += part->
fom[0];
1036 if ( part->
sel > 0 ) {
1038 for ( f=0; f<
NFOM; f++ ) {
1039 fomavg[f] += part->
fom[f];
1040 fomstd[f] += part->
fom[f]*part->
fom[f];
1041 if ( fommin[f] > part->
fom[f] ) fommin[f] = part->
fom[f];
1042 if ( fommax[f] < part->
fom[f] ) fommax[f] = part->
fom[f];
1047 for ( i=0; i<=smax; i++ ) ntot[i] += nsel[i];
1050 for ( i=0; i<=smax; i++ ) cout <<
tab << nsel[i];
1054 for ( i=0; i<=smax; i++ ) {
1055 if ( ntot[i] ) fom[i] /= ntot[i];
1056 if ( npart ) npercent[i] = ntot[i]*100.0/npart;
1059 for ( f=0; f<
NFOM; f++ ) {
1060 fomavg[f] /= ntotsel;
1061 fomstd[f] = fomstd[f]/ntotsel - fomavg[f]*fomavg[f];
1062 if ( fomstd[f] > 0 ) fomstd[f] = sqrt(fomstd[f]);
1068 for ( i=0; i<=smax; i++ ) cout <<
tab << ntot[i];
1069 cout << endl <<
"Percent";
1070 for ( i=0; i<=smax; i++ ) cout <<
tab << npercent[i];
1071 cout << endl <<
"FOM";
1072 for ( i=0; i<=smax; i++ ) cout <<
tab << fom[i];
1073 cout << endl << endl;
1076 if ( npart ) pp = ntotsel*100.0/npart;
1077 cout <<
"Overall selected FOM average and standard deviation:" << endl;
1078 cout <<
"Selected particle images: " << ntotsel <<
" (" << pp <<
" %)" << endl;
1080 cout <<
"FOM" << f <<
": " <<
1081 fommin[f] <<
tab << fommax[f] <<
tab << fomavg[f] <<
tab << fomstd[f] << endl;
1102 if (
show < 0 )
return 0;
1105 long nsel(0), npart(0);
1111 if ( field && field->
mg && field->
mg->
part ) {
1113 cout <<
"Field: " << field->
id << endl;
1114 for ( mg = field->
mg; mg; mg = mg->
next )
if ( mg->
select ) {
1115 cout <<
"Micrograph: " << mg->
id << endl;
1116 for ( part = mg->
part; part; part = part->
next ) {
1122 for ( f=0; f<
NFOM; f++ ) cout <<
tab << part->
fom[f];
1131 cout <<
"Particles selected: " << nsel <<
" (" << nsel*100.0/npart <<
" %)" << endl << endl;
1134 if ( rec && rec->
part ) {
1136 cout <<
"Reconstruction: " << rec->
id << endl;
1137 for ( part = rec->
part; part; part = part->
next ) {
1143 for ( f=0; f<
NFOM; f++ ) cout <<
tab << part->
fom[f];
1151 cout <<
"Particles selected: " << nsel <<
" (" << nsel*100.0/npart <<
" %)" << endl << endl;
1159 cout << mg->
id <<
tab;
1189 int float_flag(1), idata(0);
1223 }
else float_flag = -1;
1225 if ( float_flag == 0 ) {
1226 cout << part->
id <<
tab << idata << endl;
1228 cout << part->
id <<
tab << fdata << endl;
1244 if ( tag.
length() < 1 )
return 0;
1250 cout <<
"MGID" <<
tab << tag << endl;
1253 for ( mg = field->
mg; mg; mg = mg->
next )
if ( mg->
select ) {
1272 if ( tag.
length() < 1 )
return 0;
1274 long nsel(0), npart(0);
1280 cout <<
"PID" <<
tab << tag << endl;
1282 if ( field && field->
mg && field->
mg->
part ) {
1284 for ( mg = field->
mg; mg; mg = mg->
next ) {
1285 for ( part = mg->
part; part; part = part->
next ) {
1296 if ( rec && rec->
part ) {
1298 for ( part = rec->
part; part; part = part->
next ) {
1320 double min,
double max)
1323 if ( bins < 2 ) bins = 100;
1324 if ( max < min ) swap(min, max);
1325 if ( max == 0 ) max = 1;
1328 long i, nh(bins-1), sum, ssum, nsel(0), npart;
1329 double scale(nh*1.0/(max - min));
1335 vector<long> hist(bins);
1336 vector<long> hsel(bins);
1338 if ( field && field->
mg && field->
mg->
part )
1339 cout <<
"Micrograph figures-of-merit:" << endl;
1342 for ( i=0; i<=nh; i++ ) hist[i] = hsel[i] = 0;
1344 for ( mg = field->
mg; mg; mg = mg->
next ) {
1345 for ( part = mg->
part; part; part = part->
next ) {
1346 i = (long) ((part->
fom[f]-min)*scale + 0.5);
1348 if ( i > nh ) i = nh;
1359 cout << endl <<
"FOM" << f <<
" histogram:" << endl;
1360 cout <<
" Bin\tFOM\tCount\t%%\tSum\tSel\t%%\tSelSum" << endl;
1363 for ( i=0; i<=nh; i++ ) {
1364 cout << i <<
tab << i*1.0/scale + min
1366 << hist[i]*100.0/npart <<
tab
1367 << sum <<
tab << hsel[i] <<
tab
1368 << hsel[i]*100.0/nsel <<
tab << ssum << endl;
1376 if ( rec && rec->
part )
1377 cout <<
"Reconstruction figures-of-merit:" << endl;
1380 for ( i=0; i<=nh; i++ ) hist[i] = hsel[i] = 0;
1382 for ( part = rec->
part; part; part = part->
next ) {
1383 i = (long) ((part->
fom[f]-min)*scale + 0.5);
1385 if ( i > nh ) i = nh;
1395 cout << endl <<
"FOM" << f <<
" histogram:" << endl;
1396 cout <<
" Bin\tFOM\tCount\t%%\tSum\tSel\t%%\tSelSum" << endl;
1399 for ( i=0; i<=nh; i++ ) {
1400 cout << i <<
tab << i*1.0/scale + min
1402 << hist[i]*100.0/npart <<
tab
1403 << sum <<
tab << hsel[i] <<
tab
1404 << hsel[i]*100.0/nsel <<
tab << ssum << endl;
1431 double min = 1 - (bins - 1)*increment/2;
1434 vector<long> hist(bins,0);
1437 for ( mg = field->
mg; mg; mg = mg->
next ) {
1438 for ( part = mg->
part; part; part = part->
next ) {
1440 i = (int) ((part->
mag - min)/increment + 0.5);
1442 if ( i >=bins ) i = bins - 1;
1450 cout <<
"Mag\tCount" << endl;
1452 for ( i=0; i<bins; i++ )
1453 cout << min + i*increment <<
tab << hist[i] << endl;
1455 cout << endl <<
"Total\t" << nsel << endl << endl;
1473 Bfield* selected_field = NULL;
1478 for ( field=
project->
field; field && !selected_field; field=field->
next ) {
1479 if ( field->
next->
id == field_id ) {
1480 selected_field = field->
next;
1488 selected_field->
next = NULL;
1509 for ( mg = field->
mg; mg; mg = mg->
next )
1510 if ( mg->
id == mg_id ) {
1516 if ( field->
mg->
id == mg_id ) {
1517 selected_mg = field->
mg;
1519 for ( mg = field->
mg; mg; mg = mg->
next ) {
1520 if ( mg->
next->
id == mg_id ) {
1521 selected_mg = mg->
next;
1529 selected_mg->
next = NULL;
1530 field->
mg = selected_mg;
1551 for ( mg = field->
mg; mg; mg = mg->
next ) {
1553 if ( part_sel < -1 ) {
1555 }
else if ( part_sel < 0 ) {
1556 for ( part = mg->
part; part; part = part->
next )
1559 for ( part = mg->
part; part; part = part->
next )
1560 if ( part->
sel == part_sel ) mg->
select = 1;
1574 if ( !field )
return 0;
1579 vector<Bmicrograph*> mgarr(nmg);
1584 for ( mg = field->
mg; mg; mg = mg->
next ) mg->
select = 1;
1586 for ( mg = field->
mg; mg; mg = mg->
next ) {
1588 for ( mg2 = field->
mg; mg2; mg2 = mg2->
next )
if ( mg2->
select ) {
1598 field->
mg = mg = mgarr[0];
1600 for ( i=1; i<nmg; ++i, mg = mg->
next ) mg->
next = mgarr[i];
1603 for ( mg = field->
mg; mg; mg = mg->
next ) mg->
select = 1;
1636 vector<std::pair<Bmicrograph*,double>> mg_value;
1637 pair<Bmicrograph*,double> mgvp;
1640 cerr <<
"Error: Micrograph parameters not defined!" << endl;
1645 cerr <<
"Error: CTF parameters not defined!" << endl;
1650 cout <<
"Ordering micrographs based on tag " << tag << endl;
1654 for ( mg = field->
mg; mg; mg = mg->
next ) {
1665 mgvp.second = mg->
wri;
1670 mg_value.push_back(mgvp);
1675 sort(mg_value.begin(), mg_value.end(),
1676 [=](pair<Bmicrograph*,double> a, pair<Bmicrograph*,double> b) {
1677 return a.second < b.second;
Header file for utility functions for use in qsort calls.
int field_kill(Bfield *field)
Frees a whole field-of-view structure.
int part_show_parameter(Bparticle *part, Bstring &tag)
long field_count_mg_selected(Bfield *field)
Counts all the micrographs in the field-of-view structure.
long project_count_mg_filament_nodes(Bproject *project)
Counts the number of filament nodes in a project.
long field_count(Bfield *field)
Counts the number of fields-of-view in a linked list.
long filament_count(Bfilament *fil)
Counts the number of filaments in a linked list of filaments.
long project_count_fields(Bproject *project)
Counts all the fields in the project structure.
long micrograph_count_particles(Bmicrograph *mg)
Counts all the particles in the micrograph structure.
long project_count_rec_part_selected(Bproject *project)
Counts all the particles in the project structure.
int micrograph_kill(Bmicrograph *mg)
Frees a whole micrograph parameter structure.
long project_select_with_particles(Bproject *project, long part_sel)
Selects micrographs with particles.
Header file for functions for creating random images.
int project_sort_by_tilt(Bproject *project)
Sorts the micrographs in each field by tilt angle.
vector< pair< Bmicrograph *, double > > project_mg_sort(Bproject *project, Bstring tag)
Sorts the micrographs by a selected parameter.
Header file for micrograph processing.
int error_show(string message, string file, int line)
Displays the error with file and line reference.
int project_select_micrograph(Bproject *project, Bstring &mg_id)
Selects a micrograph from the project and deletes the rest.
long field_count_particles(Bfield *field)
Counts all the particles in the field-of-view structure.
long project_count_micrographs(Bproject *project)
Counts all the micrographs in the project structure.
long project_show_selection_numbers(Bproject *project)
Shows the selection numbers for the particles in a project.
long project_count_rec_groups(Bproject *project)
Counts all the particles in the project structure.
long project_show_mg_parameter(Bproject *project, Bstring &tag)
Shows the micrograph parameter indicated by the tag in a project.
long particle_count_selected(Bparticle *part)
Counts the number of particles in a linked list.
Bmicrograph * field_find_micrograph_by_focus(Bfield *field, int focus_opt, int iselect)
Returns a pointer to the micrograph in a field-of-view structure based on the focus level and iterati...
long project_count_rec_particles(Bproject *project)
Counts all the particles in the project structure.
Bmicrograph * field_find_low_tilt_mg_with_markers(Bfield *field)
Finds the micrograph closest to a zero degree tilt in a series with markers.
long project_show_selected_parameters(Bproject *project, int show)
Shows the selected particle parameters in a project.
long project_count_rec_selected(Bproject *project)
Counts all the selected reconstructions in the project structure.
int mg_show_parameter(Bmicrograph *mg, Bstring &tag)
long project_count_rec_filament_nodes(Bproject *project)
Counts the number of filaments in a project.
long micrograph_count(Bmicrograph *mg)
Counts the number of micrographs in a linked list.
Vector3< double > pixel_size
long field_count_micrographs(Bfield *field)
Counts all the micrographs in the field-of-view structure.
long project_count_mg_part_selected(Bproject *project)
Counts the number of particles in a project.
long particle_count(Bparticle *part)
Counts the number of particles in a linked list.
Header file for general utilities.
ostream & tab(ostream &out)
int field_sort_by_tilt(Bfield *field)
Sorts the micrographs in a field by tilt angle.
long project_show_mag_histogram(Bproject *project, long bins, double increment)
Shows the histogram for magnification values for selected particles.
int project_select_field(Bproject *project, Bstring &field_id)
Selects a field from the project and deletes the rest.
long project_count_mg_particles(Bproject *project)
Counts all the particles in the project structure.
long project_count_reconstructions(Bproject *project)
Counts all the reconstructions in the project structure.
long project_maximum_selection(Bproject *project)
Finds the maximum selection number for a project.
long project_count_mg_groups(Bproject *project)
Counts the number of groups of particles in the project structure.
long project_count_mg_filaments(Bproject *project)
Counts the number of filaments in a project.
Bfield * field_find_id(Bfield *field, Bstring &field_id)
Finds a field-of-view based on its identifier.
int QsortSmallToLargeFloat(const void *x, const void *y)
Utility function for sorting floating point values in qsort.
Header file for micrograph processing.
long project_count_mg_selected(Bproject *project)
Counts all the selected micrographs in the project structure.
Header file for generalized linked list functions.
Header file for general utilities.
long project_show_fom_histogram(Bproject *project, long bins, double min, double max)
Shows a histogram of the FOM values.
long project_show_selected(Bproject *project)
Shows the selected particles in a project.
Bmicrograph * field_find_micrograph_by_rotang(Bfield *field, double rotang)
Returns a pointer to the micrograph in a field-of-view structure with the specified in-plane rotation...
long project_count_rec_filaments(Bproject *project)
Counts the number of filaments in a project.
Vector3< double > pixel_size
long filament_node_count(Bfilament *fil)
Counts the number of filament nodes in a linked list of filaments.
Bmicrograph * field_find_micrograph(Bfield *field, int mg_select, int mg_index, double mg_ang)
Returns a pointer to a specific micrograph in a field-of-view structure based on a unique characteris...
Bmicrograph * field_find_micrograph_by_tiltang(Bfield *field, double tiltang)
Returns a pointer to the micrograph in a field-of-view structure with the specified tilt angle.
Bmicrograph * field_find_zero_tilt_mg(Bfield *field)
Finds the micrograph closest to a zero degree tilt in a series.
long project_show_part_parameter(Bproject *project, Bstring &tag)
Shows the particle parameter indicated by the tag in a project.
Bmicrograph * field_find_micrograph_n(Bfield *field, int n)
Returns a pointer to the nth micrograph in a field-of-view structure.