Transform - Tiles: Fill

The Fill template appears in the template list when a raster tile field, of type Tile, has been picked in the Transform pane.  The template fills tile pixels in a specified channel by filling missing pixels with a specified value, by filling missing pixels with a nearest value within a specified radius, or by filling visible pixels with a specified value.

 

Fill

Fills tile pixels in a specified channel using one of three operations:

 

  • missing pixels - fills missing pixels with a specified value,
  • missing pixels from nearest - fills missing pixels with the nearest value in a specified radius,
  • visible pixels - fills visible pixels with a specified value.

 

Launch the template by choosing a Tile field and then double-clicking the Fill template.  When the template launches we can specify options.

 

 

Fill : missing pixels

Fills all missing (null valued) tile pixels in a specified channel with a specified value.

 

We begin with a raster image called Alps that has a single channel, channel 0, which gives SRTM terrain elevation in the foothills of the Alps near Vicenza, Italy.  The image has been styled to color elevations in different colors, with white background showing through in any regions of missing pixels.   The SRTM terrain height data has missing pixels where the Space Shuttle radar scan did not acquire elevations.

 

 

With the focus on the Alps image window, in the Transform pane we choose the Tile field and then the Fill template.

   

 

In the Fill template we choose channel 0 (the only channel in this particular image) for the Channel and we choose missing pixels as the Fill operation.   We enter 500 as the desired value to fill all missing pixels.

 

For the Result destination, we choose Same field to edit the Tile field "in place."  If desired we could save the results either into a new field in the same table or into a new image and table.   When working with images that have more than one channel, we will not be able to choose Same field but will have to save the results  either into a new field in the same table or into a new image and table.  

 

Press Transform.  

 

 

The missing pixels will be filled with a value of 500 in channel 0.  Comparing the original image to the result:

 

 

The missing pixels, seen in background white color in the original image, have been filled in with the blue color used for pixels with a value of 500 in channel 0.

 

Fill : missing pixels from nearest

Fill missing (null valued) tile pixels in a specified channel with the nearest visible pixel value found within the specified radius. If no visible pixel is found within the specified radius, make no change to the missing pixel. Useful for filling all missing pixels to the value of a nearby pixel.  

 

We begin with a raster image called Alps that has a single channel, channel 0, which gives SRTM terrain elevation in the foothills of the Alps near Vicenza, Italy.  The image has been styled to color elevations in different colors, with white background showing through in any regions of missing pixels.   The SRTM terrain height data has missing pixels where the Space Shuttle radar scan did not acquire elevations.

 

 

With the focus on the Alps image window, in the Transform pane we choose the Tile field and then the Fill template.

 

 

In the Fill template we choose channel 0 (the only channel in this particular image) for the Channel and we choose missing pixels from nearest as the Fill operation.   We enter 5 as the desired Radius.

 

For the Result destination, we choose Same field to edit the Tile field "in place."  If desired we could save the results either into a new field in the same table or into a new image and table.   When working with images that have more than one channel, we will not be able to choose Same field but will have to save the results  either into a new field in the same table or into a new image and table.  

 

Press Transform.  

 

The result fills in missing pixels using pixel values from nearby pixels that do have values.

 

Comparing the original image to the result:

 

 

The missing pixels from nearest operation fills all missing pixels with the nearest visible pixel found within a radius of 5 pixels.  If we had used a radius of 4, the large zone of missing pixels in the middle right of the original view would not have been completely filled in, since the missing pixels in the very center are more than 4 pixels away from the nearest visible pixel.

 

Fill : visible pixels

Fills all visible (non-null valued) tile pixels in a specified channel with a specified value.  This operation is useful to force all visible pixel values in an image channel to a particular value.

 

We begin with a raster image called Alps that has a single channel, channel 0, which gives SRTM terrain elevation in the foothills of the Alps near Vicenza, Italy.  The image has been styled to color elevations in different colors, with white background showing through in any regions of missing pixels.   The SRTM terrain height data has missing pixels where the Space Shuttle radar scan did not acquire elevations.

 

 

With the focus on the Alps image window, in the Transform pane we choose the Tile field and then the Fill template.

 

 

In the Fill template we choose channel 0 (the only channel in this particular image) for the Channel and we choose visible pixels as the Fill operation.   We enter 500 as the desired value to fill all visible pixels.

 

For the Result destination, we choose Same field to edit the Tile field "in place."  If desired we could save the results either into a new field in the same table or into a new image and table.   When working with images that have more than one channel, we will not be able to choose Same field but will have to save the results  either into a new field in the same table or into a new image and table.  

 

Press Transform.  

 

 

All of the visible pixels have been forced to a value of 500 in channel 0.

 

Comparing the original image to the result:

 

 

The missing pixels, seen in background white color in the original image, have not been modified.  All visible pixels have been modified to a value of 500.

 

 

Notes

Sample image - Many illustrations for transforms for raster images use an Elevation Raster sample image, a version of the formatted example of importing an SDTS format DEM from the Example: Import DDF SDTS DEM Raster File  topic.   The example project may be downloaded from the Downloads page on the Manifold web site.

 

Everything Math - For a handy reference to anything in mathematics, see the Wolfram MathWorld site.   Thank you, Wolfram!

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Tiles