Bsoft  2.1.0
Bernard's software package
btile.cpp File Reference

Program to split an image into overlapping tiles. More...

#include "rwmg.h"
#include "mg_processing.h"
#include "rwimg.h"
#include "file_util.h"
#include "utilities.h"
#include "options.h"
#include "timer.h"

Go to the source code of this file.

Functions

int img_tile_with_overlap (Bimage *p, Bstring outputfile, Vector3< int > size, Vector3< int > overlap, int digits, int first_number, DataType nudatatype)
 Writes overlapping tiles into new images. More...
 
int main (int argc, char **argv)
 

Variables

int verbose
 
const char * use []
 

Detailed Description

Program to split an image into overlapping tiles.

Author
Bernard Heymann
Date
Created: 20040712
Modified: 20160601

Definition in file btile.cpp.

Function Documentation

◆ img_tile_with_overlap()

int img_tile_with_overlap ( Bimage *  p,
Bstring  outputfile,
Vector3< int >  size,
Vector3< int >  overlap,
int  digits,
int  first_number,
DataType  nudatatype 
)

Writes overlapping tiles into new images.

Parameters
*pimage = tile.
outputfileoutput file name.
sizetile size.
overlaptile overlap.
digitsnumber of digits in tile file number.
first_numberfirst tile file number.
nudatatypetile datatype.
Returns
int number of tiles.
Each tile is copied into a new image and written with a numbered file name.
The tiles at the ends of the block may not be the same size as the
other tiles, being truncated at the end of the input data.
A text file with the extension ".tiles" is written with the positions
of the tiles, and it is needed to patch the image together again.

Definition at line 168 of file btile.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 54 of file btile.cpp.

Variable Documentation

◆ use

const char* use[]
Initial value:
= {
" ",
"Usage: btile [options] input.img/input.star output.img",
"------------------------------------------------------",
"Splits an image into overlapping tiles.",
"During tiling, the original size and tile origins are written into a text",
" file with the base of the output file name and the extension \".tiles\".",
"The program bpatch can reassemble the tiles using this text file.",
" ",
"Action:",
"-split Split into multiple images.",
" ",
"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).",
"-size 120,150,70 Size of tiles (default 512,512,512).",
"-overlap 13,15,8 Overlap of tiles (default 0,0,0).",
"-first 5 Number given to the first file (default 0).",
"-digits 3 Number of digits inserted before the last period in the output file name (default 3).",
" ",
"Parameters for reconstructions:",
"-recid rec_1 Reconstruction ID to use.",
" ",
"Output:",
"-output output.star Output parameter file.",
" ",
NULL
}

Definition at line 24 of file btile.cpp.

◆ verbose

int verbose
extern