Using Regions of Interest as Masks

Any ROI can be used as a "mask" to remove pixels from the image. Removing pixels means setting their intensity to zero. Alternatively, you can choose to set the pixel intensities to some other non-zero value. The mask tool can:

Note: Because a Marker ROI is just a point, and a Line ROI is an infinitely thin line, all pixels are outside these types of region.

To use ROIs as a mask first select one or several ROIs. Hold the "Shift" key down as you click the mouse if you want to select more than one ROI.

Next, decide whether you want to remove pixels inside the ROI(s) or outside; click the toggle button in the "Mask" panel at the bottom of the ROI Toolkit to select the masking operation:

Pixels outside the ROI(s) are set to the masked intensity (normally zero).

Pixels inside the ROI(s) are set to the masked intensity (normally zero).

The dark region inside and outside the icon's ROI illustrates the masking operation.

To mask the image click the mask button: . There is an undo facility whereby you can undo the last mask operation that was performed; click the button. Only the last one masking operation may be undone.

The masking algorithm is described in the algorithms section.

The figures below illustrate masking, using the contouring facility to find the outline of the brain, and then masking outside the ROI to remove the extra-cerebral tissue:

Using the mask tool to remove extra-cerebral tissue.
Before masking After masking

Normally, you would want to set the pixel intensities to zero, to indicate the these pixels are no longer of interest. However, you can set the pixels to any integer value you wish by typing in the value you choose:

In the example above, all pixel values that are altered by a masking operation as described above will be set to -100. The actual value used to set the background after a masking operation may result from a rounding (for integer pixel types) and clipping to ensure that the background value is within the intensity range for the particular type of image.

Setting the ROI Combination Operation

When you have more than one ROI selected in a slice, the masking operation is performed using a combination of all the selected ROIs. You can choose one of three combination modes from the Mask menu:

The effect of these different combination modes is illustrated in the section about image masking.

Masking from ROIs in All Slices

You can mask all slices using the ROIs defined in them by selecting Mask All Slices from the Mask menu. This will first combine ROIs in each slice using the selected combination mode, then apply the mask.

N.B. you can also perform masking operations on whole images in a similar way from the Masker Tool. There are three main differences:

Masking alters the pixel data, and therefore whenever an masking operation is performed, you will be asked if you want to save the edited image before it is unloaded from Jim. See saving images.

Google
WWW Xinapse Web Site

Jim Home