| Bsoft 2.0.5 Bernard's software package

breconstruct.cpp
Go to the documentation of this file.
1
9 #include "mg_processing.h"
10 #include "mg_reconstruct.h"
11 #include "rwmg.h"
12 #include "mg_particle_select.h"
13 #include "symmetry.h"
14 #include "Matrix.h"
15 #include "rwimg.h"
16 #include "utilities.h"
17 #include "options.h"
18 #include "timer.h"
19
20 // Declaration of global variables
21 extern int verbose; // Level of output to the screen
22
23 // Usage assistance
24 const char* use[] = {
25 " ",
26 "Usage: breconstruct [options] input.star [input.star]",
27 "-----------------------------------------------------",
28 "Reconstructs 2D and 3D maps from single particle images.",
29 "Note: -classes and -bootstrap are mutually exclusive.",
30 " ",
31 "Actions:",
32 "-mode 1 Symmetry mode: 0=during reconstruction (default), 1=after reconstruction,",
33 " 2=pick a random symmetry view for each particle.",
34 "-TwoD Generate a 2D reconstruction (default 3D).",
35 "-rescale -0.1,5.2 Rescale data to average and standard deviation.",
36 " ",
37 "Parameters for configuration:",
38 "-bootstrap Use particle selection numbers to weigh their contributions.",
39 "-filaments Generate one map per filament.",
40 "-classes 1,3-5 Class selection: can be all, selected, or any combination of numbers (default selected).",
41 "-fullmap Output one full map per class (default if -halfmaps not used).",
42 "-halfmaps Output 2 maps from half sets.",
43 "-threads 2 Threads per class (default 1, must be even for -halfmaps).",
44 " ",
45 "Parameters:",
46 "-verbose 7 Verbosity of output.",
47 "-datatype u Force writing of a new data type.",
48 "-sampling 1.5,1.5,1.5 Sampling of input images (A/pixel; a single value can be given).",
49 "-resolution 20 Resolution limit (angstrom, default Nyquist).",
50 "-scale 1.2 Scale or magnification of reconstruction compared to original images (default 1).",
51 "-size 100,120,90 Size of reconstruction (default from images).",
52 "-interpolation weighted Interpolation type: nearest (default), weighted, trilinear.",
53 "-pad 3 Image padding factor (default 2).",
54 "-symmetry D6 Symmetry: Point group identifier",
55 "-CTF flip Apply CTF correction to images before reconstruction (default not).",
56 "-wiener 0.15 Wiener factor for CTF correction (default 0.2).",
57 " ",
58 "Output:",
59 "-reconstruction file.ext Reconstruction file name.",
60 "-fom file.ext Figure-of-merit file name.",
61 "-output file.star Output parameter file name.",
62 "-Postscript file.ps Postscript output filename.",
63 " ",
64 NULL
65 };
66
67
68 int main(int argc, char** argv)
69 {
70 // Initializing variables
71 int sym_mode(0); // 0=during, 1=after, 2=random
72 int twoD_flag(0); // Flag for 2D reconstruction
73 double nuavg, nustd(0); // Values for rescaling
74 DataType nudatatype(Unknown_Type); // Conversion to new type
75 Vector3<double> sam; // Units for the three axes (A/pixel)
76 Vector3<long> map_size; // Size of reconstruction
77 int interp_type(0); // Interpolation type
78 double scale(1); // Scale or magnification of reconstruction compared to original images
79 int ctf_action(0); // Default no CTF operation
80 double wiener(0.2); // Wiener for CTF correction
81 int pad_factor(2); // Image padding factor
82 double resolution(0); // Must be set > 0 to limit resolution
83 Bsymmetry* sym = NULL; // No symmetry specified
84 Bstring classes("select"); // Class selection string
85 long nmaps(0); // Number of maps per class
86 long nthreads(1); // Number of threads per map
87 int bootstrap(0); // Flag to indicate a bootstrap reconstruction
88 long imap(0); // Select one of multiple maps to reconstruct
89 int filaments(0); // Flag to generate separate filament reconstructions
90 Bstring outfile; // Output parameter file
91 Bstring reconsfile; // Output reconstruction file
92 Bstring fomfile; // Figure-of-merit file
93 Bstring ps_file; // Output postscript file
94
95 int i, optind;
96 Boption* option = get_option_list(use, argc, argv, optind);
97 Boption* curropt;
98 for ( curropt = option; curropt; curropt = curropt->next ) {
99 if ( curropt->tag == "mode" ) {
100 sym_mode = curropt->value.integer();
101 if ( sym_mode < 0 || sym_mode > 2 )
102 cerr << "-mode: A symmetry mode of 0, 1 or 2 must be specified!" << endl;
103 }
104 if ( curropt->tag == "TwoD" )
105 twoD_flag = 1;
106 if ( curropt->tag == "rescale" ) {
107 if ( curropt->values(nuavg, nustd) < 2 )
108 cerr << "-rescale: Both average and standard deviation must be specified!" << endl;
109 if ( nustd <= 0 )
110 cerr << "-rescale: A positive standard deviation must be specified!" << endl;
111 }
112 if ( curropt->tag == "datatype" )
113 nudatatype = curropt->datatype();
114 if ( curropt->tag == "sampling" )
115 sam = curropt->sampling();
116 // Configuration
117 if ( curropt->tag == "bootstrap" )
118 bootstrap = 1;
119 if ( curropt->tag == "classes" )
120 classes = curropt->value;
121 if ( curropt->tag == "fullmap" ) nmaps += 1;
122 if ( curropt->tag == "halfmaps" ) nmaps += 2;
123 if ( curropt->tag == "threads" )
124 if ( ( nthreads = curropt->value.integer() ) < 1 )
125 cerr << "-threads: A number of threads must be specified!" << endl;
126 if ( curropt->tag == "filaments" ) filaments = 1;
127 if ( curropt->tag == "CTF" )
128 ctf_action = curropt->ctf_action();
129 if ( curropt->tag == "wiener" ) {
130 if ( ( wiener = curropt->value.real() ) < 0.000001 )
131 cerr << "-wiener: A Wiener factor must be specified!" << endl;
132 else {
133 if ( wiener < 0.01 ) wiener = 0.01;
134 // if ( wiener > 1 ) wiener = 1;
135 }
136 }
137 if ( curropt->tag == "resolution" )
138 if ( ( resolution = curropt->value.real() ) < 1 )
139 cerr << "-resolution: A resolution limit must be specified!" << endl;
140 if ( curropt->tag == "size" )
141 map_size = curropt->size();
142 if ( curropt->tag == "scale" )
143 if ( ( scale = curropt->value.real() ) < 0.01 )
144 cerr << "-scale: A scale must be specified!" << endl;
145 if ( curropt->tag == "interpolation" ) {
146 if ( curropt->value[0] == 'n' ) interp_type = 0;
147 if ( curropt->value[0] == 'w' ) interp_type = 1;
148 if ( curropt->value[0] == 't' ) interp_type = 2;
149 }
150 if ( curropt->tag == "pad" )
151 if ( ( pad_factor = curropt->value.integer() ) < 0 )
152 cerr << "-pad: A positive factor must be specified!" << endl;
153 if ( curropt->tag == "symmetry" )
154 sym = curropt->symmetry();
155 if ( curropt->tag == "reconstruction" )
156 reconsfile = curropt->filename();
157 if ( curropt->tag == "fom" )
158 fomfile = curropt->filename();
159 if ( curropt->tag == "output" )
160 outfile = curropt->filename();
161 if ( curropt->tag == "Postscript" )
162 ps_file = curropt->filename();
163 }
164 option_kill(option);
165
166 double ti = timer_start();
167
168 // Read all the parameter files
169 Bstring* file_list = NULL;
170 while ( optind < argc ) string_add(&file_list, argv[optind++]);
171 if ( !file_list ) {
172 cerr << "Error: No parameter files specified!" << endl;
173 bexit(-1);
174 }
175
176 Bproject* project = read_project(file_list);
177 string_kill(file_list);
178
179 if ( project == NULL ) {
180 cerr << "Error: No input file read!" << endl;
181 bexit(-1);
182 }
183
184 if ( sam[0] > 0 ) {
185 if ( sam[0] < 0.1 ) sam[0] = 1;
186 project_set_pixel_size(project, sam[0]);
187 }
188
189 if ( verbose ) {
190 if ( twoD_flag )
191 cout << "2D reciprocal space reconstruction:" << endl;
192 else
193 cout << "3D reciprocal space reconstruction:" << endl;
194 }
195
196 long npart = project_count_mg_part_selected(project);
197 if ( npart < 1 ) {
198 cerr << "Error: No particles selected!" << endl;
199 bexit(-1);
200 }
201
202 if ( nthreads < 2 ) nthreads = 2;
203 if ( nthreads > npart/2 ) nthreads = npart/2;
204
205 if ( nmaps < 1 ) nmaps = 1;
206 if ( !nmaps%2 ) nmaps = 2;
207 if ( nmaps > 3 ) nmaps = 3;
208
209 int nclasses(1);
210
211 if ( filaments ) {
212 nclasses = part_set_filament_maps(project);
213 nmaps = 1;
214 } else {
215 nclasses = project_configure_for_reconstruction(project, classes, nmaps, nthreads);
216 }
217
218 int ntotal = nclasses*nthreads;
219
220 if ( nthreads > ntotal/2 ) nthreads = ntotal/2;
221 if ( nmaps & 2 && nthreads%2 ) nthreads++;
222
223 Bimage** pacc = new Bimage*[ntotal];
224 Bimage** prec = new Bimage*[nclasses*nmaps];
225 View ref_view;
226 Bstring filename = reconsfile;
227 Bstring id;
228 Breconstruction* rec = NULL;
229 Bparticle* part = part_find_first(project);
230
231 if ( map_size.volume() <= 0 )
232 map_size = project_set_reconstruction_size(project, scale, twoD_flag);
233
234 if ( map_size.volume() <= 0 ) {
235 error_show("Error in breconstruct", __FILE__, __LINE__);
236 cerr << "No particles to determine the size from!" << endl << endl;
237 return -1;
238 }
239
240 long ft_size = part->mg->box_size[0];
241 if ( map_size[0] > ft_size ) ft_size = map_size[0];
242
243 ft_size = part_ft_size(ft_size, scale, pad_factor);
244
245 if ( !sym ) sym = init_point_group_symmetry("C1");
246
247 if ( verbose ) {
248 cout << "Map size: " << map_size << endl;
249 cout << "Symmetry: " << sym->label << endl;
250 cout << "Symmetry mode: " << sym_mode << endl;
251 cout << "Resolution limit: " << resolution << " A" << endl;
252 cout << "Scale: " << scale << endl;
253 cout << "Interpolation type: " << interp_type << endl;
254 cout << "CTF application type: " << ctf_action << endl;
255 if ( bootstrap ) cout << "Bootstrapping on" << endl;
256 cout << "Padding factor: " << pad_factor << endl;
257 cout << "Fourier transform size: " << ft_size << " x " << ft_size << endl << endl;
258 }
259
260 long memreq = (ntotal+nmaps)*5*map_size.volume()*sizeof(float);
261 memory_check(memreq);
262
263 fft_plan plan = fft_setup_plan(ft_size, ft_size, 1, FFTW_FORWARD, 1);
264
265 #ifdef HAVE_GCD
266 dispatch_apply(ntotal, dispatch_get_global_queue(0, 0), ^(size_t i){
267 Bparticle* partlist = project_reconstruction_partlist(project, i+1, bootstrap);
268 pacc[i] = particle_reconstruct(partlist, sym, sym_mode,
269 resolution, scale, map_size, ft_size, plan,
270 interp_type, ctf_action, wiener, twoD_flag, bootstrap, (i==0));
271 particle_kill(partlist);
272 });
273 #else
274 #pragma omp parallel for
275 for ( i=0; i<ntotal; i++ ) {
276 Bparticle* partlist = project_reconstruction_partlist(project, i+1, bootstrap);
277 pacc[i] = particle_reconstruct(partlist, sym, sym_mode,
278 resolution, scale, map_size, ft_size, plan,
279 interp_type, ctf_action, wiener, twoD_flag, bootstrap, (i==0));
280 particle_kill(partlist);
281 }
282 #endif
283
284 fft_destroy_plan(plan);
285
286 if ( verbose )
287 cout << "Weighing " << nclasses*nmaps << " reconstructions" << endl;
288
289 #ifdef HAVE_GCD
290 dispatch_apply(nclasses*nmaps, dispatch_get_global_queue(0, 0), ^(size_t i){
291 prec[i] = img_reconstruction_sum_weigh(pacc, i, nmaps, nthreads, resolution);
292 });
293 #else
294 #pragma omp parallel for
295 for ( i=0; i<nclasses*nmaps; i++ )
296 prec[i] = img_reconstruction_sum_weigh(pacc, i, nmaps, nthreads, resolution);
297 #endif
298
299 for ( i=0; i<ntotal; i++ ) if ( pacc[i] ) delete pacc[i];
300 delete[] pacc;
301
302 double fsccut[4] = {0.8,0.3,0.143,0}; // FSC cutoff values
303 double dprcut[4] = {0,0,0,0}; // DPR cutoff values
304 if ( nmaps > 1 ) {
305 // for ( i=nmaps-2; i<nclasses*nmaps; i+=nmaps ) {
306 for ( i=nmaps-2; i<nmaps; i+=nmaps ) {
307 Bplot* plot = prec[i]->fsc(prec[i+1], resolution);
308 plot->resolution_display(fsccut, dprcut);
309 if ( ps_file.length() ) ps_plot(ps_file, plot);
310 delete plot;
311 }
312 }
313
314 if ( verbose )
315 cout << "Transforming " << nclasses*nmaps << " reconstructions to real space" << endl;
316
317 plan = fft_setup_plan(prec[0]->size(), FFTW_BACKWARD, 1);
318
319 #ifdef HAVE_GCD
320 dispatch_apply(nclasses*nmaps, dispatch_get_global_queue(0, 0), ^(size_t i){
321 prec[i]->fft_back(plan);
322 prec[i]->statistics();
323 prec[i]->calculate_background();
324 if ( sym_mode == 1 ) prec[i]->symmetrize(sym, 1);
325 if ( nustd > 0 ) prec[i]->rescale_to_avg_std(nuavg, nustd);
326 prec[i]->change_type(nudatatype);
327 });
328 #else
329 #pragma omp parallel for
330 for ( i=0; i<nclasses*nmaps; i++ ) {
331 prec[i]->fft_back(plan);
332 prec[i]->statistics();
333 prec[i]->calculate_background();
334 if ( sym_mode == 1 ) prec[i]->symmetrize(sym, 1);
335 if ( nustd > 0 ) prec[i]->rescale_to_avg_std(nuavg, nustd);
336 prec[i]->change_type(nudatatype);
337 }
338 #endif
339
340 fft_destroy_plan(plan);
341
342 // Write an output reconstruction if an output filename is given
343 for ( i=0; i<nclasses*nmaps; i++ ) {
344 imap = 0;
345 if ( nmaps == 2 ) imap = i%2 + 1;
346 else if ( nmaps == 3 ) imap = i%3;
347 if ( prec[i] && reconsfile.length() ) {
348 if ( interp_type == 2 ) prec[i]->filter_sinc();
349 if ( fomfile.length() ) {
350 filename = fomfile.pre_rev('.');
351 if ( nclasses > 1 ) filename += Bstring(i%nmaps + 1, "_%02d");
352 if ( imap ) filename += Bstring(imap, "_%02d");
353 filename += "." + fomfile.post_rev('.');
354 write_img(filename, prec[i]->next, 0);
355 }
356 prec[i]->label(get_cmd_line(argc, argv));
357 prec[i]->symmetry(sym->label.str());
358 id = reconsfile.pre_rev('.');
359 if ( nclasses > 1 ) id += Bstring(i/nmaps + 1, "_%02d");
360 if ( imap ) id += Bstring(imap, "_%02d");
361 filename = id + "." + reconsfile.post_rev('.');
362 if ( verbose )
363 cout << "Writing " << filename << endl;
364 write_img(filename, prec[i], 0);
365 rec = reconstruction_add(&project->rec, id);
366 rec->frec = filename;
367 rec->voxel_size = prec[i]->image->sampling()[0];
368 rec->origin = prec[i]->image->origin();
369 rec->symmetry = sym->label;
370 }
371 delete prec[i];
372 }
373
374 if ( project && outfile.length() ) {
375 if ( verbose )
376 cout << "Writing " << outfile << endl;
377 project_update_comment(project, argc, argv);
378 write_project(outfile, project, 0, 0);
379 }
380
381 delete[] prec;
382 kill_symmetry(sym);
383 project_kill(project);
384
385 if ( verbose & VERB_TIME )
386 timer_report(ti);
387
388 bexit(0);
389 }
390
391
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1743
write_project
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
Definition: rwmg.cpp:320
rwmg.h
Header file for reading and writing micrograph parameters.
project_set_reconstruction_size
Vector3< long > project_set_reconstruction_size(Bproject *project, double scale, int twoD_flag)
Sets the reconstruction size for reconstruction from 2D particle images.
Definition: mg_reconstruct.cpp:628
Bstring::real
double real()
Definition: Bstring.cpp:545
string_add
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
Definition: Bstring.cpp:705
Bproject::rec
Breconstruction * rec
Definition: mg_processing.h:344
Bimage::filter_sinc
int filter_sinc()
Weighs an image with a sinc function.
Definition: Bimage_filter.cpp:366
DataType
DataType
Base data type specifier.
Definition: utilities.h:146
use
const char * use[]
Definition: breconstruct.cpp:24
mg_particle_select.h
Select particles.
symmetry.h
Header file for general symmetry functions.
Bimage::fft_back
int fft_back()
Definition: Bimage.h:823
utilities.h
Header file for general utilities.
Boption::sampling
Vector3< double > sampling()
Definition: options.h:202
Boption::value
Bstring value
Definition: options.h:30
Breconstruction
Definition: mg_processing.h:280
Boption::tag
Bstring tag
Definition: options.h:29
project_count_mg_part_selected
long project_count_mg_part_selected(Bproject *project)
Counts the number of particles in a project.
Definition: mg_processing.cpp:833
part_find_first
Bparticle * part_find_first(Bproject *project)
Finds the first particle in a project.
Definition: mg_processing.cpp:589
read_project
Bproject * read_project(const char *filename, int flags=0)
Reading micrograph parameters from files.
Definition: rwmg.cpp:140
Bstring::length
long length() const
Definition: Bstring.cpp:263
project
Bproject * project
Definition: bshow.cpp:31
particle_kill
int particle_kill(Bparticle *part)
Frees a list of particles.
Definition: mg_processing.cpp:1323
Matrix.h
Generalized matrix class.
kill_symmetry
int kill_symmetry(Bsymmetry *sym)
Deallocates a symmetry structure.
Definition: symmetry.cpp:207
project_configure_for_reconstruction
int project_configure_for_reconstruction(Bproject *project, Bstring classes, long &nmaps, long &nthreads)
Sets up the particle selection for reconstruction.
Definition: mg_reconstruct.cpp:693
get_option_list
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Definition: options.cpp:40
Breconstruction::origin
Vector3< double > origin
Definition: mg_processing.h:293
get_cmd_line
string get_cmd_line(int argc, char **argv)
Returns the command line as a string.
Definition: utilities.cpp:36
Boption::filename
Bstring filename()
Definition: options.h:85
timer.h
Utilities for timing functions.
Bimage::fsc
Bplot * fsc(double hi_res, double sampling_ratio=1)
Definition: Bimage_resolution.cpp:250
part_ft_size
int part_ft_size(int xsize, double scale, int pad_factor)
Sets the Fourier transform size for 2D particle images for reconstruction.
Definition: mg_reconstruct.cpp:37
Bimage
General image parameter class.
Definition: Bimage.h:163
Boption::size
Vector3< long > size()
Definition: options.h:163
reconstruction_add
Breconstruction * reconstruction_add(Breconstruction **rec, Bstring &rec_id)
Adds a reconstruction parameter structure to a linked list.
Definition: mg_processing.cpp:704
Bparticle::mg
Bmicrograph * mg
Definition: mg_processing.h:104
Bimage::statistics
long statistics()
Calculates the statistics for an image.
Definition: Bimage_stats.cpp:22
Boption
A class for a command line input option.
Definition: options.h:26
Bimage::label
void label(string s)
Definition: Bimage.h:235
VERB_TIME
#define VERB_TIME
Definition: utilities.h:110
fft_plan
fftwf_plan fft_plan
Definition: fft.h:16
Bimage::rescale_to_avg_std
int rescale_to_avg_std(double nuavg, double nustd)
Rescales the image data to a given average and standard deviation.
Definition: Bimage_rescale.cpp:163
init_point_group_symmetry
Bsymmetry * init_point_group_symmetry(Bstring symmetry_string)
Sets up a symmetry structure from a string identifier.
Definition: symmetry.cpp:39
Boption::symmetry
Bsymmetry * symmetry()
Definition: options.h:252
main
int main(int argc, char **argv)
Definition: breconstruct.cpp:68
part_set_filament_maps
long part_set_filament_maps(Bproject *project)
Generates a selection number from the group number for each filament.
Definition: mg_particle_select.cpp:619
Bimage::symmetrize
double symmetrize(Bstring &symmetry_string, int flag)
Definition: Bimage.h:1178
write_img
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Definition: rwimg.cpp:280
Breconstruction::symmetry
Bstring symmetry
Definition: mg_processing.h:286
Bimage::calculate_background
int calculate_background(long nn, int flag)
Calculates the background for one sub-image.
Definition: Bimage_background.cpp:27
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:127
Bsub_image::sampling
void sampling(double x, double y, double z)
Definition: Bimage.h:123
ps_plot
int ps_plot(Bstring filename, Bplot *plot)
Generates postscript graphs.
Definition: ps_plot.cpp:128
memory_check
int memory_check(long mem_required)
Checking if there is enough memory, abort if not.
Definition: utilities.cpp:248
Bstring::post_rev
Bstring post_rev(char c)
Definition: Bstring.cpp:428
Bsymmetry::label
Bstring label
Definition: symmetry.h:41
Bsymmetry
Definition: symmetry.h:38
Boption::datatype
DataType datatype()
Definition: options.h:93
Boption::next
Boption * next
Definition: options.h:28
Bparticle
Definition: mg_processing.h:89
Bstring
Definition: Bstring.h:29
project_kill
int project_kill(Bproject *project)
Frees a whole project.
Definition: mg_processing.cpp:1224
project_set_pixel_size
int project_set_pixel_size(Bproject *project, double pixel_size)
Sets the pixel size for all the micrographs.
Definition: mg_processing.cpp:3398
Bmicrograph::box_size
Vector3< long > box_size
Definition: mg_processing.h:230
Vector3< double >
img_reconstruction_sum_weigh
Bimage * img_reconstruction_sum_weigh(Bimage **pacc, int imap, int nmaps, int nthreads, double hi_res)
Combines and weighs a map from several partial maps and weight sets.
Definition: mg_reconstruct.cpp:315
Bimage::symmetry
string & symmetry()
Definition: Bimage.h:596
fft_destroy_plan
int fft_destroy_plan(fft_plan plan)
Deallocates a plan for fast Fourier transforms.
Definition: fft.cpp:87
timer_report
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Definition: timer.cpp:67
View
Definition: View.h:26
Boption::ctf_action
int ctf_action()
Definition: options.h:303
fft_setup_plan
fft_plan fft_setup_plan(long x, long y, long z, fft_direction dir, int opt)
Sets up a plan for fast Fourier transforms.
Definition: fft.cpp:31
option_kill
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Definition: options.cpp:109
Bstring::integer
long integer()
Definition: Bstring.cpp:539
mg_processing.h
Header file for micrograph processing.
Breconstruction::frec
Bstring frec
Definition: mg_processing.h:287
Breconstruction::voxel_size
double voxel_size
Definition: mg_processing.h:292
Unknown_Type
Definition: utilities.h:147
rwimg.h
Header file for 2D and 3D image I/O.
particle_reconstruct
Bimage * particle_reconstruct(Bparticle *partlist, Bsymmetry *sym, int sym_mode, double hi_res, double scale, Vector3< long > size, int ft_size, fft_plan plan, int interp_type=0, int ctf_action=0, double wiener=0.2, int twoD_flag=0, int bootstrap=0, int first=0)
Reciprocal space reconstruction from 2D particle images.
Definition: mg_reconstruct.cpp:99
options.h
Header file for option handlers.
Bplot::resolution_display
void resolution_display(double *fsccut=NULL, double *dprcut=NULL)
Definition: Bplot.cpp:114
Bstring::pre_rev
Bstring pre_rev(char c)
Definition: Bstring.cpp:413
mg_reconstruct.h
Functions for reconstruction.
Vector3::volume
double volume()
Definition: Vector3.h:235
project_update_comment
int project_update_comment(Bproject *project, int n, char **strings)
Puts a set of strings and time in the main comment of a project.
Definition: rwmg.cpp:468
project_reconstruction_partlist
Bparticle * project_reconstruction_partlist(Bproject *project, int num_select, int bootstrap)
List of particle images for reciprocal space reconstruction.
Definition: mg_reconstruct.cpp:236
Bstring::str
string str()
Definition: Bstring.h:42
Boption::values
long values(T1 &v1, T2 &v2)
Definition: options.h:115
bexit
int bexit(int value)
Exit function for cleanup and debugging.
Definition: utilities.cpp:273
timer_start
double timer_start()
Starts timer and prints the time.
Definition: timer.cpp:52
error_show
int error_show(string message, string file, int line)
Displays the error with file and line reference.
Definition: utilities.cpp:755
Bproject
Definition: mg_processing.h:333
Bimage::image
Bsub_image * image
Definition: Bimage.h:188
string_kill
int string_kill(Bstring *list)
Kills a string linked list.
Definition: Bstring.cpp:760
verbose
int verbose
Bplot
Definition: Bplot.h:146