|
Bsoft
2.1.0
Bernard's software package
|
Library functions to merge images. More...
Go to the source code of this file.
Functions | |
| int | img_unique_shift_global_rotate (Bimage *p, Vector3< float > *origin, Vector3< float > *shift, float angle) |
| Shifts and rotates each image as defined in individual shift vectors. More... | |
| int | mg_particle_merge_series (Bproject *project, int mg_ref_select, int mg_index, float mg_rot_ang, int mg_ori_select, Bstring outimg) |
| Aligns and merges (sums) 2D particle images from a focal, or other, series and writes to new image file(s). More... | |
| int | mg_particle_unmerge (Bproject *project, Bproject *orientations, float fom_diff) |
| Gives corresponding particles in a field-of-view the same orientation, figure-of-merit (FOM), and selection–allows selection of best orientation based on best FOM. More... | |
Variables | |
| int | verbose |
Library functions to merge images.
Definition in file mg_merge.cpp.
| int img_unique_shift_global_rotate | ( | Bimage * | p, |
| Vector3< float > * | origin, | ||
| Vector3< float > * | shift, | ||
| float | angle | ||
| ) |
Shifts and rotates each image as defined in individual shift vectors.
| *p | image(s) to be rotated and shifted (converted to floating point). |
| *origin | array of 3-value origin vectors, one for each image. |
| *shift | array of 3-value shift vectors, one for each image. |
| angle | global rotation angle to apply to all images. |
Each image in a Bimage structure is shifted by an unique amount but rotated by the same angle, no scaling or resizing is done. Intended for use in merging single particle images from a focal, or other, series of particles from micrographs.
Definition at line 32 of file mg_merge.cpp.
| int mg_particle_merge_series | ( | Bproject * | project, |
| int | mg_ref_select, | ||
| int | mg_index, | ||
| float | mg_rot_ang, | ||
| int | mg_ori_select, | ||
| Bstring | outimg | ||
| ) |
Aligns and merges (sums) 2D particle images from a focal, or other, series and writes to new image file(s).
Find the reference micrograph based on the input criterion. Read the reference particle images first, followed by the non-reference images. Find shifts and origins, shift each non-reference image to align the two origins and rotate by the difference in in-plane rotational angle (if any) of the two micrographs. Return the normalized sum of images. Images are converted to floating point.
| *project | Project parameter structure |
| mg_ref_select | 0, closest-to-focus; 1, furthest-from-focus; 2, by index; 3, by rotation angle |
| mg_index | Reference by its index in field (for mg_ref_select=2) |
| mg_rot_ang | Reference by micrograph rotation angle (for mg_ref_select=3) |
| mg_ori_select | 0, from parameter file; 1, from cross-correlation; 2, from images; -1, no alignment |
| outimg | prefix and extension for output files |
Definition at line 76 of file mg_merge.cpp.
Gives corresponding particles in a field-of-view the same orientation, figure-of-merit (FOM), and selection–allows selection of best orientation based on best FOM.
| *project | Project structure for micrographs |
| *orientations | Project structure containing orientations to use |
| fom_diff | Threshold for difference between FOMs |
Intended for use in un-merging data from a micrograph series, where the particle images had been merged previously and there is only one set of parameters per field. Set orientations, FOMs, and selection for corresponding particles in a field-of-view to that found in the project structure named orientations. If user wishes to select the orientation and selection value with the highest FOM, the highest FOM (within the specified threshold) is selected. Differences in micrograph rotation angles (with respect to the "reference" micrograph that contains the orientations to be applied) are applied to the output orientation.
Definition at line 271 of file mg_merge.cpp.
|
extern |