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

Library routines for interpolating images. More...

`#include "img_interpolate.h"`
`#include "math_util.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
int | img_transform (Bimage *p, Vector3< int > nusize, Vector3< double > scale, Vector3< double > origin, Vector3< double > translate, Matrix3 mat, int fill_type, double fill)
| Transforms an image by translation, rotation, scaling and skewing. More...
int | img_unique_shift_global_rotate (Bimage *p, Vector3< float > *origin, Vector3< float > *shift, float angle)
| Shifts and rotates each image as defined in individual shift vectors. More...

## Variables
int | verbose

## Detailed Description

Library routines for interpolating images.

Author
  Bernard Heymann

Date
  Created: 19990904
  Modified: 20150615

Definition in file img_interpolate.cpp.

## Function Documentation

int img_transform | ( | Bimage * | p,
|  | Vector3< int > | nusize,
|  | Vector3< double > | scale,
|  | Vector3< double > | origin,
|  | Vector3< double > | translate,
|  | Matrix3 | mat,
|  | int | fill_type,
|  | double | fill
| ) |  |

Transforms an image by translation, rotation, scaling and skewing.

Parameters

  *p | image (converted to floating point).
  nusize | 3-value new image size.
  scale | 3-value scale factor vector to apply.
  origin | 3-value origin for rotation and skewing.
  translate | 3-value vector for translation after transformation.
  mat | 3x3 rotation or skewing matrix.
  fill_type | fill type for filling empty regions.
  fill | value to fill in empty regions.

Returns
  int 0.

      A number of transformation types are combined in this function for
      efficiency. The basic operation is the conversion of the image data
      from the original data block to a new data block, applying a
      transformation matrix and translation vector with a specified origin
      followed by an optional translation:
          y = R*x + t
      where   R is the rotation/skewing/scaling matrix.
              t is the translation vector.
      Note: The image is converted to floating point to improve interpolation.

Definition at line 40 of file img_interpolate.cpp.

int img_unique_shift_global_rotate | ( | Bimage * | p,
|  | Vector3< float > * | origin,
|  | Vector3< float > * | shift,
|  | float | angle
| ) |  |

Shifts and rotates each image as defined in individual shift vectors.

Author
  Bernard Heymann and David Belnap

Parameters

  *p | image(s) to be rotated and shifted (converted to floating point).
  *origin | array of 3-value origin vectors, one for each image.
  *shift | array of 3-value shift vectors, one for each image.
  angle | global rotation angle to apply to all images.

Returns
  int number of images.

      Each image in a Bimage structure is shifted by an unique amount but
      rotated by the same angle, no scaling or resizing is done.
      Intended for use in merging single particle images from a focal, or
      other, series of particles from micrographs.

Definition at line 153 of file img_interpolate.cpp.

## Variable Documentation

int verbose