MA - Mask - image/volume with a circular mask

(12/09/14)

PURPOSE

Masks an image/volume with a circular/spherical mask of specified radii. Pixels in the area inside the inner radius and the area outside the outer radius are set to a specified background.   Example.

SEE ALSO

MA L [Mask - line across image/volume]
MA X [Mask - image/volume in X direction]
MA Y [Mask - image/volume in Y direction]
MA Z [Mask - volume in Z direction]
MM [Mask Multiplication]
MM C [Mask Multiplication - Continuous]
MO [Create Model image]
MO 3 [Create Model volume]
MA SOFT [Mask - image/volume with a soft adaptive mask ||]
PT [Create Pattern or mask image]

USAGE

.OPERATION: MA

.INPUT FILE: PIC001
[Enter the name of the file to be masked.]

.OUTPUT FILE: MASK001
[Enter the name of the output file.]

.OUTER & INNER RADII: 12.0, 0.0
[Enter the radii of the outer and inner mask circles/spheres , in pixels. Pixels in areas outside the outer radius and inside the inner radius are set to background. Enter zero inner radius for no inner radius masking. Enter zero outer radius for inner masking only.]

.DISK, COSINE, GAUSSIAN EDGE, OR TRUE GAUSSIAN (D/C/G/T): D
[Enter 'D' for sharp profile cutoff.
Enter 'C' for mask with no modification inside the mask range, and cosine-shaped falloff outside this range.
Enter 'G' for mask with no modification inside the mask range, and Gaussian-shaped falloff outside this range.
Enter 'T' for true Gaussian mask.]

.AVG, PREV AVG, CIRCUMF, MIN, OR EXTERNAL BACKGROUND (A/P/C/M/E): P
[Enter 'A' to set background to average before masking.
Enter 'P' to set background to average after masking.
Enter 'C' to set background to average along mask border.
Enter 'M' to set background to minimum before masking.
Enter 'E' to set background to specified value. ]

If 'E' was entered, SPIDER asks:

.BACKGROUND: 3.0
[Enter the desired background intensity.]

If using an image, SPIDER asks:

.MASK CENTER COORDINATES IX,IY (OR <CR> FOR IMAGE CENTER): 50, 50
[Enter the coordinates of the mask center. A <CR> gives the coordinates of the SPIDER image center: NX/2+1, NY/2+1.]

Otherwise if using a volume, SPIDER asks:

.MASK CENTER COORDINATES IX,IY,IZ (OR <CR> FOR VOLUME CENTER): 50, 50, 50
[Enter the coordinates of the mask center. A <CR> gives the coordinates of the SPIDER volume center: NX/2+1, NY/2+1, NZ/2+1.]

If using a Cosine mask, 'C' SPIDER asks:

.FALLOFF WIDTH: 3.5
[Enter the width of the cosine falloff function.]

If using a Gaussian edge mask, 'G' SPIDER asks:


.FALLOFF HALFWIDTH: 3.5
[Enter the halfwidth of the Gaussian falloff function.]

SUBROUTINES

MASK

CALLER

UTIL2