Skip to content

Mask Refinement Process Description

Qiongjing Zou edited this page Apr 25, 2023 · 3 revisions

Mask Refinement Process Description:

This process can be used to post-process (and hopefully improve) the masks for selected channels of the movie. This is generally not needed but can be used in situations where the masks have problems. This is done by removing small background objects, filling holes in masks, and so forth.

For more details, see the parameter descriptions below. The refined masks will be used for the later steps, but will NOT affect the background masks.

Parameter Descriptions:

Input Channels:

This allows you to select which channels you want to refine the masks of. By default, all channels will be refined. Select the channels by clicking on them in the "Available Input Channels" box and then clicking "Select->" to move them to the "Selected Channels" box. You can unselect a channel by clicking the "Delete" button.

Mask process:

If more than one segmentation process has been run, this allows you to select a mask process from the drop-down menu to use for mask refinement. If choosing “Choose later” and more than one process exists, you will be asked at runtime which process to use.

Mask Clean-up:

If this box is checked, the basic mask cleanup procedures will be performed. Either this or "Mask Edge Refinement" must be checked. For descriptions of the individual steps in cleanup (see the parameters described below).

Minimum Size:

This parameter specifies the minimum size (in pixels) of objects which should be kept in the mask. Objects smaller than this size will be removed from the mask. This is useful for removing small areas outside the cell which are included in the mask because they are brighter than the background but are not part of a fluorescent object of interest (cell, single molecule, etc).

Closure Radius:

This parameter specifies the size of a disk that will be used to "close" the mask. This has the effect of connecting objects which are closer together than this radius. It also has the effect of rounding sharp corners of the mask whose radius is smaller than this. For additional information, see the help for imclose.m.

Object Number:

This specifies the number of objects to keep in each mask. That is, if Object Number is set to 2, only the two largest objects in the mask will be kept. This is useful for removing larger background objects or cells which are only partially in the image, while retaining the cell or object of interest.

Fill Holes:

If this box is checked, any holes in the mask will be filled in. This is useful because sometimes dark areas within a cell (e.g., the nucleus) or other fluorescent object may not be originally included in the mask. Since cells usually don't have holes in them, filling in these holes is pretty safe.

Fill Boundary Holes:

If this box is checked, if the mask is touching the image boundary on adjacent edges of the image, the hole in between the two image-edge-touching boundaries (e.g., in the corner) will be filled.

Mask Edge Refinement:

This is very rarely needed and doesn't always work. If checked, the edges of the masks will be further refined (This is done after mask cleanup, if it is selected). For descriptions of the individual steps in edge refinement (see the parameters described below).

Maximum Adjust Distance:

This parameter determines the maximum distance in pixels by which the edge location can be adjusted. The adjusted distance is relative to the original input masks’ edge location and does not take into account the effects of pre-growth (see Radius of Growth below). The default value is 10.

Maximum Edge Gap:

This parameter specifies the maximum size of gaps that need to be closed in the detected edges. The closure operation is performed on the final mask and its radius is determined by this parameter. This parameter is optional, and the default value is 5.

Radius of Growth:

This parameter determines the radius in pixels by which the mask needs to be grown before edge refinement. This may be necessary if the object to be segmented is not entirely contained within the input mask. This parameter is optional, and the default value is 3.

Clone this wiki locally