| Bsoft 2.0.5 Bernard's software package

btrack.cpp
Go to the documentation of this file.
1
9 #include "rwmg.h"
10 #include "rwimg.h"
11 #include "mg_processing.h"
12 #include "mg_img_proc.h"
13 #include "mg_align.h"
14 #include "mg_tomography.h"
15 #include "mg_tomo_track.h"
16 #include "ps_micrograph.h"
17 #include "utilities.h"
18 #include "options.h"
19 #include "timer.h"
20
21
22 // Declaration of global variables
23 extern int verbose; // Level of output to the screen
24
25 // Usage assistance
26 const char* use[] = {
27 " ",
28 "Usage: btrack [options] input.star [input.star]",
29 "-----------------------------------------------",
30 "Track fiducial markers in a tomographic tilt series of micrographs.",
31 " ",
32 "Actions:",
33 "-all Select all markers.",
34 "-updatematrix Update micrograph matrices from tilt and axis angles.",
35 "-pick 1,20,1 Pick seed markers in reference image (1) or all images (2),",
36 " excluding the distance from the edge (in pixels).",
37 " and a flag to add to rather than replace existing markers.",
38 "-generatemarkers Generates markers for all micrographs from a seed.",
39 "-findaxis 10,1.5,-30,50 Finds the tilt axis using seed markers and micrographs ",
40 " near the given tilt angle and with the axis angle step size,",
41 " start and end (default axis parameters: 1,-180,180).",
42 "-track 5,1.5 Track markers: number of iterations and residual target (default 10% of marker radius).",
43 " using zero-tilt reference markers as seed.",
44 "-crossmarker Cross-correlate markers during z-search (default real space correlate).",
45 "-recenter Recenter z coordinates during tracking (default not).",
46 "-refine shifts Refine marker parameters:",
47 " markers: Refine marker micrograph positions.",
48 " z: Refine marker z positions.",
49 " origins: Refine micrograph origins.",
50 " scales: Refine micrograph scales.",
51 " views: Refine view transforms.",
52 " all: Refine origins, scales and views simultaneously.",
53 " 8,v,o,z: Refine iteratively in sequence views, origins and z's.",
54 "-resetmodel Reset the x and y marker coordinates to that of the zero-degree tilt image.",
55 "-angles Calculate micrograph orientation angles.",
56 "-check Determine if markers all fall within micrograph boundaries.",
57 "-fix Fix markers falling outside micrograph boundaries.",
58 "-errors 1.6 Show errors above this threshold (distance in pixels).",
59 "-exclude 0,1,134-140 Exclude these micrographs (can be \"none\").",
60 "-deselect 5-9,33 Deselect markers by id from all micrographs and models.",
61 " ",
62 "Parameters:",
63 "-verbose 7 Verbosity of output.",
64 "-datatype u Force writing of a new data type.",
65 "-sampling 1.5,1.5,1.5 Sampling (A/pixel; a single value can be given).",
66 "-resolution 900,300 High and low resolution limits for cross-correlation (default 0.1,1000 angstrom).",
67 "-origin 110,50,44 Origin for tilt axis (default 0,0,0).",
68 "-axis 74.7 Tilt axis angle relative to x-axis (default 0 or from parameter file).",
69 "-tilt -65,1.5 Tilt series start and step size (default from parameter file).",
70 "-reference 48 Reference image for alignment (default closest to zero tilt).",
71 "-edge 23,12 Smooth the edge to a given width, with gaussian decay of a given width.",
72 "-goldradius 12 Gold particle radius (default from parameter file).",
73 "-shiftlimit 155.5 Limit on micrograph shift search in pixels (default 25% of micrograph width).",
74 "-thickness 2156.5 Estimated tomogram thickness (default and minimum 1000 angstrom).",
75 " ",
76 "Output:",
77 "-output file.star Output parameter file (produces numbered files for tracking).",
78 "-image file.pif Output multi-image file with aligned images.",
79 "-Postscript out.ps Postscript output with marker error plots.",
80 " ",
81 NULL
82 };
83
84
85 int main(int argc, char** argv)
86 {
87 // Initializing variables
88 int select_all(0); // Flag to select all markers
89 int update_matrix(0); // Flag to update micrograph matrix
90 int reset_model(0); // Flag to reset the x and y coordinates of the model
91 int genmarkers(0); // Generates markers for all micrographs from a seed
92 int pickmarkers(0); // Flag to pick markers in reference image (1) or all images (2)
93 int addmarkers(0); // Flag to add picked markers rather than replace old markers
94 double findaxis(0); // Flag and tilt angle to find tilt axis
95 double axis_step(1); // Tilt axis angle step size (in degrees)
96 double axis_start(-180); // Tilt axis angle start (in degrees)
97 double axis_end(180); // Tilt axis angle end (in degrees)
98 int trackmarkers(0); // Flag to align using markers
99 double target(0); // Target resdual to terminate tracking
100 int cc_type(0); // Type of marker correlation: 0=real space, 1=cross correlation
101 int recenter(0); // Flag to recenter z coordinates
102 int edge(0); // Edge to exclude from picking markers
103 int ref_iter(0); // Refine geometric transformations: iterations
104 double ref_tol(1e-4); // Refine geometric transformations: tolerance
105 Bstring refop; // String to define refine operations
106 int fixmarkers(0); // Flag to fix markers falling outside micrograph boundaries
107 int checkmarkers(0); // Flag to determine if markers all fall within micrograph boundaries
108 int calc_angles(0); // Flag to calculate micrograph orientation angles
109 double error_cutoff(0); // Threshold to show errors
110 Bstring mg_exclude; // Micrographs to exclude
111 Bstring deselect; // String specifying markers to deselect
112 double gold_radius(0); // Gold marker radius
113 DataType datatype(Unknown_Type); // Conversion to new type
114 int ref_img(-1); // Reference image for alignment, <0 means find zero tilt
115 Vector3<double> sam; // Units for the three axes (A/pixel)
116 double hi_res(0), lo_res(1000); // Default resolution range
117 Vector3<double> origin; // Tilt axis origin
118 double tilt_axis(0); // Tilt axis angle
119 double tilt_start(0); // Tilt angle start
120 double tilt_step(0); // Tilt_angle step size
121 double edge_width(0), gauss_width(0); // Edge parameters
122 double shift_limit(-1); // Micrograph shift search limit
123 double thickness(1000); // Estimated tomogram thickness in angstrom
124 Bstring paramfile; // Output parameter file
125 Bstring imgfile; // Output multi-image file
126 Bstring psfile; // Output postscript file
127
128 int optind;
129 Boption* option = get_option_list(use, argc, argv, optind);
130 Boption* curropt;
131 for ( curropt = option; curropt; curropt = curropt->next ) {
132 if ( curropt->tag == "all" ) select_all = 1;
133 if ( curropt->tag == "updatematrix" ) update_matrix = 1;
134 if ( curropt->tag == "pick" )
135 if ( curropt->values(pickmarkers, edge, addmarkers) < 1 )
136 cerr << "-pick: A 1 or 2 must be specified." << endl;
137 if ( curropt->tag == "generatemarkers" ) genmarkers = 1;
138 if ( curropt->tag == "findaxis" ) {
139 if ( curropt->values(findaxis,
140 axis_step, axis_start, axis_end) < 1 )
141 cerr << "-findaxis: A tilt angle must be specified." << endl;
142 else {
143 findaxis *= M_PI/180.0;
144 axis_step *= M_PI/180.0;
145 axis_start *= M_PI/180.0;
146 axis_end *= M_PI/180.0;
147 }
148 }
149 if ( curropt->tag == "track" )
150 if ( curropt->values(trackmarkers, target) < 1 )
151 cerr << "-track: A maximum number of iterations must be specified." << endl;
152 if ( curropt->tag == "crossmarker" ) cc_type = 1;
153 if ( curropt->tag == "recenter" ) recenter = 1;
154 if ( curropt->tag == "refine" ) {
155 ref_iter = curropt->value.integer();
156 if ( ref_iter < 1 ) {
157 ref_iter = 1;
158 refop = curropt->value.substr(0,1).lower();
159 } else {
160 refop = curropt->value.post(',').remove(',');
161 }
162 if ( refop.length() < 1 ) {
163 cerr << "-refine: The option is misformed! (" << curropt->value << ")" << endl;
164 bexit(-1);
165 }
166 }
167 if ( curropt->tag == "resetmodel" ) reset_model = 1;
168 if ( curropt->tag == "angles" ) calc_angles = 1;
169 if ( curropt->tag == "check" ) checkmarkers = 1;
170 if ( curropt->tag == "fix" ) fixmarkers = 1;
171 if ( curropt->tag == "errors" )
172 if ( ( error_cutoff = curropt->value.real() ) < 0.001 )
173 cerr << "-errors: An error cutoff value must be specified." << endl;
174 if ( curropt->tag == "exclude" ) mg_exclude = curropt->value;
175 if ( curropt->tag == "deselect" ) deselect = curropt->value;
176 if ( curropt->tag == "datatype" )
177 datatype = curropt->datatype();
178 if ( curropt->tag == "sampling" )
179 sam = curropt->sampling();
180 if ( curropt->tag == "reference" )
181 if ( ( ref_img = curropt->value.integer() ) < 0 )
182 cerr << "-reference: An image number must be specified." << endl;
183 if ( curropt->tag == "resolution" ) {
184 if ( curropt->values(hi_res, lo_res) < 1 )
185 cerr << "-resolution: Resolution limits must be specified." << endl;
186 else if ( hi_res > lo_res )
187 swap(hi_res, lo_res);
188 }
189 if ( curropt->tag == "origin" )
190 origin = curropt->origin();
191 if ( curropt->tag == "axis" ) {
192 if ( ( tilt_axis = curropt->value.real() ) < 1 )
193 cerr << "-axis: The tilt axis angle must be specified." << endl;
194 else {
195 tilt_axis = angle_set_negPI_to_PI(tilt_axis*M_PI/180.0);
196 update_matrix = 1;
197 }
198 }
199 if ( curropt->tag == "tilt" ) {
200 if ( curropt->values(tilt_start, tilt_step) < 2 )
201 cerr << "-tilt: Three angles must be specified." << endl;
202 else {
203 tilt_start = angle_set_negPI_to_PI(tilt_start*M_PI/180.0);
204 tilt_step = angle_set_negPI_to_PI(tilt_step*M_PI/180.0);
205 update_matrix = 1;
206 }
207 }
208 if ( curropt->tag == "edge" )
209 if ( curropt->values(edge_width, gauss_width) < 1 )
210 cerr << "-edge: An edge width must be specified." << endl;
211 if ( curropt->tag == "goldradius" )
212 if ( ( gold_radius = curropt->value.real() ) < 1 )
213 cerr << "-goldradius: A gold marker radius must be specified." << endl;
214 if ( curropt->tag == "shiftlimit" )
215 if ( ( shift_limit = curropt->value.real() ) < 1 )
216 cerr << "-shiftlimit: A shift limit in pixels must be specified." << endl;
217 if ( curropt->tag == "thickness" )
218 if ( ( thickness = curropt->value.real() ) < 1 )
219 cerr << "-thickness: An estimated tomogram tickness must be specified." << endl;
220 if ( curropt->tag == "output" )
221 paramfile = curropt->filename();
222 if ( curropt->tag == "image" )
223 imgfile = curropt->filename();
224 if ( curropt->tag == "Postscript" )
225 psfile = curropt->filename();
226 }
227 option_kill(option);
228
229 double ti = timer_start();
230
231 // Read all the parameter files
232 Bstring* file_list = NULL;
233 while ( optind < argc ) string_add(&file_list, argv[optind++]);
234 if ( !file_list ) {
235 cerr << "Error: No parameter or image files specified!" << endl;
236 bexit(-1);
237 }
238
239 Bproject* project = read_project(file_list);
240 string_kill(file_list);
241
242 if ( !project || !project->field || !project->field->mg ) {
243 cerr << "Error: No micrographs in input file!" << endl;
244 bexit(-1);
245 }
246
247 if ( verbose & VERB_PROCESS )
248 project_show_markers(project);
249
250 project_update_comment(project, argc, argv);
251
252 Bstring label = get_cmd_line(argc, argv);
253
254 project_sort_markers_by_id(project);
255
256 if ( origin[0] )
257 project_set_micrograph_origins(project, origin);
258
259 if ( project->field->mg->origin[0] < 1 || project->field->mg->origin[1] < 1 )
260 project_set_nominal_mg_origins(project);
261
262 if ( mg_exclude.length() )
263 project_mg_exclude(project, mg_exclude);
264
265 if ( deselect.length() )
266 project_deselect_markers(project, deselect);
267
268 if ( tilt_axis )
269 project_set_tilt_axis(project, tilt_axis);
270
271 if ( tilt_step )
272 project_set_tilt_angles(project, tilt_start, tilt_step);
273
274 if ( project->field->mg->matrix.determinant() < 0.5 )
275 update_matrix = 1;
276
277 if ( update_matrix )
278 project_mg_tilt_to_matrix(project);
279
280 if ( sam[0] > 0 )
281 project_set_pixel_size(project, sam[0]);
282
283 int i;
284 Bmicrograph* mg_ref = NULL;
285 if ( ref_img > -1 )
286 for ( i=0, mg_ref=project->field->mg; mg_ref && ( i<ref_img ); mg_ref=mg_ref->next, i++ ) ;
287
288 if ( !mg_ref )
289 mg_ref = field_find_zero_tilt_mg(project->field);
290 // cout << "Reference micrograph: " << mg_ref->id << " (" << mg_ref->img_num << ")" << endl;
291
292 if ( !mg_ref->mark && !pickmarkers )
293 for ( mg_ref = project->field->mg; mg_ref && !mg_ref->mark; mg_ref = mg_ref->next ) ;
294 // cout << "Reference micrograph: " << mg_ref->id << " (" << mg_ref->img_num << ")" << endl;
295
296 if ( !mg_ref ) {
297 mg_ref = field_find_zero_tilt_mg(project->field);
298 if ( !pickmarkers ) pickmarkers = 1;
299 }
300
301 if ( verbose )
302 cout << "Reference micrograph: " << mg_ref->id << " (" << mg_ref->img_num << ")" << endl;
303
304 if ( pickmarkers == 1 )
305 mg_find_markers(mg_ref, edge, addmarkers);
306 else if ( pickmarkers == 2 )
307 project_find_markers(project, edge, addmarkers);
308
309 Bstring id("1");
310 if ( !project->rec ) reconstruction_add(&project->rec, id);
311
312 if ( gold_radius ) {
313 project_set_marker_radius(project, gold_radius);
314 } else {
315 project->rec->mark_radius = mg_ref->mark_radius;
316 }
317
318 if ( project->rec->origin.length() < 1 )
319 project->rec->origin = micrograph_get_nominal_origin(mg_ref);
320
321 if ( select_all )
322 project_mg_marker_select(project, -1);
323
324 if ( findaxis )
325 project_find_tilt_axis(project, findaxis, axis_start, axis_end, axis_step, hi_res, lo_res, shift_limit);
326
327 if ( !project->rec->mark )
328 project_calculate_model(project);
329
330 if ( genmarkers )
331 project_generate_markers(project);
332
333 if ( reset_model && project->rec->mark )
334 mg_reset_model(mg_ref, project->rec->mark);
335
336 if ( checkmarkers )
337 project_check_markers(project, 1);
338
339 if ( fixmarkers && project->rec->mark )
340 project_fix_markers(project);
341
342 if ( trackmarkers > 0 )
343 // project_track_markers(project, hi_res, lo_res, shift_limit,
344 // thickness, trackmarkers, target, cc_type, recenter, paramfile);
345 project_track_markers_dual(project, hi_res, lo_res, shift_limit,
346 thickness, trackmarkers, target, cc_type, recenter, paramfile);
347
348 if ( ref_iter && refop[0] == 'm' )
349 project_refine_markers(project, hi_res, lo_res);
350
351 if ( ref_iter && project->rec->mark )
352 project_refine(project, ref_iter, ref_tol, refop);
353
354 if ( calc_angles )
355 project_calculate_angles(project);
356
357 if ( checkmarkers || fixmarkers || ref_iter ) {
358 project_tomo_errors(project);
359 project_tomo_residuals(project, 1);
360 }
361
362 if ( error_cutoff )
363 project_show_errors(project, error_cutoff);
364
365 if ( psfile.length() ) {
366 if ( verbose )
367 cout << "Writing " << psfile << endl;
368 ps_marker_errors(psfile, psfile, project);
369 }
370
371 if ( paramfile.length() ) {
372 if ( verbose )
373 cout << "Writing " << paramfile << endl;
374 write_project(paramfile, project, 0, 0);
375 }
376
377 if ( imgfile.length() ) {
378 if ( verbose )
379 cout << "Writing " << imgfile << endl;
380 project_write_aligned_images(project, NULL, imgfile, datatype, label);
381 }
382
383 project_kill(project);
384
385 if ( verbose & VERB_TIME )
386 timer_report(ti);
387
388 bexit(0);
389 }
390
write_project
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
Definition: rwmg.cpp:320
main
int main(int argc, char **argv)
Definition: btrack.cpp:85
rwmg.h
Header file for reading and writing micrograph parameters.
Bstring::real
double real()
Definition: Bstring.cpp:545
ps_micrograph.h
Header file for postscript tools dealing with micrograph particle sets.
string_add
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
Definition: Bstring.cpp:705
Matrix3::determinant
double determinant()
Definition: Matrix3.h:260
Bproject::rec
Breconstruction * rec
Definition: mg_processing.h:344
Bstring::post
Bstring post(char c)
Definition: Bstring.cpp:394
DataType
DataType
Base data type specifier.
Definition: utilities.h:146
project_set_micrograph_origins
int project_set_micrograph_origins(Bproject *project, Vector3< float > origin)
Sets micrograph origins to the given origin.
Definition: mg_processing.cpp:3531
Vector3::length
double length()
Definition: Vector3.h:222
Bstring::substr
Bstring substr(long start, long len)
Definition: Bstring.cpp:324
Breconstruction::mark
Bmarker * mark
Definition: mg_processing.h:307
project_set_nominal_mg_origins
int project_set_nominal_mg_origins(Bproject *project)
Sets micrograph origins to the centers of the micrographs.
Definition: mg_img_proc.cpp:660
Bmicrograph::id
Bstring id
Definition: mg_processing.h:202
Bmicrograph::img_num
int img_num
Definition: mg_processing.h:211
utilities.h
Header file for general utilities.
Boption::sampling
Vector3< double > sampling()
Definition: options.h:202
project_refine
double project_refine(Bproject *project, int iter, double tol, Bstring refop)
Refines all the alignment parameters.
Definition: mg_tomo_track.cpp:868
Boption::value
Bstring value
Definition: options.h:30
project_show_markers
long project_show_markers(Bproject *project)
Shows the markers in a project hierarchy.
Definition: mg_tomography.cpp:1321
Boption::tag
Bstring tag
Definition: options.h:29
angle_set_negPI_to_PI
double angle_set_negPI_to_PI(double angle)
Returns an angle between -PI and PI.
Definition: utilities.cpp:594
mg_img_proc.h
Header file for image processing from micrograph structures.
use
const char * use[]
Definition: btrack.cpp:26
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
project_tomo_errors
double project_tomo_errors(Bproject *project)
Analyzes marker errors.
Definition: mg_tomography.cpp:843
Bstring::remove
Bstring remove(const char c)
Definition: Bstring.cpp:465
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:107
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.
Breconstruction::mark_radius
double mark_radius
Definition: mg_processing.h:301
project_set_marker_radius
int project_set_marker_radius(Bproject *project, double mark_radius)
Sets the marker radius in a project parameter structure.
Definition: mg_tomography.cpp:1862
Bmicrograph::matrix
Matrix3 matrix
Definition: mg_processing.h:222
reconstruction_add
Breconstruction * reconstruction_add(Breconstruction **rec, Bstring &rec_id)
Adds a reconstruction parameter structure to a linked list.
Definition: mg_processing.cpp:704
mg_align.h
Header file for functions to align micrographs or coordinates from micrographs and apply the resultan...
project_check_markers
int project_check_markers(Bproject *project, int flags)
Checks if the markers in a project parameter structure fall within micrographs.
Definition: mg_tomography.cpp:1891
M_PI
#define M_PI
Definition: utilities.h:59
project_fix_markers
int project_fix_markers(Bproject *project)
Checks if the markers in a project parameter structure fall within micrographs.
Definition: mg_tomography.cpp:1926
project_generate_markers
int project_generate_markers(Bproject *project)
Generates missing micrograph and model markers.
Definition: mg_tomography.cpp:1007
project_write_aligned_images
double project_write_aligned_images(Bproject *project, Bimage *pgr, Bstring &imgfile, DataType datatype, Bstring &label)
Calculates aligned micrograph images and write them to a file.
Definition: mg_align.cpp:950
Boption
A class for a command line input option.
Definition: options.h:26
Bmicrograph::mark_radius
double mark_radius
Definition: mg_processing.h:235
Bproject::field
Bfield * field
Definition: mg_processing.h:343
VERB_TIME
#define VERB_TIME
Definition: utilities.h:110
ps_marker_errors
int ps_marker_errors(Bstring &filename, Bmarker *set1, Bmarker *set2, Transform t, Vector3< int > size, float err_scale)
Output a postscript file that graphs the deviations of points in a Bmarker from their predicted locat...
Definition: ps_marker.cpp:34
project_mg_tilt_to_matrix
int project_mg_tilt_to_matrix(Bproject *project)
Sets the matrix from the tilt and axis angles for each micrograph.
Definition: mg_tomography.cpp:1960
field_find_zero_tilt_mg
Bmicrograph * field_find_zero_tilt_mg(Bfield *field)
Finds the micrograph closest to a zero degree tilt in a series.
Definition: mg_processing.cpp:400
Bmicrograph
Definition: mg_processing.h:200
project_tomo_residuals
double project_tomo_residuals(Bproject *project, int show)
Calculates the residuals for an alignment solution.
Definition: mg_tomography.cpp:671
mg_tomography.h
Header file for single particle image processing in Bsoft.
Bmicrograph::origin
Vector3< double > origin
Definition: mg_processing.h:220
project_find_tilt_axis
double project_find_tilt_axis(Bproject *project, double tilt, double axis_start, double axis_end, double axis_step, double hi_res, double lo_res, double shift_limit)
Finds the tilt axis for a tomographic tilt series.
Definition: mg_tomo_track.cpp:153
mg_tomo_track.h
Functions to track fiducial markers in a tomographic series of images.
mg_reset_model
int mg_reset_model(Bmicrograph *mg, Bmarker *model)
Resets the model x and y coordinates from the zero-tilt micrograph.
Definition: mg_tomography.cpp:1135
project_set_tilt_angles
int project_set_tilt_angles(Bproject *project, double tilt_start, double tilt_step)
Sets the tilt and tilt axis angles in a project parameter structure.
Definition: mg_tomography.cpp:1719
mg_find_markers
long mg_find_markers(Bmicrograph *mg, long edge, int add)
Finds markers in a micrograph.
Definition: mg_tomography.cpp:1205
Bmicrograph::mark
Bmarker * mark
Definition: mg_processing.h:242
Bfield::mg
Bmicrograph * mg
Definition: mg_processing.h:264
verbose
int verbose
project_sort_markers_by_id
int project_sort_markers_by_id(Bproject *project)
Sorts markers for each micrograph by ID number.
Definition: mg_tomography.cpp:647
project_find_markers
long project_find_markers(Bproject *project, long edge, int add)
Finds all markers in a project.
Definition: mg_tomography.cpp:1180
Boption::datatype
DataType datatype()
Definition: options.h:93
Boption::next
Boption * next
Definition: options.h:28
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
project_deselect_markers
long project_deselect_markers(Bproject *project, Bstring &deselect_list)
Deletes selected markers in a project hierarchy.
Definition: mg_tomography.cpp:1389
Vector3< double >
Boption::origin
Vector3< double > origin()
Definition: options.h:180
timer_report
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Definition: timer.cpp:67
project_refine_markers
int project_refine_markers(Bproject *project, double hi_res, double lo_res)
Refines marker positions in a tomographic series.
Definition: mg_tomo_track.cpp:683
Bstring::lower
Bstring lower()
Definition: Bstring.cpp:308
project_set_tilt_axis
int project_set_tilt_axis(Bproject *project, double tilt_axis)
Sets the tilt axis angle in a project parameter structure.
Definition: mg_tomography.cpp:1672
micrograph_get_nominal_origin
Vector3< double > micrograph_get_nominal_origin(Bmicrograph *mg)
Gets the nominal origin for a micrograph.
Definition: mg_img_proc.cpp:631
project_mg_marker_select
int project_mg_marker_select(Bproject *project, double fom)
Selects markers.
Definition: mg_tomography.cpp:1841
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
project_calculate_angles
int project_calculate_angles(Bproject *project)
Calculates tilt and tilt axis angles from matrices in a project parameter structure.
Definition: mg_tomography.cpp:1749
mg_processing.h
Header file for micrograph processing.
Unknown_Type
Definition: utilities.h:147
rwimg.h
Header file for 2D and 3D image I/O.
options.h
Header file for option handlers.
project_show_errors
long project_show_errors(Bproject *project, double error_cutoff)
Shows the errors in marker coordinates in a project hierarchy.
Definition: mg_tomography.cpp:1351
project_calculate_model
int project_calculate_model(Bproject *project)
Calculates the z-coordinates of the marker model.
Definition: mg_tomography.cpp:886
project_mg_exclude
long project_mg_exclude(Bproject *project, Bstring &mg_exclude)
Deselects micrographs in a project hierarchy.
Definition: mg_tomography.cpp:1623
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
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
project_track_markers_dual
int project_track_markers_dual(Bproject *project, double hi_res, double lo_res, double shift_limit, double thickness, int max_cycle, double target, int cc_type, int recenter, Bstring paramfile)
Aligns markers in a tomographic series.
Definition: mg_tomo_track.cpp:489
Bproject
Definition: mg_processing.h:333
string_kill
int string_kill(Bstring *list)
Kills a string linked list.
Definition: Bstring.cpp:760
Bmicrograph::next
Bmicrograph * next
Definition: mg_processing.h:201