Bsoft 2.1.4
Bernard's software package
mg_merge.h File Reference

Header file for functions to merge images. More...

#include "mg_processing.h"
#include "rwimg.h"
#include "Bstring.h"

Functions

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...
 

Detailed Description

Header file for functions to merge images.

Author
David Belnap & Bernard Heymann
Date
Created: 20030410
Modified: 20030901 (BH)

Function Documentation

◆ mg_particle_merge_series()

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).

Author
David Belnap and Bernard Heymann

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.

Parameters
*projectProject parameter structure
mg_ref_select0, closest-to-focus; 1, furthest-from-focus; 2, by index; 3, by rotation angle
mg_indexReference by its index in field (for mg_ref_select=2)
mg_rot_angReference by micrograph rotation angle (for mg_ref_select=3)
mg_ori_select0, from parameter file; 1, from cross-correlation; 2, from images; -1, no alignment
outimgprefix and extension for output files
Returns
int error code.

◆ mg_particle_unmerge()

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.

Author
David Belnap
Parameters
*projectProject structure for micrographs
*orientationsProject structure containing orientations to use
fom_diffThreshold for difference between FOMs
Returns
int error code.
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.