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

Program to patch tiled image files. More...

#include "rwmg.h"
#include "rwimg.h"
#include "file_util.h"
#include "utilities.h"
#include "options.h"
#include "timer.h"
#include <fstream>

Functions

Bimageimg_patch (Bstring *file_list, Bstring tile_file, DataType nudatatype, double cutmin, double cutmax, double nuavg, double nustd)
 Assembles overlapping tiles into a single image. More...
 
int main (int argc, char **argv)
 
int img_pack_into_image (Bimage *p, Bimage *ppatch, Vector3< int > start, Vector3< int > overlap)
 

Variables

int verbose
 
const char * use []
 

Detailed Description

Program to patch tiled image files.

Author
Bernard Heymann
Date
Created: 20040712
Modified: 20190218

Function Documentation

◆ img_pack_into_image()

int img_pack_into_image ( Bimage p,
Bimage ppatch,
Vector3< int >  start,
Vector3< int >  overlap 
)

◆ img_patch()

Bimage * img_patch ( Bstring file_list,
Bstring  tile_file,
DataType  nudatatype,
double  cutmin,
double  cutmax,
double  nuavg,
double  nustd 
)

Assembles overlapping tiles into a single image.

Parameters
*file_listlist of files with tiles.
tile_filetext file specifying the tile size, overlap and locations.
nudatatypenew data type to convert to.
cutminminimum to truncate each tile before assembly.
cutmaxmaximum to truncate each tile before assembly.
nuavgnew average to set each tile before assembly.
nustdnew standard deviation to set each tile before assembly.
Returns
Bimage* new composite image.
Each tile extents halfway into overlapped areas, representing a step
function between tiles.

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ use

const char* use[]
Initial value:
= {
" ",
"Usage: bpatch [options] input.images/input.star",
"-----------------------------------------------",
"Patches a list of tiles together with overlap.",
"Requires a text file generated by btile that specifies the size and order of the tiles.",
"Any number of input images may be given and may include the wild card \"*\".",
"All images must have the same data type.",
" ",
"Parameters:",
"-verbose 3 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).",
"-origin 0.8,-10,15.7 Set the origin of the output image (default 0,0,0).",
"-size 1024,1024,120 Output image size (default from tile file).",
"-mode 1 Overlap handling: 0=average(default), 1=weigh, 2=central.",
"-rescale 127,27.5 Rescale all input data to average and standard deviation.",
"-truncate -5,5.5 Truncate data to minimum and maximum after rescaling.",
" ",
"Input:",
"-tiles text.tiles Text file with overall size and tile origins.",
" ",
"Output:",
"-output output.img Output image (default patch.pif).",
"-parameters file.star Output micrograph parameter file.",
" ",
NULL
}

◆ verbose

int verbose
extern