| 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_helix.cpp File Reference

Dealing with images with helical symmetry. More...

`#include "Bimage.h"`
`#include "img_helix.h"`
`#include "mg_reconstruct.h"`
`#include "matrix_linear.h"`
`#include "trigonometry.h"`
`#include "symmetry.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bplot * | img_find_helix_parameters (Bimage *p, double angle_start, double angle_end, double angle_step, int bin, double hires, double lores, double radius)
| Finds the best helix parameters for helical map. More...
Bplot * | img_find_helix_parameters (Bimage *p, double rise_start, double rise_end, double rise_step, double angle_start, double angle_end, double angle_step, int bin, double radius)
| Finds the best helix parameters for helical map. More...
int | img_helix_segment_correlation_one (Bimage *p, long i, double angle_start, double angle_end, double angle_step, int bin, double hires, double lores, double radius, fft_plan planf, fft_plan planb, double *cc)
Bplot * | img_helix_segment_correlation (Bimage *p, int thickness, double angle_start, double angle_end, double angle_step, int bin, double hires, double lores, double radius)
| Calculates the correlation over rotation angles between helical segments. More...
int | img_distort_elliptically (Bimage *p, double angle, double shift)
| Transforms a tubular cylinder to an elliptical profile. More...
int | img_transform_lines (Bimage *p)
Bimage * | img_helical_cross_section (Bimage *p, double helix_rise, double helix_angle, double scale, double hires)
| Calculates a helical cross section from line transforms of a filament. More...
double | img_snvariance (Bimage *p, double snradius)
| Calculates the ratio of variance inside and outside a given radius. More...
int | img_extrude_cross_section (Bimage *p, int length, double helix_rise, double helix_angle, int fill_type, double fill)
| Extrudes a 2D cross section into a 3D continuous helix. More...
Bplot * | img_filament_width (Bimage *p, int width, int lim_lo, int lim_hi)
| Estimates the width of a filament. More...
Bimage * | img_filament_density (Bimage *p, double width)
| Estimates the density per pixel length of a filament. More...

## Variables
int | verbose

## Detailed Description

Dealing with images with helical symmetry.

Author
  Bernard Heymann

Date
  Created: 20021127
  Modified: 20151128

Definition in file img_helix.cpp.

## Function Documentation

int img_distort_elliptically | ( | Bimage * | p,
|  | double | angle,
|  | double | shift
| ) |  |

Transforms a tubular cylinder to an elliptical profile.

Parameters

  *p | 3D image.
  angle | angle of elliptical maximum.
  shift | outward shift at elliptical maximum radius.

Returns
  int 0.

      The density is shifted towards or away from the origin by a specific
      amount and in a direction determined by an elliptical profile.

Definition at line 489 of file img_helix.cpp.

int img_extrude_cross_section | ( | Bimage * | p,
|  | int | length,
|  | double | helix_rise,
|  | double | helix_angle,
|  | int | fill_type,
|  | double | fill
| ) |  |

Extrudes a 2D cross section into a 3D continuous helix.

Parameters

  *p | image (converted to floating point).
  length | length in z.
  helix_rise | helical subunit rise in angstrom.
  helix_angle | helical subunit rotation in radians.
  fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER.
  fill | value of edge voxels.

Returns
  int 0.

      The helical axis is at the origin and alongthe a axis.

Definition at line 782 of file img_helix.cpp.

Bimage* img_filament_density | ( | Bimage * | p,
|  | double | width
| ) |  |

Estimates the density per pixel length of a filament.

Parameters

  *p | the image with the filament along the y axis.
  width | filament width (pixels).

Returns
  Bimage* one dimensional image with line integrals.

      The filament axis must be along the long axis (x or y).
      The filament width must be about half of the image width.
      The background is calculated for each line from the regions
      outside the width of the filament and subtracted from all
      values in the line.

Definition at line 941 of file img_helix.cpp.

Bplot* img_filament_width | ( | Bimage * | p,
|  | int | width,
|  | int | lim_lo,
|  | int | lim_hi
| ) |  |

Estimates the width of a filament.

Parameters

  *p | the image with the filament along the y axis.
  width | window size.
  lim_lo | minimum filament width.
  lim_hi | maximum filament width.

Returns
  Bplot* plot of filament widths.

      The filament axis must be along the y axis.

Definition at line 837 of file img_helix.cpp.

Bplot* img_find_helix_parameters | ( | Bimage * | p,
|  | double | angle_start,
|  | double | angle_end,
|  | double | angle_step,
|  | int | bin,
|  | double | hires,
|  | double | lores,
|  | double | radius
| ) |  |

Finds the best helix parameters for helical map.

Parameters

  *p | image to be tested.
  angle_start | start value for angle.
  angle_end | end value for angle.
  angle_step | step size for angle.
  bin | bin image for faster searching (limited to 1,2,3).
  hires | high resolution limit in angstroms.
  lores | low resolution limit in angstroms.
  radius | radius for mask (voxels).

Returns
  Bplot* plot with search results.

      An incremental search is done for the rotation angle, with the rise
      inferred from the cross-correlation shift.

Definition at line 37 of file img_helix.cpp.

Bplot* img_find_helix_parameters | ( | Bimage * | p,
|  | double | rise_start,
|  | double | rise_end,
|  | double | rise_step,
|  | double | angle_start,
|  | double | angle_end,
|  | double | angle_step,
|  | int | bin,
|  | double | radius
| ) |  |

Finds the best helix parameters for helical map.

Parameters

  *p | image to be tested.
  rise_start | start value for rise.
  rise_end | end value for rise.
  rise_step | step size for rise.
  angle_start | start value for angle.
  angle_end | end value for angle.
  angle_step | step size for angle.
  bin | bin image for faster searching (limited to 1,2,3).
  radius | radius for mask (voxels).

Returns
  Bplot* plot with search results.

      An incremental search is done for the rise and rotation angle.

Definition at line 189 of file img_helix.cpp.

Bimage* img_helical_cross_section | ( | Bimage * | p,
|  | double | helix_rise,
|  | double | helix_angle,
|  | double | scale,
|  | double | hires
| ) |  |

Calculates a helical cross section from line transforms of a filament.

Parameters

  *p | image (converted to floating point).
  helix_rise | helical subunit rise in angstrom.
  helix_angle | helical subunit rotation in radians.
  scale | scale of cross section.
  hires | high resolution limit.

Returns
  Bimage* 2D cross section image.

      The filament image must be oriented with the helical axis coinciding with
      the y axis. Each row of pixels is transformed and written into a
      2D transform based on an orientation calculated from given helical
      parameters.

Definition at line 607 of file img_helix.cpp.

Bplot* img_helix_segment_correlation | ( | Bimage * | p,
|  | int | thickness,
|  | double | angle_start,
|  | double | angle_end,
|  | double | angle_step,
|  | int | bin,
|  | double | hires,
|  | double | lores,
|  | double | radius
| ) |  |

Calculates the correlation over rotation angles between helical segments.

Parameters

  *p | image to be tested.
  thickness | segment thickness.
  angle_start | start value for angle.
  angle_end | end value for angle.
  angle_step | step size for angle.
  bin | bin image for faster searching (limited to 1,2,3).
  hires | high resolution limit in angstroms.
  lores | low resolution limit in angstroms.
  radius | radius for mask (voxels).

Returns
  Bplot* plot with coefficients over all rotations results.

      The image is split up into segments in the z direction. Every adjacent pair
      of segments are cross-correlated over an angular range to find the best
      rotation. The cross-correlation can be resolution-limited. The image may
      also be masked beyond a radius and binned to speed up execution.

Definition at line 368 of file img_helix.cpp.

int img_helix_segment_correlation_one | ( | Bimage * | p,
|  | long | i,
|  | double | angle_start,
|  | double | angle_end,
|  | double | angle_step,
|  | int | bin,
|  | double | hires,
|  | double | lores,
|  | double | radius,
|  | fft_plan | planf,
|  | fft_plan | planb,
|  | double * | cc
| ) |  |

Definition at line 325 of file img_helix.cpp.

double img_snvariance | ( | Bimage * | p,
|  | double | snradius
| ) |  |

Calculates the ratio of variance inside and outside a given radius.

Parameters

  *p | image (converted to floating point).
  snradius | radius of signal.

Returns
  double the SNR.

      The region outside the radial limit is considered noise and the region
      inside is considered signal plus noise.

Definition at line 717 of file img_helix.cpp.

int img_transform_lines | ( | Bimage * | p | ) |

Definition at line 550 of file img_helix.cpp.

## Variable Documentation

int verbose