| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
img_pick.cpp File Reference

Library routines to pick particles in images. More...

`#include "Bimage.h"`
`#include "img_pick.h"`
`#include "math_util.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bimage * | img_local_cc (Bimage *p, Bimage *pt, Bimage *pm, double hires, double lores, fft_plan planf, fft_plan planb)
Bimage * | img_prepare_template (Vector3< int > size, double particle_diameter)
| Prepares a template for particle picking. More...
Bimage * | img_prepare_template (Vector3< int > size, double particle_diameter, double gauss_edge)
Bimage * | img_find_template (Bimage *p, Bimage *ptemp, Bimage *pmask, double hires, double lores, int bin)
| Picks particles using cross-correlation with a template. More...
Vector3< double > * | img_find_peaks (Bimage *pcc, double excl_dist, long &ncoor)
| Finds the peaks in a cross-correlation map corresponding to particles. More...
double | img_marker_set_difference_at_voxel (Bimage *p, long i, Bmarker *markin, Bmarker *markout)
Bimage * | img_marker_set_difference (Bimage *p, Bmarker *markin, Bmarker *markout)
| Calculates the average difference between voxels tagged by two marker sets. More...

## Variables
int | verbose

## Detailed Description

Library routines to pick particles in images.

Author
  Bernard Heymann

Date
  Created: 20030428
  Modified: 20151203

Definition in file img_pick.cpp.

## Function Documentation

Vector3<double>* img_find_peaks | ( | Bimage * | pcc,
|  | double | excl_dist,
|  | long & | ncoor
| ) |  |

Finds the peaks in a cross-correlation map corresponding to particles.

Parameters

  *pcc | peak map.
  excl_dist | exclusion distance between peaks.
  &ncoor | number of coordinates.

Returns
  Vector3<double>* list of coordinates.

      The map is searched in increments of the particle radius to identify
      peaks above the threshold and within a box the size of the
      particle radius. The identified peaks are further examined to eliminate
      ones that are too close to a higher scoring peak. The acceptable distance
      between peaks is set to 1.8 times the particle radius.

Definition at line 169 of file img_pick.cpp.

Bimage* img_find_template | ( | Bimage * | p,
|  | Bimage * | ptemp,
|  | Bimage * | pmask,
|  | double | hires,
|  | double | lores,
|  | int | bin
| ) |  |

Picks particles using cross-correlation with a template.

Parameters

  *p | image.
  *ptemp | template image.
  *pmask | reciprocal space mask.
  hires | high resolution limit.
  lores | low resolution limit.
  bin | level of image binning.

Returns
  Bimage* cross-correlation map.

      A flat gaussian template with the given radius and gaussian edge is
      generated and cross-correlated with the input image including
      bandpass filtering to target the size of the template particle.

Definition at line 110 of file img_pick.cpp.

Bimage * img_local_cc | ( | Bimage * | p,
|  | Bimage * | pt,
|  | Bimage * | pm,
|  | double | hires,
|  | double | lores,
|  | fft_plan | planf,
|  | fft_plan | planb
| ) |  |

Definition at line 272 of file img_pick.cpp.

Bimage* img_marker_set_difference | ( | Bimage * | p,
|  | Bmarker * | markin,
|  | Bmarker * | markout
| ) |  |

Calculates the average difference between voxels tagged by two marker sets.

Parameters

  *p | image.
  *markin | inner marker set (relates to particle).
  *markout | outer marker set (relates to background).

Returns
  Bimage* map with resultant differences.

      The values in the image corresponding to the coordinates of the
      inner marker set is subtracted from those of the outer marker set.

Definition at line 396 of file img_pick.cpp.

double img_marker_set_difference_at_voxel | ( | Bimage * | p,
|  | long | i,
|  | Bmarker * | markin,
|  | Bmarker * | markout
| ) |  |

Definition at line 353 of file img_pick.cpp.

Bimage* img_prepare_template | ( | Vector3< int > | size,
|  | double | particle_diameter
| ) |  |

Prepares a template for particle picking.

A double Gaussian sphere with negative and positive amplitudes is calculated so that the integral is zero and the value at the particle radius is zero.

Parameters

  size | image size.
  particle_diameter | particle radius.

Returns
  Bimage* template image.

Definition at line 30 of file img_pick.cpp.

Bimage* img_prepare_template | ( | Vector3< int > | size,
|  | double | particle_diameter,
|  | double | gauss_edge
| ) |  |

Definition at line 72 of file img_pick.cpp.

## Variable Documentation

int verbose