MA SOFT - Mask - image/volume with a soft adaptive mask ||

(2/22/18)

PURPOSE

Masks an image/volume with a mask at a specified threshold. Pixels greater than the threshold retain their value and pixels lower than threshold have a soft Gaussian or cosine based falloff. This is mainly useful with a threshold of 0.5 to soften binary (0/1) masks. If used on grey scale images its operation may not be intuitive.   Example.

SEE ALSO

MA [Mask - image/volume with a circular mask]
MO [Create Model image]
MO 3 [Create Model volume]
MM [Mask Multiplication]
MM C [Mask Multiplication - Continuous]
TH F [Threshold - Set pixels above/below Threshold to Fixed value]

USAGE

.OPERATION: MA SOFT [inside],[surface]
[The first optional register variables will contain the number of pixels within the 100% area and the second will contain the number of pixels/voxels on the 100% surface.]

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

If the input file name contains astericks for set of images, SPIDER asks:


.FILE NUMBERS OR SELECTION DOC. FILE NAME: 1-[num]

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

If the input file name contains astericks for set of images, SPIDER asks:


.FILE NUMBERS OR SELECTION DOC. FILE NAME: 1-[num]

.GAUSSIAN or COSINE SOFTMASK (G/C): G
[ Enter 'G' for a mask with no modification inside the mask range, and Gaussian-shaped falloff outside this range.
Enter 'C' for a mask with no modification inside the mask range, and cosine-shaped falloff outside this range.]

.THRESHOLD LEVEL: 0.5
[Enter the desired threshold at which masking occurs.]

If 'G' was entered for Gaussian softmask, SPIDER asks:

.WIDTH: 3.0
[Enter the falloff width.]

If 'C' was entered for Cosine softmask, SPIDER asks:

.HALFWIDTH: 3.0
[Enter the falloff half-width.]

NOTES

  1. Fairly slow speed with volumes.

  2. Can be used on grey-scale images with an appropriate threshold or with binary masks.

SUBROUTINES

SOFTMASK

CALLER

UTIL2