Masking involves setting the pixel values in an image to zero, or some other "background" value. Masking can be done in one of two ways:
N.B. you can also perform masking operations on individual slices or whole images in a similar way from the ROI Toolkit. There are three main differences:
Masker from the Toolkits menu
of the main display
frame brings up the Image Masking Tool:


icon,
by typing in the folder (directory) and file name of the image, or by pressing the right mouse
button and selecting from the menu of recently-used images.

Choose whether you want to set the pixels intensities outside the mask to the background, or those inside the mask to be the background, by clicking on the appropriate button:

If you are masking using ROIs, choose whether you want hard or soft masking.
Note: the selection of hard or soft masking has no impact when using an image mask.
Then, choose whether you will use an image as the mask, or a set of ROIs
by clicking the appropriate button:
Note: hard and soft masking only applies when you mask using ROIs. If
you mask using an image, soft masking behaves the same as hard masking.



Before masking.
Hard masking.
Soft masking.

Now click on the 


The "XOR" mode is useful where you wish to define
regions of the image that have a "hole" in them. By having one
ROI inside another, the internal ROI then defines the hole in the image
when ROIs are combined using the XOR operation.
Note: Mask action was set to "Mask Outside".




Before masking
XOR
Union
Intersection
button to apply the
mask. If you have chosen to save the result to disk, then a
File Chooser will pop up, prompting
you to choose a file name for the new image. Otherwise, the result
will be loaded into Jim.