Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Latest Release
Dev
8.3.0
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0
USGS

ISIS Application Documentation


mask

Printer Friendly View | TOC | Home

Set pixels to NULL using a mask cube

Overview Parameters Example 1 Example 2

Description

This program masks (or NULLs) pixels in an input cube.

Requirements

  • The input cube must be a level 1 or level 2 ISIS cube or mosaic (single or multiband)
  • If the MASK option is used, you will need an input cube, either a single band cube or specify one band of a multiband cube (see Example 1), containing the mask.

There are four ways to use the mask program; and, with all four options, listed below, you will use the PRESERVE parameter. As the name implies, you will "preserve" pixels either inside (which is the program default) or outside a given range. Preserve=inside: means the program will preserve pixels inside the provided range, and pixels that are not inside the range are nulled. Preserve=outside: means the program will preserve pixels outside the provided range, and pixels that are not outside the range are nulled.

Three Ways to Mask:

  1. The input cube can be masked without specifying a mask cube file by using the minimum and maximum parameters. Pixels outside the specified range are set to NULL. If preserve=outside is specified, the pixels outside the range are preserved.
  2. You can input a mask cube file. All the corresponding pixels in the input cube are retained for all valid pixels in the mask cube file. If the minimum and maximum values are entered also, then the pixels in the masked cube are checked to determine whether the pixel in the input file should be retained.
  3. You can input a mask cube file in addition to using the minimum and maximum parameters.

Note that due to the way masking works, an output file will be created regardless of whether or not the mask was applied to the corresponding input. To determine the degree to which an input cube was masked, look for the "PixelsMasked" group in print.prt . If no pixels were masked, there will be a comment present which reads "No pixels were masked in this image".


Categories


Related Objects and Documents

Applications


History

Kris Becker1990-12-03 Original version
Tracie Sucharski2002-06-19 Ported to Isis 3.0
Kim Sides2003-05-13 Added application test
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Sharmila Prasad2009-08-24 Set Internal Default for "MASK" to be "FROM"
Steven Lambright2010-10-13 Removed printf and now respecting cube attributes set on input cube
Kimberly Oyama2014-03-03 Made default MASK parameter work when FROM cube has multiple bands. Updated Documentation. Added examples. Fixes #1871.
Andrew Stebenne2015-03-22 Specify that an output cube will be created whether or not the mask was applied. Add an output group to print.prt to indicate how many pixels were masked in the output image. Implements recommendation #898.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 02/21/2025 19:28:12
X

Files: FROM


Description

Use this parameter to select the filename. All bands within the file will be masked.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: MASK


Description

Use this parameter to select the filename to be used as the mask. If you enter a multiband cube you must specify the band. If this parameter is not explicitly entered, each band of the FROM cube will be used as its own mask.

Type cube
File Mode input
Internal Default NULL
Filter *.cub
Close Window
X

Files: TO


Description

This file will contain the results of the masked cube

Type cube
File Mode output
Close Window
X

Mask Options: MINIMUM


Description

This defines the minimum range of valid data in the mask cube.

Type double
Internal Default ISIS minimum
Less Than or Equal MAXIMUM
Close Window
X

Mask Options: MAXIMUM


Description

This defines the maximum range of valid data in the mask cube.

Type double
Internal Default ISIS maximum
Greater Than or Equal MINIMUM
Close Window
X

Mask Options: PRESERVE


Description

This parameter indicates whether the pixels chosen to mask are within the range given or outside the range given. If INSIDE, pixels inside of given range will be preserved, and if OUTSIDE, pixels outside the range will be masked.

Type string
Default INSIDE
Option List:
Option Brief Description
INSIDE Preserve inside range If the mask pixel is inside the given range (indicated with the MINIUMUM and MAXIMUM parameters), the input pixel will be preserved in the output cube, otherwise it will be NULLed.
OUTSIDE Preserve outside range If the mask pixel is outside the given range (indicated with the MINIMUM and MAXIMUM parameters), the input pixel will be preserved in the output file, otherwise it will be NULLed.
Close Window
X

Special Pixels: SPIXELS


Description

This indicates which special pixel values are to be included as valid pixels in the mask. For example, a NULL in the mask cube will cause the output to be NULL if the NULL or ALL option is selected. If NONE is selected, then the input pixel will be propagated to the output cube.

Type string
Default NULL
Option List:
Option Brief Description
NONE None No special pixels are considered valid in the mask.
NULL Null pixels Null pixels will be included in the mask.
ALL All special pixels All special pixels included in the mask range
Close Window