| Bsoft 2.0.5 Bernard's software package

Functions | Variables
img_radon.cpp File Reference

Radon transform functions. More...

`#include "kernlut.h"`
`#include "gal_ricoI.h"`
`#include "sin_gal.h"`
`#include "pocs_tool.h"`
`#include "proj_tool.h"`
`#include "radon_util.h"`
`#include "img_radon.h"`
`#include "mg_processing.h"`
`#include "Bimage.h"`
`#include "symmetry.h"`
`#include "Matrix.h"`
`#include "linked_list.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bimage * | img_radon_transform (Bimage *p, int type, int nkernel, int kernel_power, int padd, int ntheta)
| Calculates the Radon transform of an image. More...
Bimage * | img_radon_inverse_transform (Bimage *p, int type, int nkernel, int kernel_power, int padd)
| Calculates a 3D image from a Radon transform. More...
int | img_radon_pocs_filter (Bimage *p, int n_cyc_out, int n_cyc_in, double rad_3D, double rad_plane, int support, Bimage *pmask)
| Filters a radon transform using the POCS method. More...
Bimage * | img_radon_reconstruction (Bproject *project, Bsymmetry *sym, Bstring &file_mask, int rec_size, int ntheta, int table_size, double threshold, Vector3< double > origin, int nkernel, int kernel_power)
| Reconstructs a Radon transform from a set of projections. More...
int | img_resize_to_next_power2 (Bimage *p, int fill_type, double fill)
| Resizes without interpolation or rescaling to the next power of 2. More...

## Variables
int | verbose

## Detailed Description

Radon transform functions.

Author
  Salvatore Lanzavecchia, Francesca Cantele and Pier Luigi Bellon Dip. Chimica Strutturale e Stereochimica Inorganica, Via Venezian 21, 20133 Milano, Italy
  Bernard Heymann Rm 1515, 50 South Dr., NIH, Bethesda, MD, 20892, USA

Date
  Created: 2001 05 19
  Modified: 20160728 (BH)

Definition in file img_radon.cpp.

## Function Documentation

## ◆ img_radon_inverse_transform()

Bimage* img_radon_inverse_transform | ( | Bimage * | p,
|  | int | type,
|  | int | nkernel,
|  | int | kernel_power,
|  | int | padd
| ) |  |

Calculates a 3D image from a Radon transform.

Parameters

  *p | radon transform to be back-transformed.
  type | type of transformation.
  nkernel | kernel size.
  kernel_power | kernel exponent (usually 2).
  padd | padding flag (0=no padding, 1=padding twofold).

Returns
  Bimage* transformed image.

      Type:
      1 = From single axis proj. to 3D structure, output is a 3D image with size (z,z,z)
      2 = From quarter radon transform to single axis proj., output is a gallery of ntheta 2D image with size (z,z)
      3 = From full radon transform to 3D structure, output is a 3D image with size (z,z,z)
      4 = From quarter radon transform to 3D structure, output is a 3D image with size (z,z,z)

Definition at line 141 of file img_radon.cpp.

## ◆ img_radon_pocs_filter()

int img_radon_pocs_filter | ( | Bimage * | p,
|  | int | n_cyc_out,
|  | int | n_cyc_in,
|  | double | rad_3D,
|  | double | rad_plane,
|  | int | support,
|  | Bimage * | pmask
| ) |  |

Filters a radon transform using the POCS method.

Parameters

  *p | radon transform.
  n_cyc_out | outer cycles, swapping r,phi and r,theta planes
  n_cyc_in | inner cycles, within r,phi and r,theta planes
  rad_3D | limiting radius in 3D.
  rad_plane | limiting radius in plane.
  support | flag to impose finiteness in real space.
  *pmask | mask of dimension (ntheta/2,ntheta/2).

Returns
  Bimage* transformed image.

      Filters a Radon transform to impose consistency and/or to fill holes.
      It can be used in two ways:
      a) When the Radon transform is not completely filled, it fills the holes
          described in the mask file produced by proj_to_radon.
      b) When the Radon transform is filled and noisy, it impose consistency.
      The mask must have the same dimensions as a plane in the radon transform.

Definition at line 221 of file img_radon.cpp.

## ◆ img_radon_reconstruction()

Bimage* img_radon_reconstruction | ( | Bproject * | project,
|  | Bsymmetry * | sym,
|  | Bstring & | file_mask,
|  | int | rec_size,
|  | int | ntheta,
|  | int | table_size,
|  | double | threshold,
|  | Vector3< double > | origin,
|  | int | nkernel,
|  | int | kernel_power
| ) |  |

Reconstructs a Radon transform from a set of projections.

Parameters

  *project | image processing parameter structure.
  *sym | point group symmetry.
  &file_mask | output file name of mask of dimension (ntheta,ntheta).
  rec_size | reconstruction size (x,y,z)
  ntheta | number of angles in the 2*PI range.
  table_size | lookup table size.
  threshold | threshold for rejecting images.
  origin | origin reference for shifts.
  nkernel | kernel size.
  kernel_power | kernel exponent (usually 2).

Returns
  Bimage* transformed image.

      The parameters are defined in the hierarchical project structure.
      The radon transform of each image is calculated and all its
      symmetry-related views are written into the reconstruction volume.
      A mask image is calculated for the angular coverage of orientation
      space and used to weigh the reconstruction.

Definition at line 292 of file img_radon.cpp.

## ◆ img_radon_transform()

Bimage* img_radon_transform | ( | Bimage * | p,
|  | int | type,
|  | int | nkernel,
|  | int | kernel_power,
|  | int | padd,
|  | int | ntheta
| ) |  |

Calculates the Radon transform of an image.

Parameters

  *p | image to be transformed.
  type | type of transformation.
  nkernel | kernel size.
  kernel_power | kernel exponent (usually 2).
  padd | padding flag (0=no padding, 1=padding twofold).
  ntheta | number of angles in the 2*PI range.

Returns
  Bimage* transformed image.

      Computes the Radon transform of a 3D image with all sides equal
      (a cube) and a power of 2. The transform is calculated in spherical
      coordinates where ntheta is the number of sampling points in the
      range 0 - 2*PI along the two angular axes. Because half of this
      range is redundant (0-PI is enough), a smaller output can be
      generated.
          Type:
      1 = From 3D structure to single axis proj., output is a gallery of ntheta 2D image with size (x,x)
      2 = From single axis proj. to quarter radon transform, output is a 3D image with size (x,ntheta/2,ntheta/2)
      3 = From 3D structure to full radon transform, output is a 3D image with size (x,ntheta,ntheta)
      4 = From 3D structure to quarter radon transform, output is a 3D image with size (x,ntheta/2,ntheta/2)

Definition at line 54 of file img_radon.cpp.

## ◆ img_resize_to_next_power2()

int img_resize_to_next_power2 | ( | Bimage * | p,
|  | int | fill_type,
|  | double | fill
| ) |  |

Resizes without interpolation or rescaling to the next power of 2.

Parameters

  p | image (modified).
  fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER
  fill | value to fill in new regions.

Returns
  int 0.

      An image is resized to the next power of two in each dimension
      greater than 1 with translation and filling of new regions with
      a given value.
      The new data replaces the old data.

Definition at line 459 of file img_radon.cpp.

## Variable Documentation

## ◆ verbose

int verbose