[GIS] Displaying raster Background Value as hollow for more than one set of RGB values using ArcMap

arcgis-10.2arcmapdisplayecwraster

I have two overlapping .ecw layers of the same area, though one is clipped in the middle, with a white edge.
When I set the background value to 255,255,255, and define it as hollow, it only hollows that specific RGB value, when in reality, there are other "white" values in my layer, such as:

254,254,254; 253,253,253.. all the way to 249,249,249.

Is there a way to define the display background value to include more that one unique RGB set of values?

I know I can work around this (clipping, raster calculator, etc.), but I want to retain only one original .ecw file without producing duplicates, therefore I only want to use Arcmap symbology or image rendering tools.

What I need is exactly like the Custom transparency options in QGIS, but for ArcMap.

Best Answer

Since 10.1, you can use the image analysis tools (Windows > image analysis) to create a mask function that will perform the masking on the fly

Using the Mask function, you will specify one or more NoData values or a range of valid pixel values.

The inputs for this function are the following:

Input Raster / NoData Interpretation / NoData Values / Included Ranges

NoData Interpretation refers to how the NoData values will impact the output image.

All—The NoData values you specify for each band must occur in the same cell for the output image to contain the NoData cell.

Any—If the NoData value you specify occurs for a cell in a specified band, then that cell in the output image will be NoData.

Here are the paraphrased instructions on how to implement this, from ESRI's documentation:

Adding a function

Each function in a function chain is represented by a function symbol function. To begin adding functions for the first time you need to click the Add Function button on the Image Analysis window. If the raster layer contains a Functions tab you can modify the chain and functions within that tab. If you wish to generate a new raster layer in the table of contents with an edited function chain, click the Function Editor... Add Function button. Getting to the function chain can vary, depending on if it exists.


These steps describe how to add a function to a raster layer for the first time.

  1. In ArcMap, open the Image Analysis window (click Window > Image Analysis).
  2. Select the layer in the Image Analysis window and click the Add Function button. The Raster Function Editor window opens containing a default function chain. The Identity function exists when there is no other function. Once you add a function, the Identity function disappears as it is no longer necessary.
  3. Right-click the Identity function, click Insert, then click the Mask Function to add. When you add a function, it is inserted above the function you clicked.
  4. Modify its settings and click OK. Once you click OK, the function chain will be validated. If the function you are adding invalidates the function chain it will not be added. You cannot drag and drop functions to change their position within the chain. You need to remove a function and add it to a new location if you want to move a function.