 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
22 "Usage: bzfft [options] input.img/input.star [input2.img/input2.star...]",
23 "-----------------------------------------------------------------------",
24 "Assembles slabs and back-transform z-lines for tomogram reconstruction.",
27 "-ytile 50,25 Tile start and size along y dimension (default 0 and y size).",
28 "-rescale -0.1,5.2 Rescale data to average and standard deviation.",
29 "-truncate -0.5,1.2 Truncate data to minimum and maximum after rescaling.",
32 "-verbose 7 Verbosity of output.",
33 "-datatype u Force writing of a new data type.",
34 "-sampling 1.5,1.5,1.5 Sampling of input images (A/pixel; a single value can be given).",
37 "-output new.star Output parameter file name.",
38 "-reconstruction new.map Output image file name.",
43 int main(
int argc,
char **argv)
46 double avg(0), std(0);
47 double cutmin(0), cutmax(0);
49 int ystart(0), ysize(0);
56 for ( curropt = option; curropt; curropt = curropt->
next ) {
57 if ( curropt->
tag ==
"rescale" ) {
58 if ( curropt->
values(avg, std) < 2 )
59 cerr <<
"-rescale: Both average and standard deviation must be specified!" << endl;
61 cerr <<
"-rescale: A positive standard deviation must be specified!" << endl;
63 if ( curropt->
tag ==
"truncate" ) {
64 if ( curropt->
values(cutmin, cutmax) < 2 )
65 cerr <<
"-truncate: Both min and max must be specified!" << endl;
66 if ( cutmin > cutmax ) swap(cutmin, cutmax);
68 if ( curropt->
tag ==
"datatype" )
70 if ( curropt->
tag ==
"sampling" )
71 sam = curropt->
scale();
72 if ( curropt->
tag ==
"ytile" )
73 if ( curropt->
values(ystart, ysize) < 2 )
74 cerr <<
"-ytile: Both start and size must be specified!" << endl;
75 if ( curropt->
tag ==
"output" )
77 if ( curropt->
tag ==
"reconstruction" )
83 cerr <<
"Error: No input files given!" << endl;
90 while ( optind < argc )
string_add(&file_list, argv[optind++]);
108 if ( !pmap )
bexit(-1);
117 avg, std, cutmin, cutmax);
118 if ( !pmap )
bexit(-1);
A class for a command line input option.
int project_kill(Bproject *project)
Frees a whole project.
Vector3< double > scale()
int string_kill(Bstring *list)
Kills a string linked list.
Header file for file checking functions.
int main(int argc, char **argv)
int bexit(int value)
Exit function for cleanup and debugging.
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Header file for option handlers.
int img_backtransform_z_lines(Bimage *p)
The lines along the z-dimensions of a disk-based block is Fourier back-transformed.
long values(T1 &v1, T2 &v2)
Header file for reading and writing micrograph parameters.
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
General image parameter class.
Utilities for timing functions.
int truncate_to_min_max(double minim, double maxim)
Truncates image data to a given minimum and maximum.
double timer_start()
Starts timer and prints the time.
Bproject * read_project(const char *filename, int flags=0)
Reading micrograph parameters from files.
Header file for general utilities.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Bimage * img_extract_ytile(Bstring *file_list, int ystart, int ysize)
Extracts a tile from the image with limits in y.
void change_type(char letter)
Get the data type indicated by a single letter code.
Functions to do a tomographic reconstruction.
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
Bimage * img_backtransform_z_on_disk(Bstring *file_list, Bstring &recfile, DataType datatype, double avg, double std, double cutmin, double cutmax)
The lines along the z-dimensions of a disk-based block is Fourier back-transformed.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
void sampling(long nn, Vector3< double > u)
DataType
Base data type specifier.
Breconstruction * reconstruction_add(Breconstruction **rec, Bstring &rec_id)
Adds a reconstruction parameter structure to a linked list.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
FileType file_type(const char *filename)
Checks the file type using the extension and contents.
int rescale_to_avg_std(double nuavg, double nustd)
Rescales the image data to a given average and standard deviation.