You do not need to give the dimensions of the mask but you simply provide an example of image/volume you are going to apply the mask to, then the dimensions are taken from this file and the mask is created. In the creation of the mask, a file with the mask is written to disk but it is not applied to the input file.
You can generate blank images/volumes with the size of the sample one if you do not supply any mask type.You may also apply masks without having to generate the corresponding files (but you also can save them)
This utility also allows you to count the number of pixels/voxels in an image/volume which are inside a given mask and whose value is below|above or both some threshold.
Parameters
-i, --input <input_file>
--mode <mode=overwrite>
--label <image_label=image>
-o, --output <output_file=>
--oroot <root=>
--mask <mask_type=circular>
-m <blob_order=2>
-a <blob_alpha=10.4>
--center <x0=0> <y0=0> <z0=0>
--create_mask <output_mask_file>
--count_above <th>
--count_below <th>
--substitute <val=0>
xmipp_transform_mask -i reference.vol -o output_volume.vol --mask circular -72As above but save mask:
xmipp_transform_mask -i reference.vol --create_mask output_mask.vol --mask circular -25Mask and overwrite a selection file:
xmipp_transform_mask -i t7_10.sel --mask circular -72Mask using rectangular mask:
xmipp_transform_mask -i singleImage.spi -o salida20.spi --mask rectangular -10 -10
Most of the masks are valid in 2D and 3D. If a mask is nonsense in some space (2D or 3D) then no mask is generated, for instance, an image with all 1's would be generated if a mask is nonsense in 2D
Inner | Outer | |
---|---|---|
Circular | ||
Rectangular | ||
Crown | ||
Gaussian | ||
Raised Cosine | ||
Raised Crown |
Circular (2D) and Spherical (3D) masks
--mask circular [R]
A binary mask (0 or 1) is generated If R>0 then the exterior of the circle/sphere is 1 and the interior is 0 | |
If R<0 then the interior of the circle/sphere is 1 and the exterior is 0 |
Rectangular (2D) and Box (3D) masks
--mask rectangular [Xrect] [Yrect] [Zrect]
A binary mask (0 or 1) is generated. If Zrect
is not given you cannot apply this mask to volumes If X,Y,Z>0 then the exterior of the rectangle/box is 1 and the interior is 0 | |
If X,Y,Z<0 then the interior of the rectangle/box is 1 and the exterior is 0 |
Circular (2D) and Spherical (3D) crowns
--mask crown [R1] [R2]
A binary mask (0 or 1) is generated If R1,R2>0 then the exterior of the circular/spherical crown is 1 and the interior is 0 | |
If R1,R2<0 then the interior of the circular/spherical crown is 1 and the exterior is 0 |
3D cylinders
--mask cylinder [R] [H]
A binary mask (0 or 1) is generated If R,H>0 then the exterior of the cylinder is 1 and the interior is 0 | |
If R,H<0 then the interior of the cylinder is 1 and the exterior is 0 |
3D cones
--mask cone [theta]
A binary cone-shaped mask (0 or 1) is generated. The cone has an aperture angle of theta degrees and is parallel to the Z-axis If theta>0 then the exterior of the cone is 0 and the inside is 1 | |
If theta<0 then the interior of the cone is 0 and the exterior is 1 |
3D wedges
--mask wedge [theta0] [thetaF]
A binary mask is created corresponding to a missing wedge in Fourier-Space, for data that is collected between tilting angles theta0=[-90,0]
and thetaF=[0,90]
. The Y-axis is supposed to be the tilting axis.
2D and 3D Gaussians
--mask gaussian [sigma]
A continuous mask [0,1] is generated If sigma>0 then the exterior of the gaussian is 1 and the interior is 0 | |
If sigma<0 then the interior of the gaussian is 1 and the exterior is 0 |
2D and 3D raised cosines
--mask raised_cosine [R1] [R2]
A continuous mask [0,1] is generated. For R1<R<R2 the mask performs a smooth adaptation from 0 to 1 If R1,R2>0 then the exterior of the circle/sphere crown is 1 and the interior is 0 | |
If R1,R2<0 then the interior of the circle/sphere crown is 1 and the exterior is 0 |
2D and 3D raised crowns
--mask raised_crown [R1] [R2] [pix_width]
A continuous mask [0,1]
is generated. For R1-pix_width<R<R1+pix_width
the mask performs a smooth adaptation from 0 to 1, in R1+pix_width<R<R2-pix_width
is constant and R2-pix_width<R<R2+pix_width
it is also smooth If R1,R2>0 then the exterior of the circle/sphere crown is 1 and the interior is 0 | |
If R1,R2<0 then the interior of the circle/sphere crown is 1 and the exterior is 0 |
Masks from files
--mask [file]
A binary file is read from the selected file. It can be a 2D or a 3D binary mask