Table of Contents

Name

marcvt- format conversion for images collected on marresearch Image Plate Detectors and marCCD detectors.

Synopsis

marcvt [ -h ] [ --help ] [ -f ] [ --force ] [ -l ] [ --list ] [ -r ] [ --recursive ] [ -s ] [ --swap ] [ -d ] [ --delete ] [ -v ] [ --verbose ] [ --flip[v] ] [ -j N ] [ --jump N ] [ --add N ] [ -crop X*Y[+x+y] ] [ -cut CUT ] [ -reduce N ] [ --rotate N ] [ --scale N ] [ -type TYPE ] [ -x NX ] [ --xaxis NX ] [ -y NY ] [ --yaxis NY ] [ -o directory ] -out FORMAT or [ -mar345 ] [ -pck ] [ -image ] [ -cbf ] [ -cif ] [ -raw32 ] [ -raw16 ] [ -raw8 ] [ -tiff ] [ -png ] [ -jpg ] [ -ascii ] file(s)
Additional TIFF/PNG/JPG file output options: -rainbow -blue -min MIN -max

MAX -colors N

Description

marcvt converts image formats from marresearch/marXperts Imaging Plate Detector Systems. Supported input formats are: "image" (300 mm uncompressed images), "pck" (300 mm compressed images), "mar345" (345 mm compressed images) and images created by the marCCD CCD-detector. marcvt >= 4.0 also supports CBF/imgCIF formatted images that have been produced by mar programs (marcvt is NOT intended to be a general utility for handling CBF/imgCIF files). It is also possible to save binary images into plain ASCII-files. Other supported formats for output are images containing plain arrays with 8-bit, 16-bit or 32-bit integers, without headers or trailers. These raw binary data can easily be read by any other image processing program.

Note, that it is not possible to obtain a complete image header when converting mar300 formats into the mar345 format, since the new mar345 header store information that is not used by the mar300 headers.

Options

--add N
Add a value of N to all pixels in file.
-cbf, -cif
Formats "cbf" an "cif" are the new "crystallographic binary file" conventions created by the CBF/imgCIF committee. "CBF" and "imgCIF" differ by the way the binary data are encoded. "CBF" uses a binary encoding while "imgCIF" is ASCII-encoded. When converting into "cbf" and "cif" files, data compression is always used. Data are stored as 32-bit integers.
--crop X*Y[+x+y]
Crop input image to X*Y pixels with offsets x and y in horizontal and vertical direction, respectively.
-cut N
Cutoff marCCD images to N*N pixels (e.g. 2000)
-d, --delete
Deletes input image after successful conversion. The default is to keep the input file.
-f, --force
Forces image output, even if a file with the same name already exists. The default is to skip output.
--flip[v]
Flip image horizontally (vertically) on output
-h, --help
Provides a summary of the options.
-j, --jump N
Skip first N bytes of i/p-file
-l, --list
Lists the selected files (directories) only, no output.
-o DIRECTORY
Output images will go into directory DIRECTORY. By default, they will be in the same directory as the input images.
-out FORMAT
Input images are converted into format FORMAT. This option is compulsory! Allowed formats are: "mar345", "pck", "image", "cbf", "cif", "raw32", "raw16", "raw8", "tiff", "png", and "ascii".
-r, --recursive
If the file argument (see below) is a directory, all images in this directory and its subdirectories will be converted. This is a very fast way of converting large numbers of images scattered in many directories.
-raw32, -raw16 and -raw8
Format "raw32" is an array of 32-bit integers, "raw16" only 16-bit and "raw8" only 8-bit. Note, that values > 16-bit will be truncated to 65535 in "raw16" format. For "raw8", all intensity values will be divided by 256. Values > 16-bit will also be truncated. The "raw32"-format, however, does not truncate the data. Saturations will be marked as 999999.
-reduce N
Reduce image size by a factor of N (integer number), e.g. 5. This is helpful when making thumbnail images in png/jpg/tiff formats out of diffraction images.
--rotate N
Rotate image counter-/clockwise by N deg.
-s, --swap
Force swapping of bytes in input file
--scale N
Apply multiplication factor of N to all pixels in file.
-tiff, -png and -jpg
When producing TIFF/PNG/JPG files, data will be modified to give an image with reasonable colors. By default, the program calculates a minimum and maximum threshold from a pixel value histogram. Values < minimum will get color white, values > maximum will get color black. 256 colors shades will be distributed in between the min. and max. The colorscheme can be altered to give a rainbow spectrum (-rainbow) or to use shades of blue (-blue) instead of grey. The number of colors may be altered with option -colors N where N defaults to 256. The min. and max. threshold may be set explicitely with option -min MIN and -max MAX.
-type TYPE
Force input of type TYPE: see -out
-v, --verbose
Writes more information to stdout.
-x, --xaxis NX
No. of elements of fast varying axis in i/p-file
-y, --yaxis NY
No. of elements of slow varying axis in i/p-file
files...
Wild cards are allowed. If no input format is given by option "-in", the corresponding file name extension is used to determine the input format.

Examples

marcvt -image x_001.mar1200
Converts x_001.mar1200 into x_001.image
marcvt -o /data -pck -r /usr/people/mar/data
Converts all images found in /usr/people/mar/data and subdirecties into pck format and writes output into directory /data.
marcvt -cbf *.mar1200
Converts all images with extension .mar1200 in the current directory into the corresponding "CBF"-style file. The extension will be .cbf1200.

See Also

mar345_formats, mar300_formats, marpack, marunpack

Author

Claudio Klein, marXperts GmbH, Norderstedt, Germany

Copyright

© Copyright 2000-2015 marXperts GmbH, Norderstedt,

Germany

Address

marXperts GmbHPhone: +49 - (40) - 529 884-0
Werkstr. 3 FAX: +49 - (40) - 529 884-20
D-22844 Norderstedt - GERMANYinfo@marXperts.com
www.marXperts.com


Table of Contents