/Users/bernard/b20/bsoft/src/mg/mg_helix.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/mg/mg_helix.cpp - Functions to process helical data.

SYNOPSIS

#include 'Bimage.h'
#include 'mg_processing.h'
#include 'mg_img_proc.h'
#include 'mg_helix.h'
#include 'mg_extract.h'
#include 'spline.h'
#include 'linked_list.h'
#include 'Complex.h'
#include 'utilities.h'
#include 'timer.h'

  Functions
double * filament_profile (Bfilnode *fnode, Bimage *p, long img_num, int id, double width, long &n)
Calculates a filament profile and node profile.
double nodes_center (Bfilnode *fnode, Bimage *p, long img_num, int width)
double filaments_center (Bfilament *fillist, Bimage *p, long img_num, int filament_width)
Centers filament nodes in a micrograph.
double project_center_filaments (Bproject *project, int filament_width)
Centers filament nodes in all micrographs in a project.
int project_filament_powerspectrum (Bproject *project, int pad, int rotated, Bstring &path)
Calculates and average power spectrum from filaments.
Bimage * project_filament_density (Bproject *project, int filament_width)
Extracts filament images from micrographs defined in a project and estimates their density per length.
int mg_generate_layer_lines (Bmicrograph *mg, int rad_lim)
Generates layer lines given the unit cell vectors.
int img_mask_layer_lines (Bimage *p, Blayerline *layer_line, float helix_axis, float width)
Masks the image using the list of layer lines.
double * img_extract_layer_line (Bimage *p, Blayerline *line, float helix_axis, int length)
Extracts one layer line from an image.
int mg_extract_show_layer_lines (Bmicrograph *mg, int length, int show)
Extracts and prints layer lines from an image with corresponding Bessel functions.

  Variables
int verbose

Detailed Description

Functions to process helical data.

Author:
    Bernard Heymann

Date:
    Created: 20061110

    Modified: 20170623

Definition in file mg_helix.cpp.

Function Documentation

  double* filament_profile (Bfilnode * fnode, Bimage * p, long img_num, int id, double width, long & n)

Calculates a filament profile and node profile.

Parameters:
    *fnode node list.
    *p image with filament.
    img_num sub-image number.
    id identifier of selected node.
    width width of box around filament.
    &n number of elements in the profile.

Returns:
    double* two profile arrays, each length n.

    A filament image is extracted from the micrograph along a spline through
    the nodes. The overall profile and the profile around a specified node
    are calculated and returned in a single array.
    It only works for 2D images.

Definition at line 39 of file mg_helix.cpp.

  double filaments_center (Bfilament * fillist, Bimage * p, long img_num, int filament_width)

Centers filament nodes in a micrograph.

Parameters:
    *fillist list of filaments.
    *p image with filament.
    img_num sub-image number.
    filament_width width of box around filament.

Returns:
    double average correlation coefficient.

    The profile for each node is calculated and centered by cross-correlation
    with the mirrored profile.

Definition at line 190 of file mg_helix.cpp.

  double* img_extract_layer_line (Bimage * p, Blayerline * line, float helix_axis, int length)

Extracts one layer line from an image.

Parameters:
    *p power spectrum.
    *line layer line.
    helix_axis helix axis angle.
    length length of line.

Returns:
    double* array with line values.

Definition at line 551 of file mg_helix.cpp.

  int img_mask_layer_lines (Bimage * p, Blayerline * layer_line, float helix_axis, float width)

Masks the image using the list of layer lines.

Parameters:
    *p complex image.
    *layer_line layer line list.
    helix_axis helix axis angle.
    width width of mask for a line.

Returns:
    int number of lines or error code.

Definition at line 499 of file mg_helix.cpp.

  int mg_extract_show_layer_lines (Bmicrograph * mg, int length, int show)

Extracts and prints layer lines from an image with corresponding Bessel functions.

Parameters:
    *mg micrograph.
    length length of line.
    show show: 1=extracted layer lines, 2=Bessel functions, 3=both

Returns:
    int 0.

Definition at line 580 of file mg_helix.cpp.

  int mg_generate_layer_lines (Bmicrograph * mg, int rad_lim)

Generates layer lines given the unit cell vectors.

Parameters:
    *mg micrograph.
    rad_lim layer line radial limit.

Returns:
    int number of layer lines generated, <0 on error.

    The structure factor location is given by:
        x = uh + vk
    where u and v are the unit cell vectors,
    and h and k are the associated Miller indices.

Definition at line 456 of file mg_helix.cpp.

  double nodes_center (Bfilnode * fnode, Bimage * p, long img_num, int width)

Definition at line 102 of file mg_helix.cpp.

  double project_center_filaments (Bproject * project, int filament_width)

Centers filament nodes in all micrographs in a project.

Parameters:
    *project project object.
    filament_width width of box around filament.

Returns:
    double average correlation coefficient.

    The profile for each node is calculated and centered by cross-correlation
    with the mirrored profile.

Definition at line 221 of file mg_helix.cpp.

  Bimage* project_filament_density (Bproject * project, int filament_width)

Extracts filament images from micrographs defined in a project and estimates their density per length.

Parameters:
    *project micrograph project.
    filament_width extracted filament width.

Returns:
    Bimage* image with all densities.

Definition at line 375 of file mg_helix.cpp.

  int project_filament_powerspectrum (Bproject * project, int pad, int rotated, Bstring & path)

Calculates and average power spectrum from filaments.

Parameters:
    *project project parameter structure.
    pad additional padding before transformation.
    rotated flag to indicate if particles are already rotated.
    &path path to write power spectra.

Returns:
    int 0.

    Particles derived from picked filaments are extracted and transformed
    to orient the helical axis along the x-axis. These images are then
    Fourier transformed and their power spectra averaged.
    One average per micrograph is calculated.
    Requirements: The filaments must be picked and converted to particle locations.

Definition at line 278 of file mg_helix.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.