Bsoft 2.1.4
Bernard's software package
balign.cpp File Reference

Aligns two images. More...

#include "rwimg.h"
#include "ps_marker.h"
#include "linked_list.h"
#include "options.h"
#include "utilities.h"
#include "timer.h"

Functions

Transform img_align (Bimage *p1, Bimage *p2, Vector3< long > tile_size, double res_lo, double res_hi, double max_shift, int filter_flag, int refine_flag)
 Aligns the second image to the first. More...
 
int main (int argc, char *argv[])
 

Variables

int verbose
 
const char * use []
 

Detailed Description

Aligns two images.

Author
Bernard Heymann
Date
Created: 20021111
Modified: 20220701

Function Documentation

◆ img_align()

Transform img_align ( Bimage p1,
Bimage p2,
Vector3< long >  tile_size,
double  res_lo,
double  res_hi,
double  max_shift,
int  filter_flag,
int  refine_flag 
)

Aligns the second image to the first.

Parameters
*p1first image.
*p2second image (transformed)
tile_size3-valued vector for the size of sub-images.
res_lolow resolution limit for cross-correlation.
res_hihigh resolution limit for cross-correlation.
max_shiftmaximum shift allowed (default 1/4 of tile).
filter_flagflag to filter micrograph extremes.
refine_flagflag to turn on refinement of shift.
Returns
Transform structure with shift, scale, rotation angle, and R factor.
The second image is transformed to fit on the first image.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

◆ use

const char* use[]
Initial value:
= {
" ",
"Usage: balign [options] input*.img",
"----------------------------------",
"Aligning images to each other.",
"Micrograph mode (option -micrographs):",
"The second input image is aligned to the first, transformed and output.",
"(Note: This program is intended to align very large micrograph images).",
" ",
"Actions:",
"-add Add input images after transforming the second.",
"-filterextremes Filter micrograph extremes before aligning.",
" ",
"Parameters:",
"-verbose 7 Verbosity of output.",
"-datatype u Force writing of a new data type.",
"-sampling 1.5,1.5,1.5 Sampling (A/pixel; a single value can be given).",
"-tile 1024,1024,5 Size of tiles for correlation (default 512,512,1).",
"-resolution 30,500 High and low resolution limits for cross-correlation (default 0.1,1000).",
"-maxshift 55 Maximum allowed shift (default 1/4 of tile).",
" ",
"Output:",
"-output sum.mrc Output sum of the transformed images.",
" ",
NULL
}

◆ verbose

int verbose
extern