colornewst(1) General Commands Manual colornewst(1)
NAME
colornewst - Run Newstack command on a color file
SYNOPSIS
colornewst [options] input_file output_file
DESCRIPTION
Colornewst is a Python script to run Newstack operations on a color
file by splitting the file into components with "clip splitrgb", run-
ning Newstack, and recombining the components with "clip joinrgb".
Most options to Newstack can be included, but not -fileinlist,
-fileoutlist, -split, -replace, -numout, -skip, -blank, -onexform,
-exclude, -input, or -output. There must be only one output file, and
unless the -cnfiles is used there must be only one input file. Input
and output files must be specified as the last arguments on the command
line, not with options. To use multiple input files, which will be
stacked together, place the -cnfiles option after all other options,
before the first input file. There are several restrictions when using
multiple input files:
1) The output file must still be the last file on the command line.
2) The input files must all be the same size in X, Y, and Z, and be
either all gray-scale or all color.
3) If files are indeed color, lists of sections to process or line
numbers for transforms to use cannot be entered because Clip and
Newstack would need different lists. If all files are gray scale,
the section lists must apply to each of the individual files if -cntiff
is not used, but to the whole stack of sections if -cntiff is used.
4) The -cntiff option cannot be used if the files have more than one
section.
5) Processing will not be broken into chunks, and the default direc-
tory for intermediate files will be set to the current directory. The
-cnmaxtemp option cannot be entered to limit the size of intermediate
files. A different temporary directory can be set with -cntempdir but
you must make sure that there is enough space there.
If placing options in a command file or script, always use at least
three letters for the Newstack options.
The input file(s) can be any type readable by IMOD programs generally,
namely MRC, TIFF, HDF, or JPEG. The output file will be an MRC file,
unless the environment variable IMOD_OUTPUT_FORMAT is set to TIFF, HDF,
or JPEG. The latter will work only for single-image byte or RGB files,
not stacks or other data modes; in the latter cases the output will be
MRC despite the variable setting. See the imodenv man page for
other environment variables to control compression type and quality
when getting TIFF or JPEG files in this way. If the input file is a
TIFF file, you can use the -cntiff option to tell the program to con-
vert the input file to an MRC file with Tif2mrc using no options,
and convert the processed MRC file to TIFF with Mrc2tif using the -s
option. If any more complicated conversions are desired, run the con-
versions separately with the desired options.
If the input file is gray-scale instead of color, Newstack will be
run directly on it with the given options.
Colornewst itself takes the following options, which can be abbrevi-
ated. These options can be intermixed with the Newstack options,
except for the -cnfiles option, which must be just before the file-
names. Two leading dashes are accepted, just as for the Newstack
options.
-cnfiles
Multiple input files are listed just after this option. See the
restrictions above.
-cntiff
Convert the input file from TIFF to MRC with Tif2mrc, process
it, and convert the processed file to TIFF. By default, TIFF
files will be read by Newstack and an MRC file will be pro-
duced. If there are multiple input files, they must all be sin-
gle-section files.
-cntempdir dir
Path to directory to use for temporary files, namely the red,
green, and blue components produced by "clip splitrgb" and files
for each component processed by Newstack. The default is the
standard temporary directory for IMOD commands, unless there are
multiple input files.
-cnmaxtemp #
Maximum amount of space to use in the temporary directory, in
megabytes (floating point values allowed). The default is 1024.
When processing the whole file at once would require more than
this amount of space, the program will process the file in
chunks, unless there are multiple input files.
-cnverbose
Pass on the printed output from running Newstack and the TIFF
conversion programs, if any. The default is for this output to
be swallowed.
FILES
Temporary files are named starting with "colornewst.PID" and removed at
the end, if there is an error, or if the program is interrupted with
Ctrl-C. If the output file exists, it is turned into a backup file by
appending "~" to the name unless the environment variable
IMOD_NO_IMAGE_BACKUP is set.
AUTHOR
David Mastronarde
SEE ALSO
newstack, clip, tif2mrc, mrc2tif
BUGS
Email bug reports to mast at colorado dot edu.
IMOD 5.2.0 colornewst(1)