Logo Logo

Remove No_Data Pixels

This tutorial outlines how to remove No Data pixels from imagery in CATALYST Professional. This process is for rasters which have an image value for the metadata tag NO_DATA_VALUE and the value is treated as a no-data or missing data value.

1. Introduction

No Data values (shown under the Viewer as "N/A") are simply metadata tags in the PIX file, displayed in the metadata as "NO_DATA_VALUE." This can be stored at the file level (In Focus, under the Files tab, right-click on the PIX file > Properties > select the Metadata tab) or at the band level (In Focus, under the Files tab, right-click on each individual band > Properties > select the Metadata tab). Usually, this value is set at the file level and will be the same value for all bands in the file (you only set NO_DATA_VALUE at the band level if you have different values for each band).

You can set the NO_DATA_VALUE tag to any PIX file under the Metadata tab using the “+” button:

However, the NO_DATA_VALUE metadata tag is really only used in Focus to make these areas transparent when you load the image into the viewer. Only some of the algorithms acknowledge the NO_DATA_VALUE tags. In many cases, you would need to use the actual value (zero in this case).

2. Mask the boundaries of the data

To create a mask of the data area:

  1. Open your image in CATALYST Focus.
  2. Add a bitmap to the image file (Note: The file will need to be in PIX format in order to add a bitmap):
    • In the Files tab > right-click the image > New > choose Bitmap Layer.
  1. Open the new bitmap layer in Focus.
  2. From the Maps tab, select the bitmap layer.
  3. Using the polygon tool, trace over the area of the image with valid data pixels, making sure that the bitmap covers all extents of the No Data pixels within the image.
    • Note: You may need to save the PIX file and reopen it in Focus to see the traced bitmap.

3. Remove No Data pixels using EASI

Once the bitmap is created you can then use it as a mask when running EASI modeling.

To remove the No Data pixels using an EASI script:

  1. Open Focus > Tools > EASI Modelling.
  2. The following template EASI model assumes the following:
    • The bitmap segment number is 2
    • There are three channels in the imagery
    • The NO_DATA_VALUE metadata tag is set to 0
  3. The EASI script to run is shown below. It checks if the bitmap = 1 and the imagery pixel value = 0, and if so, changes the pixel value to 1. We only want this change to happen where the bitmap = 1 because otherwise all the valid No Data pixels around the image would also be changed to 1 (which we do not want).

if %%2=1 and %1=0 then



if %%2=1 and %2=0 then



if %%2=1 and %3=0 then



Holes in image (from no data) before running the EASI script:

After running the EASI script – pixels are set to 1 so they are no longer “holes”: