Skip to content

Image_convert_v31

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

!xmipp_image_convert (v3.1)

Usage

Convert among stacks, volumes and images, and change the file format. Conversion to a lower bit_depth automatically adjusts the gray level range. If it is between same bit depths and different sign, then only a histogram shift is done. If parameter --depth is not passed, then bit_depth is automatically chosen equal to or higher than input bit_depth. For stack output format, a selection file with the images in the stack is optionally created, replicating the labels of the input sel file. If output file extension is not set when --oroot is used (neither setting --oext nor :ext), then input format is chosen.

Parameters

$``: Input file: metadata, stack, volume or image. Supported read formats are: dm3 : Digital Micrograph 3 em : Electron Microscopy jpg : JEPG img : Imagic inf,raw : RAW file with header INF file mrc, map : CCP4 pif : Portable Image Format ser : Tecnai Imaging and Analysis spe : Princeton Instruments CCD camera spi, xmp : Spider tif : TIFF raw#xDim,yDim,[zDim],offset,datatype,[r] : RAW image file without header file where datatype can be: uint8,int8,uint16,int16,uint32,int32,long,float,double, cint16,cint32,cfloat,cdouble,bool $--mode &lt;modeoverwrite> where <mode> can be:

    • $--label &lt;image_labelimage> $-o, --output &lt;output_file> $--oroot &lt;root> $--save_metadata_stack &lt;output_md> $: Store the original image filename in the output metadata in column imageOriginal. $: Preserve the columns from the input metadata. Some of the column values can be changed by the program. $--oext &lt;extension> where <extension> can be:
    • $--type, -t &lt;output_typeauto> where <output_type> can be:

Bit options $--depth, -d &lt;bit_depthdefault> where <bit_depth> can be:

    • $: Swap the endianess of the image file $: Adjust the histogram to fill the gray level range $ or``: Do not apply any conversion to gray levels when writing in a lower bit depth or changing the sign

Stack options $``: Append the input to the output stack instead of overwriting it

Examples and notes

Put a selection file into a stack:

xmipp_image_convert -i list.sel -o images.stk
Convert a Spider volume to a MRC stack:
xmipp_image_convert -i spider.vol -o stack.mrcs -t stk
Create a stack of volumes with a Spider volume :
xmipp_image_convert -i spider.vol -o vol_stack.stk -t vol
Append a volume to a volume stack:
xmipp_image_convert -i spider.vol -o vol_stack.stk -a
Substitute a volume in a volume stack:
xmipp_image_convert -i spider.vol -o 3@vol_stack.stk
Save images in a stack as independent TIFF files in image directory with "newimage" basename in 8bit format:
xmipp_image_convert -i stackFile.stk -o tiffImages.sel --oroot images/newimage:tif -d uint8
Convert a selection file of 16bit TIFF images to 8bit and overwrites files and sel file:
xmipp_image_convert -i tiff16.sel -d uint8
Append a single image to a stack:
xmipp_image_convert -i img.spi -o stackFile.stk --append
Append a selection file to a stack:
xmipp_image_convert -i selFile.sel -o stackFile.stk --append
Replace a single image into a stack:
xmipp_image_convert -i img.spi -o [email protected]
Convert a MRC stack to a MRC volume:
xmipp_image_convert -i stack.mrc -o volume.mrc -t vol

User's comments

Clone this wiki locally