Edit - Save, Load Mask/Channel

Masks are grayscale images that are used to control other images. Masks are used for two purposes:

 

·      To make a selection in the shape shown by the mask.

·      To alter the values in the R, G, B or alpha channels of the target image using the values in the mask.

 

A mask can be any grayscale image. There is nothing special about grayscale images used as masks. What makes a grayscale image a "mask" is simply how we use it. See the Selection using Masks and Masks topic for details and examples.

 

We can create masks using any method used to create or edit grayscale images. Since masks are often used as a means of saving selections or other patterns from existing images Manifold provides an Edit - Save Mask/Channel command that makes it easy to create a mask using an existing image.

 

These commands can also be used with surfaces.

 

Choices for Save Mask/Channel

 

Any of the following aspects of an image may be saved as a mask:

 

·      The Selection.

·      The region of invisible pixels.

·      Any saved selection we have made for this image in the Selections pane.

·      The R, G, or B channels in the image if it is an RGB image.

·      The alpha channel in the image if it is an RGBa image.

 

Note: The Save Mask/Channel dialog will not list any saved selections that are empty. If no selection is present in the image the dialog will not include a Selection choice. If the dialog contains no invisible pixels there will be no choice for Invisible pixels available.

 

We can load an image using a mask as a guide by using the Edit - Load Mask/Channel command.

 

Choices for Load Mask/Channel

 

Using a mask we can load any of the following aspects of an image:

 

·      The Selection.

·      Make the pixels in a given region invisible pixels.

·      The R, G, or B channels in the image if it is an RGB image.

·      The alpha channel in the image if it is an RGBa image.

 

When used to specify the Selection or invisible pixels every pixel in the mask that is black signifies no selection or no invisible pixel at that spot. Any pixel that is not black signifies making a selection or an invisible pixel at that spot. When using a mask to specify a region of invisible pixels any previously invisible pixels will remain invisible since making a pixel invisible is always a "one-way" operation that deletes the pixel.

 

When used to specify an R, G, B or alpha channel the value from 0 to 255 of the grayscale pixel is used for the value of the specified channel for that pixel location.

 

Load

Which part of the image is to be loaded. The selection, a channel, or invisible pixels.

From

The source image to use for the mask. All grayscale images available will be listed together with their sizes.

Mode

Specifies how to use the mask within the target image:

Add - Add the intensity values of the mask pixels to the target.

Invert - If the intensity of a mask pixel is greater than 128, invert the value of the target pixel.

Maximum - Use the maximum of intensity of either the mask pixel or the target pixel.

Minimum - Use the minimum of intensity of either the mask pixel or the target pixel.

Replace - The default. Use the values of the mask pixels.

Subtract - Subtract the intensity of the mask pixel from the target pixel.

Restrict to Selection

If checked (the default), when a selection is present the mask will be applied only within the selected pixels.

 

See the Masks topic for examples.

 

Use with Surfaces

 

The Edit - Save Mask/Channel dialog for surfaces includes choices to save a grayscale image, invisible pixels or aspect or slope data in single-precision floating-point format into new surfaces. Aspects vary from -180 to 180 degrees. Slopes are given in degrees. Surfaces created using this dialog will retain the coordinate system (projection) and saved selections of the original surface.