 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
20 "Usage: bcomplex [options] input.img output.img",
21 "----------------------------------------------",
22 "Converts complex image forms.",
25 "-size 120,102,200 Resize the image as a Fourier transform.",
26 "-logarithm Calculate the logarithm of the image.",
27 "-amplitudes Convert a complex image to amplitudes.",
28 "-intensities Convert a complex image to intensities.",
29 "-real Convert a complex image to real values.",
30 "-imaginary Convert a complex image to imaginary values.",
31 "-phases Convert a complex image to phases.",
32 "-signed Convert a complex image to amplitudes, with sign based on phase.",
33 "-positive Convert a complex image to be postive definite.",
34 "-friedel Check and apply Friedel symmetry.",
37 "-verbose 7 Verbosity of output.",
38 "-datatype u Force writing of a new data type.",
39 "-sampling 1.5,1.5,1.5 Sampling (A/pixel; a single value can be given).",
44 int main(
int argc,
char **argv)
57 for ( curropt = option; curropt; curropt = curropt->
next ) {
58 if ( curropt->
tag ==
"datatype" )
60 if ( curropt->
tag ==
"sampling" )
61 sam = curropt->
scale();
62 if ( curropt->
tag ==
"size" )
63 nusize = curropt->
size();
64 if ( curropt->
tag ==
"logarithm" )
66 if ( curropt->
tag ==
"amplitudes" )
68 if ( curropt->
tag ==
"intensities" )
70 if ( curropt->
tag ==
"real" )
72 if ( curropt->
tag ==
"imaginary" )
74 if ( curropt->
tag ==
"phases" )
76 if ( curropt->
tag ==
"signed" )
78 if ( curropt->
tag ==
"positive" )
80 if ( curropt->
tag ==
"friedel" )
88 if ( optind < argc - 1 ) dataflag = 1;
90 if ( p == NULL )
bexit(-1);
110 switch ( conv_comp ) {
124 if ( optind < argc ) {
A class for a command line input option.
void complex_to_intensities()
The intensities from a complex image is written to a simple image.
int friedel_apply()
Applies Friedel symmetry.
Vector3< double > scale()
int fspace_positive()
Sets the image to positive definite.
void complex_to_imaginary()
The imaginary part of a complex image is written to a simple image.
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.
Bimage * read_img(char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Vector3< double > change_transform_size(Vector3< long > nusize)
Resizes a "standard" transform.
General image parameter class.
CompoundType compound_type()
Utilities for timing functions.
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
void complex_to_amplitudes()
The amplitudes from a complex image is written to a simple image.
void complex_to_phases()
The phases from a complex image is written to a simple image.
void change_type(char letter)
Get the data type indicated by a single letter code.
Header file for 2D and 3D image I/O.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
int main(int argc, char **argv)
void sampling(long nn, Vector3< double > u)
DataType
Base data type specifier.
void complex_to_signed_amplitudes()
The signed amplitudes from a complex image is written to a simple image.
void logarithm()
Calculates the logarithm of the image data.
double friedel_check()
Checks Friedel symmetry.
void complex_to_real()
The real part of a complex image is written to a simple image.
long statistics()
Calculates the statistics for an image.