Skip to content

Image_operate_v3

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

!xmipp_image_operate (v3.0)

Usage

A simple Xmipp images calculator. Binary and unary operations

Parameters

$``: Input file: metadata, stack, volume or image. $--mode &lt;modeoverwrite> where <mode> can be:

    • $-o, --output &lt;output_file> $--oroot &lt;root>

Binary operations: $: Sums two images, volumes or adds a numerical value to an image $ or: Substracts two images, volumes or substracts a numerical value to an image $ or: Multiplies two images, volumes, or multiplies per a given number $ or: Divides two images, volumes, or divides per a given number $ or: Minimum of two images, volumes, or number (pixel-wise) $ or: Maximum of two images, volumes, or number (pixel-wise) $ or``: Returns -1 if the left value is less, 0 if are equal or 1 if greater.(pixel-wise)

Relational operations: $ or: Returns 1 if the pixels values are equal, 0 otherwise (pixel-wise) $ or: Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise) $ or: Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise) $ or: Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise) $ or: Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise) $ or: Returns 1 if the pixels values are equal less, 0 otherwise (pixel-wise)

Unary operations: $ or: Computes the logarithm of an image $ or: Computes the square root of an image $ or: Computes the absolute value of an image $ or`--pow &lt;value`2&gt; $ or: Extracts a given slice from a volume $ or: Extracts a given column from a image or volume $ or: Extracts a given row from a image or volume $ or``: 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

Clone this wiki locally