Bsoft  1.9
Bernard's software package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
img_interpolate.h File Reference

Library routines for interpolating images. More...

#include "rwimg.h"
#include "View.h"
#include "Euler.h"
#include "Transform.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...
 

Detailed Description

Library routines for interpolating images.

Author
Bernard Heymann
Date
Created: 19990904
Modified: 20150616

Definition in file img_interpolate.h.

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
*pimage (converted to floating point).
nusize3-value new image size.
scale3-value scale factor vector to apply.
origin3-value origin for rotation and skewing.
translate3-value vector for translation after transformation.
mat3x3 rotation or skewing matrix.
fill_typefill type for filling empty regions.
fillvalue 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
*pimage(s) to be rotated and shifted (converted to floating point).
*originarray of 3-value origin vectors, one for each image.
*shiftarray of 3-value shift vectors, one for each image.
angleglobal 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.