Bsoft  2.1.0
Bernard's software package
mg_particles.h File Reference

Manipulates single particle images. More...

#include "rwimg.h"

Go to the source code of this file.

Functions

int project_align_particles (Bproject *project, int part_select, double nuavg, double nustd)
 Aligns single particle images based on orientation parameters. More...
 
int project_center_particles (Bproject *project, int part_select, double nuavg, double nustd)
 Centers single particle images based on the parametric center.
More...
 
int project_set_particle_centers (Bproject *project, Bimage *pref, int part_select, double hires, double lores)
 Calculates centers of single particle images by cross-correlation with a reference.
More...
 
long project_find_part_centers_in_mgs (Bproject *project, double hires, double lores, int filter_flag)
 Finds the centers of picked particles within a micrograph. More...
 
long mg_find_part_centers (Bmicrograph *mg, double hires, double lores, int filter_flag)
 Finds the centers of picked particles within a micrograph. More...
 
Bimage * project_find_particle_centers (Bproject *project, int max_iter, int part_select, double hires, double lores)
 Calculates centers of single particle images.
More...
 
long project_mask_particles (Bproject *project, Bimage *pmask, Bstring &partpath)
 Calculates centers of single particle images.
More...
 
long project_compare_particles (Bproject *project, Bproject *projcomp)
 Compares the coordinates of particles between two files.
More...
 
double project_tilt_from_particle_defocus (Bproject *project)
 Finds the tilt axis from refined particle defocus values.
More...
 
long project_set_particle_defocus_from_tilt (Bproject *project, double axis, double tilt)
 Finds the tilt axis from refined particle defocus values.
More...
 

Detailed Description

Manipulates single particle images.

Author
Bernard Heymann
Date
Created: 20080424
Modified: 20200401

Definition in file mg_particles.h.

Function Documentation

◆ mg_find_part_centers()

long mg_find_part_centers ( Bmicrograph *  mg,
double  hires,
double  lores,
int  filter_flag 
)

Finds the centers of picked particles within a micrograph.

Parameters
*mgmicrograph parameter structure.
hireshigh resolution limit.
loreslow resolution limit.
filter_flagflag to filter extremes in particles.
Returns
long number of particles.
An image processing parameter structure loaded with micrograph
information is used to extract particle images from the micrograph
image using the particle coordinates in the parameter structure.
The extracted particle images are each rotated by PI and the shift
found by cross-correlation between the unrotated and rotated images.
The particle coordinates in the parameter structure are updated with
the shift.

Definition at line 357 of file mg_particles.cpp.

◆ project_align_particles()

int project_align_particles ( Bproject *  project,
int  part_select,
double  nuavg,
double  nustd 
)

Aligns single particle images based on orientation parameters.

Parameters
*projectmicrograph processing parameter structure.
part_selectselection number from the selection column.
nuavgrescale to new average.
nustdrescale to new standard deviation.
Returns
int 0.
Each selected particle image is rotated and shifted.

Definition at line 36 of file mg_particles.cpp.

◆ project_center_particles()

int project_center_particles ( Bproject *  project,
int  part_select,
double  nuavg,
double  nustd 
)

Centers single particle images based on the parametric center.

Parameters
*projectmicrograph processing parameter structure.
part_selectselection number from the selection column.
nuavgrescale to new average.
nustdrescale to new standard deviation.
Returns
int 0.
Each particle image is shifted to center the origin.

Definition at line 138 of file mg_particles.cpp.

◆ project_compare_particles()

long project_compare_particles ( Bproject *  project,
Bproject *  projcomp 
)

Compares the coordinates of particles between two files.

Parameters
*projectproject parameter structure.
*projcompcomparable project parameter structure.
Returns
long number of common particles.
The coordinates of particles in one parameter file is compared to
that of a reference parameter file.
The two parameter files must have the same field and micrograph ID's.

Definition at line 653 of file mg_particles.cpp.

◆ project_find_part_centers_in_mgs()

long project_find_part_centers_in_mgs ( Bproject *  project,
double  hires,
double  lores,
int  filter_flag 
)

Finds the centers of picked particles within a micrograph.

Parameters
*projectproject parameter structure.
hireshigh resolution limit.
loreslow resolution limit.
filter_flagflag to filter extremes in particles.
Returns
int 0.
An image processing parameter structure loaded with micrograph
information is used to extract particle images from the micrograph
image using the particle coordinates in the parameter structure.
The extracted particle images are each rotated by PI and the shift
found by cross-correlation between the unrotated and rotated images.
The particle coordinates in the parameter structure are updated with
the shift.

Definition at line 322 of file mg_particles.cpp.

◆ project_find_particle_centers()

Bimage* project_find_particle_centers ( Bproject *  project,
int  max_iter,
int  part_select,
double  hires,
double  lores 
)

Calculates centers of single particle images.

Parameters
*projectimage processing parameter structure.
max_itermaximum number of iterations.
part_selectselection number from the selection column.
hireshigh resolution limit.
loreslow resolution limit.
Returns
Bimage* final image composite reference.
A composite image is generated from the selected particles and radially
symmetrized. Each image shift is then determined by cross correlation.
This is repeated until the chnage in image shifts decreases below
a threshold.

Definition at line 411 of file mg_particles.cpp.

◆ project_mask_particles()

long project_mask_particles ( Bproject *  project,
Bimage *  pmask,
Bstring &  partpath 
)

Calculates centers of single particle images.

Parameters
*projectimage processing parameter structure.
*pmask3D volume mask to be projected.
&partpathnew path to particle files.
Returns
long number of particles masked.
A 3D mask is projected into each particle view and the particle image masked.

Definition at line 582 of file mg_particles.cpp.

◆ project_set_particle_centers()

int project_set_particle_centers ( Bproject *  project,
Bimage *  pref,
int  part_select,
double  hires,
double  lores 
)

Calculates centers of single particle images by cross-correlation with a reference.

Parameters
*projectmicrograph processing parameter structure.
*prefreference image.
part_selectselection number from the selection column.
hireshigh resolution limit.
loreslow resolution limit.
Returns
int 0.
Each particle image shift is determined by cross correlation with
the reference image.
The reference must be the same size as the particle images.

Definition at line 263 of file mg_particles.cpp.

◆ project_set_particle_defocus_from_tilt()

long project_set_particle_defocus_from_tilt ( Bproject *  project,
double  axis,
double  tilt 
)

Finds the tilt axis from refined particle defocus values.

Parameters
*projectproject parameter structure.
axistilt axis angle (radians).
tilttilt angle (radians).
Returns
long number of selected particles.

Definition at line 805 of file mg_particles.cpp.

◆ project_tilt_from_particle_defocus()

double project_tilt_from_particle_defocus ( Bproject *  project)

Finds the tilt axis from refined particle defocus values.

Parameters
*projectproject parameter structure.
Returns
double average tilt axis.

Definition at line 712 of file mg_particles.cpp.