-
Notifications
You must be signed in to change notification settings - Fork 1
Operate
This program works as a calculator to operate with images, volumes, and selfiles in Xmipp.
This command is a calculator for Xmipp images, volumes and selfiles. The most important options are the input and output objects.
$ operate -i ...
Parameters
- `` Input objects can be Xmipp Images, Xmipp volumes, Xmipp Selfiles and numbers
- `` Output objects. If not given, the input images or volumes are rewritten.
- `` Operation
For all 2D-images, the transformation stored in the header of the image is applied, upon reading the image.
Unary operations
- `` computes the log10(i+1) of every pixel in the image or volume
- `` The square root of every pixel
- `` Radial average of the volume or image. Note: this option saves two files, one with a vector (for plotting) and the other one with an image (extension .img is added to this one)
- `` Force all pixels and voxels to be positive. If the pixel already positive, then nothing is done. If it is <=0, then it is substituted by the median of the surrounding 5x5 neighbourhood.
Binary operations
- `` Adds the object to the input . The object can be an image, volume, selfile or a number
- `` Substracts the object form the input. The object can be an image, volume, selfile or a number
- `` Mutliplies the object per the input. The object can be an image, volume, selfile or a number
- `` Divides the object per the input. The object can be an image, volume, selfile or a number
- `` Computes the minimum between the object and the input. The object can be an image, volume, selfile or a number
- `` Computes the maximum between the object and the input. The object can be an image, volume, selfile or a number
- `` Returns 0 if the first argument is the minimum of the two (pixelwise). The object can be an image, volume, selfile or a number
- `` Returns 0 if the first argument is the maximum of the two (pixelwise). The object can be an image, volume, selfile or a number
- `` Extracts the desired slice (its number is the argument) from a volume (first argument)
- `` Extracts a column (argument) from a volume or an image
- `` Extracts a row (argument) from a volume or an image
All the operations support the use of selfiles. The output must be another selfile with the same number of files indicating the names of the output files.
Calculate the log10 of an image called example.xmp and store the resulting one inexample_log.xmp
$ operate -i example.xmp -log10 -o example_log.xmp
Calculate the square root of a volume called example.vol and store it inexpample_sq.vol
$ 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 calledvolumes.sel
. The names of the output images its supposed to be in the selfileimages.sel
$ operate -i volumes.sel -slice 10 -o images.sel
Sum 5 to every image inimages.sel
and rewrite the input images
$ operate -i images.sel -plus 5
Substract two volumes:
$ operate -i volume1.vol -minus volume2.vol -o volume3.vol
Multiply an image by 2 in every pixel:
$ operate -i image.xmp -mult 2 -o image2.xmp
Divide every pixel of an image by 2:
$ operate -i image.xmp -divide 2 -o image2.xmp
Divide 2 by the value of every pixel in the image:
$ operate -i 2 -divide image.xmp -o image2.xmp
Rotational average
$ operate -i image.xmp -radial_avg -o image.rad
whereimage.rad
is an ascii file for plotting the radial_averaged profile,image.rad.img
a radial_averaged image
--Main.AlfredoSolano - 18 Jan 2007