Masking (filling) images

From MIPAV
Jump to: navigation, search

Masks allow you to remove portions of images and display only those portions as separate image files. For example, you may only be interested in a section of an image and only want to display and work with that section.

Creating a mask

To create a mask, you first, need to create one or more VOIs on the image. Depending on the type of mask you want to create, the VOIs should do either of the following:

Enclose the image areas you want to preserve
Enclose the image areas you do not want to preserve

If the VOIs indicate the areas of the image that should be deleted from the image, you need to create an interior mask and specify the number of pixels the program should use to hide the image inside the VOIs, or interior (Figure 19-B).

To preserve the image inside the VOIs, however, you need to create an exterior mask. An exterior mask fills the image outside of the VOIs with the number of pixels you specify. This filling hides the portions of the image outside the VOIs, or exterior (Figure 19-C).

Figure 19. An original image (A), interior mask (B) and exterior mask (C)

FillOriginal.jpg A

FillInterior.jpg B

FillExterior.jpg C

To create an interior mask

1 Open an image.
2 Create one or more VOIs that enclose the portions of the image that interest you.
3 Select Utilities > Fill. The Fill dialog box (Figure 20) opens.
4 Type the number of pixels to fill the interior of the VOIs.
5 Select Interior fill.
6 Select either New Image or Replace Image depending on which you prefer.
7 Click OK. The program either displays a new image or replaces the current image with an image that hides the portions of the image that are inside the VOIs (19-B).

To create an exterior mask

1 Open an image.
2 Create one or more VOIs that enclose the portions of the image that interest you.
3 Select Utilities > Fill. The Mask dialog box (Figure 20) opens.
4 Type the number of pixels to fill the interior of the VOIs.
5 Select Exterior fill.
6 Select either New Image or Replace Image depending on which you prefer.
7 Click OK. The program either displays a new image or replaces the current image with an image that hides the exterior of the image outside the VOIs (Figure 19-C).

Figure 20. The Fill Image dialog box
Parameters
Specifies the value in pixels to fill the VOI.

FillImage2.jpg

Interior fill
Applies the value to the interior of the VOI.
Exterior fill
Applies the value to the exterior of the VOI.
New image
Shows the cropped image in a new image window.
Replace image
Replaces the current active image with the cropped image.
OK
Applies the parameters that you specified to mask the image.
Cancel
Disregards any changes you made in this dialog box, closes the dialog box, and does not mask the image.
Help
Displays online help for this dialog box.

See also:

Changing Image Datasets Using MIPAV Utilities

Flipping images