Bsoft  2.1.0
Bernard's software package
mg_tomography.h
Go to the documentation of this file.
1 
9 #include "mg_processing.h"
10 #include "rwimg.h"
11 #include "Matrix3.h"
12 
13 #ifndef _mg_tomo_
14 #define _mg_tomo_
15 
16 // Function prototypes
18 int mg_marker_update(Bmicrograph* mg, Bmarker* model, Vector3<double> oriref, int update_location);
20  Vector3<double> ori);
22  Vector3<double> ori, Vector3<double> scale);
24  Matrix3 mat, Vector3<double> ori);
26  Matrix3 mat, Vector3<double> ori, Vector3<double> scale);
27 Bimage* img_gold_particle(Vector3<long> size, double radius);
28 Bmarker* img_find_gold_particles(Bimage* p, int img_select, double radius, long edge, double cutoff);
29 int project_mass_normalize(Bproject* project, double avg, double std, int norm_type,
30  DataType datatype, int setinputZslices, int setoutputZslices,
31  double cutmin, double cutmax, double replace_threshold);
33 double project_fit_intensities(Bproject* project, Bplot* plot=NULL, int flag=0);
35 double project_lambda(Bproject* project, double thickness);
36 double project_thickness(Bproject* project, double lambda);
43 long img_erase_markers(Bimage* p, Bmarker* mark, double marker_radius);
44 Bimage* mg_erase_markers(Bmicrograph* mg, double marker_radius);
45 int project_erase_markers(Bproject* project, double marker_radius);
47 long project_find_markers(Bproject* project, long edge, int add);
48 long mg_find_markers(Bmicrograph* mg, long edge, int add);
52 long project_show_errors(Bproject* project, double error_cutoff);
53 long project_deselect_markers(Bproject* project, Bstring& deselect_list);
54 long project_delete_markers(Bproject* project, Bstring& delete_list);
56 long project_mg_select(Bproject* project, Bstring& mg_select);
57 long project_mg_exclude(Bproject* project, Bstring& mg_exclude);
58 int project_set_tilt_axis(Bproject* project, double tilt_axis);
60 int project_set_tilt_angles(Bproject* project, double tilt_start, double tilt_step);
63 int project_mg_marker_select(Bproject* project, double fom);
64 int project_set_marker_radius(Bproject* project, double mark_radius);
65 int project_check_markers(Bproject* project, int flags);
68 int micrograph_clear_extraneous_areas(Bmicrograph* mg, Bimage* p, long thickness, double width);
69 int project_clear_extraneous_areas(Bproject* project, long thickness, double width);
72 
73 #endif
74 
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:2177
project_delete_markers
long project_delete_markers(Bproject *project, Bstring &delete_list)
Deletes selected markers in a project hierarchy.
Definition: mg_tomography.cpp:1660
Bmicrograph
Definition: mg_processing.h:201
project_mg_marker_select
int project_mg_marker_select(Bproject *project, double fom)
Selects markers.
Definition: mg_tomography.cpp:2058
mg_find_markers
long mg_find_markers(Bmicrograph *mg, long edge, int add)
Finds markers in a micrograph.
Definition: mg_tomography.cpp:1419
img_gold_particle
Bimage * img_gold_particle(Vector3< long > size, double radius)
Generates an image representing a gold particle.
Definition: mg_tomography.cpp:188
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:2108
Bstring
Definition: Bstring.h:29
project_calculate_model
int project_calculate_model(Bproject *project)
Calculates the z-coordinates of the marker model.
Definition: mg_tomography.cpp:1083
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:844
project_mass_normalize
int project_mass_normalize(Bproject *project, double avg, double std, int norm_type, DataType datatype, int setinputZslices, int setoutputZslices, double cutmin, double cutmax, double replace_threshold)
Normalizes a set of images in a project to a desired average and standard deviation.
Definition: mg_tomography.cpp:379
Vector3< double >
Matrix3.h
3x3 Matrix manipulation functions
mg_composite_particle
Bimage * mg_composite_particle(Bmicrograph *mg, Vector3< long > size)
Generates an average particle image from a micrograph.
Definition: mg_tomography.cpp:1454
Bplot
Definition: Bplot.h:146
project_thickness
double project_thickness(Bproject *project, double lambda)
Determines the thickness from a tilt series and mean free path.
Definition: mg_tomography.cpp:820
project_lambda
double project_lambda(Bproject *project, double thickness)
Determines the mean free path from a tilt series and thickness.
Definition: mg_tomography.cpp:795
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:2079
Bmarker
Definition: marker.h:21
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:1966
project
Bproject * project
Definition: bshow.cpp:33
Matrix3
Definition: Matrix3.h:18
mg_tomo_residuals
double mg_tomo_residuals(Bmicrograph *mg, Bmarker *model, Vector3< double > oriref)
Calculates the residuals for an alignment solution of one micrograph.
Definition: mg_tomography.cpp:1006
project_erase_markers
int project_erase_markers(Bproject *project, double marker_radius)
Erases or paints markers in micrographs.
Definition: mg_tomography.cpp:1294
mg_location_from_3D_model
Vector3< double > mg_location_from_3D_model(Vector3< double > loc, Matrix3 mat, Vector3< double > ori)
Calculates the 2D location of a marker from a 3D model.
Definition: mg_tomography.cpp:140
project_marker_rotation_axis
double project_marker_rotation_axis(Bproject *project)
Determines the most likely rotation axis location for a tilt series.
Definition: mg_tomography.cpp:2341
project_invert_matrices
int project_invert_matrices(Bproject *project)
Inverts the micrograph matrices in a project parameter structure.
Definition: mg_tomography.cpp:2036
project_tomo_residuals
double project_tomo_residuals(Bproject *project, int show)
Calculates the residuals for an alignment solution.
Definition: mg_tomography.cpp:868
project_fit_intensities
double project_fit_intensities(Bproject *project, Bplot *plot=NULL, int flag=0)
Determines the thickness to mean free path ratio from a tilt series.
Definition: mg_tomography.cpp:619
project_clear_extraneous_areas
int project_clear_extraneous_areas(Bproject *project, long thickness, double width)
Clears areas from a tilt series not used in a reconstruction.
Definition: mg_tomography.cpp:2260
Bimage
General image parameter class.
Definition: Bimage.h:177
Bproject
Definition: mg_processing.h:336
show
int show(0)
project_thickness_to_lambda_ratio
double project_thickness_to_lambda_ratio(Bproject *project)
Determines the thickness to mean free path ratio from a tilt series.
Definition: mg_tomography.cpp:696
project_renumber_markers
long project_renumber_markers(Bproject *project)
Renumbers the markers in a project hierarchy.
Definition: mg_tomography.cpp:1732
project_intensity_plot
Bplot * project_intensity_plot(Bproject *project)
Transfers the micrograph intensities for a field into a plot.
Definition: mg_tomography.cpp:515
project_mg_select
long project_mg_select(Bproject *project, Bstring &mg_select)
Selects micrographs in a project hierarchy.
Definition: mg_tomography.cpp:1801
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:2143
img_erase_markers
long img_erase_markers(Bimage *p, Bmarker *mark, double marker_radius)
Erases or paints markers in an image.
Definition: mg_tomography.cpp:1236
project_invert_tilt_axis
int project_invert_tilt_axis(Bproject *project)
Inverts the tilt axis in a project parameter structure.
Definition: mg_tomography.cpp:1911
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:1889
project_show_markers
long project_show_markers(Bproject *project)
Shows the markers in a project hierarchy.
Definition: mg_tomography.cpp:1535
micrograph_clear_extraneous_areas
int micrograph_clear_extraneous_areas(Bmicrograph *mg, Bimage *p, long thickness, double width)
Clears extraneous areas from a micrograph.
Definition: mg_tomography.cpp:2232
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:1936
model
Bmodel * model
Definition: bshow.cpp:34
rwimg.h
Header file for 2D and 3D image I/O.
project_tomo_errors
double project_tomo_errors(Bproject *project)
Analyzes marker errors.
Definition: mg_tomography.cpp:1040
project_merge_rec_markers
int project_merge_rec_markers(Bproject *project)
Merges the markers for two reconstructions.
Definition: mg_tomography.cpp:2380
img_find_gold_particles
Bmarker * img_find_gold_particles(Bimage *p, int img_select, double radius, long edge, double cutoff)
Finds gold particles in micrograph images.
Definition: mg_tomography.cpp:228
mg_processing.h
Header file for micrograph processing.
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:1565
mg_erase_markers
Bimage * mg_erase_markers(Bmicrograph *mg, double marker_radius)
Erases or paints markers in micrographs.
Definition: mg_tomography.cpp:1260
mg_marker_init
int mg_marker_init(Bmicrograph *mg, Bmarker *model)
Initializes markers from the reference.
Definition: mg_tomography.cpp:30
project_mg_exclude
long project_mg_exclude(Bproject *project, Bstring &mg_exclude)
Deselects micrographs in a project hierarchy.
Definition: mg_tomography.cpp:1839
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:1349
DataType
DataType
Base data type specifier.
Definition: utilities.h:150
project_count_markers
long project_count_markers(Bproject *project)
Counts the markers in a project hierarchy.
Definition: mg_tomography.cpp:1507
project_find_markers
long project_find_markers(Bproject *project, long edge, int add)
Finds all markers in a project.
Definition: mg_tomography.cpp:1394
project_generate_markers
int project_generate_markers(Bproject *project)
Generates missing micrograph and model markers.
Definition: mg_tomography.cpp:1204
mg_marker_update
int mg_marker_update(Bmicrograph *mg, Bmarker *model, Vector3< double > oriref, int update_location)
Calculates the predicted positions of markers from the reference.
Definition: mg_tomography.cpp:60
project_deselect_markers
long project_deselect_markers(Bproject *project, Bstring &deselect_list)
Deletes selected markers in a project hierarchy.
Definition: mg_tomography.cpp:1603