Table of Contents
Bsoft is a package with multiple levels of processing, from mundane file format conversions to complex image and molecular processing. Regardless of this inherent complexity, the command line user interface is syntactically always the same, and adheres to typical Unix-style practices. This syntax is always:
program [options] input output
or
program [options] input1 input2 ...
The second form takes multiple inputs and usually has an option specifying an output. The options are tags or tag-value pairs, each tag starting with a hyphen followed by a word or acronym. Every option is specified in the usage printed when only the program name is used. This usage list indicates whether an option takes one or more comma-separated values. The user can use any truncated version of a tag as long as it is unique:
-tag val1,val2,...
To get the list of options for a program, just type the program name:
bimg
Usage: bimg [options] input.img output.img ------------------------------------------ Image format extensions supported: BioRad (pic), Brix (brx), CCP4 (map), Digital Instruments (di) EM (em), Goodford (pot), GRD (grd), Imagic (img), JPEG, (jpg), MFF (mff) Image Magick (miff), MRC (mrc), PIC (bp), PIF (pif), Spider (spi) Suprim (spm), TIFF (tif), RAW (raw) Actions: -invert Invert density in the image -project Project along z axis (after reslicing) -average Average images in a multi-image file -reslice -z+xy Reslice = switch axes (default xyz) -size 10,50,8 New image size (pixels/voxels) -translate -5,12,50 Translate (pixels, with wrapping if option -w is used) -Wrap 10,50,8 Shrinking and wrapping an image (pixels) -truncate -0.5,1.2 Truncate data to minimum and maximum -rescale -0.1,5.2 Rescale data to average and standard deviation -minmax -0.5,1.2 Rescale data to minimum and maximum -logarithm Calculate the logarithm of an image -Upper Fill upper triangle with values from lower triangle -Transpose Transpose image -Levels 8 Restrict to a number of levels 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) -origin 0.8,-10,15.7 Set the origin (default from input image) -image 1 Select an image (first image = 0; default: all images) -fill 127 Fill value for resizing (default average) -background 0.5 Set background -wrap Turn wrapping on (default off)
For example, to truncate the data in an image between the values 0 and 100 and with verbose output:
bimg -verbose 7 -truncate 0,100 input.img output.img
Note that all data files are recognized by their extensions (see the image format table). The option tags can be truncated as long as they remain unique within the context of a program. E.g., "-v 7" will set the verbosity level to 7 in most programs, as long as no other tag for those programs begin with a "v". There must be a space between the option tag and the value.
On VMS machines, all command line characters are converted to lower case before passing it to the program. Many options in the programs in the Bsoft package are case sensitive, and usage as on unix-based systems implies ambiguity for options where both upper and lower case letters are used. The only mechanism to overcome this under VMS is to embed the options in quotes, with each option getting its own set of quotes, e.g.:
bhisto "-verbose 7" "-Histogram 300" "-datatype f" file.img file.img
In addition, the VMS command line is much more restrictive than Unix, with the following additional problems:
File name expansion or globbing when using wild cards in file names does not work as in Unix.
The VMS command line limit is only 256 characters, much shorter than that for Unix.
Data file formats are recognized by the file extension following the last period (".") in the file name. A file can be read using a particular format by specifying this format's extension after a colon (":"), e.g.:
bimg -verbose 7 file.img:mrc file.img:tif
A binary image file can be read in a number of arbitrary ways as defined for the "RAW" format.