Xmipp

xmipp_image_operate (v3.0)

Usage

A simple Xmipp images calculator. Binary and unary operations

Parameters

-i, --input <input_file>
Input file: metadata, stack, volume or image.
--mode <mode=overwrite>
Metadata writing mode.
where <mode> can be:
  • overwrite Replace the content of the file with the Metadata
  • append Write the Metadata as a new block, removing the old one
-o, --output <output_file=>
Output file: metadata, stack, volume or image.
--oroot <root=>
Rootname of output individual images. Output image format can be set adding extension after rootname as ":ext".

Binary operations:

--plus <file_or_value>
Sums two images, volumes or adds a numerical value to an image
or --minus <file_or_value>
Substracts two images, volumes or substracts a numerical value to an image
or --mult <file_or_value>
Multiplies two images, volumes, or multiplies per a given number
or --divide <file_or_value>
Divides two images, volumes, or divides per a given number
or --min <file_or_value>
Minimum of two images, volumes, or number (pixel-wise)
or --max <file_or_value>
Maximum of two images, volumes, or number (pixel-wise)
or --compare <file_or_value>
Returns -1 if the left value is less, 0 if are equal or 1 if greater.(pixel-wise)

Relational operations:

or --eq <file_or_value>
Returns 1 if the pixels values are equal, 0 otherwise (pixel-wise)
or --le <file_or_value>
Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)
or --lt <file_or_value>
Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)
or --ge <file_or_value>
Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)
or --gt <file_or_value>
Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)
or --ne <file_or_value>
Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)

Unary operations:

or --log10
Computes the logarithm of an image
or --sqrt
Computes the square root of an image
or --abs
Computes the absolute value of an image
or --pow <value=2>
Computes the power of an image
or --slice <value>
Extracts a given slice from a volume
or --column <value>
Extracts a given column from a image or volume
or --row <value>
Extracts a given row from a image or volume
or --radial_avg
Compute the radial average of an image

Examples and notes

Sum two volumes and save result
xmipp_image_operate -i volume1.vol --plus volume2.vol -o result.vol
Calculate the log10 of an image called example.xmp and store the resulting one in example_log.xmp
xmipp_image_operate -i example.xmp --log10 -o example_log.xmp
Calculate the square root of a volume called example.vol and store it in expample_sq.vol
xmipp_image_operate -i example.vol --sqrt  -o expample_sq.vol
Extract the slice number 10 of a set of of volumes given in the sel file called volumes.sel. The names of the output images its supposed to be in the selfile images.sel
xmipp_image_operate -i volumes.sel --slice 10 -o images.sel
Sum 5 to every image in images.sel and rewrite the input images
xmipp_image_operate -i images.sel --plus 5
Substract two volumes:
xmipp_image_operate -i volume1.vol --minus volume2.vol -o volume3.vol
Multiply an image by 2 in every pixel:
xmipp_image_operate -i image.xmp --mult 2 -o image2.xmp
Divide 2 by the value of every pixel in the image:
xmipp_image_operate -i 2 -divide image.xmp -o image2.xmp
Rotational average
xmipp_image_operate -i image.xmp -radial_avg -o image.rad
where image.rad is an ascii file for plotting the radial_averaged profile, image.rad.img a radial_averaged image

User's comments

%COMMENT{type="tableappend"}%