Example: Zoom In to See Transform Previews for Big Images

 

Example: Zoom In to See Transform Previews for Big Images

This example shows how previews for the Transform panel will appear in large images only when zoomed in far enough so computation of the preview does not cause objectionable delays.

 

Consider the terrain elevation and bathymetry data set used in the Example: Transform Elevation Image to Flatten Bathymetry to Zero topic.    In what follows we will use the same SQL function as used in that example.

 

il_zoom_for_preview_images_01.png

 

We open the image in a window and use Zoom to Fit so the entire data set is seen in the window.    In the Contents pane we click on the  Transform panel.

 

il_zoom_for_preview_images_02.png

 

In the Transform panel we click the Expression tab and enter the expression...

 

TileMax([Tile], 0)

 

...using the Manifold SQL function TileMax to flatten all below-zero elevations to zero.    As soon as we write enough of the expression that it can be evaluated, Manifold will normally generate in the imager window a preview of what the expression will accomplish.

 

il_zoom_for_preview_images_03.png

 

In this case that does not happen because the amount of data shown when we zoomed to fit is just slightly above what Manifold by default considers a reasonable amount to compute for a preview.     We can reduce the amount of data in view by zooming into a box using right-click and drag to draw a zoom box as seen above.

 

il_zoom_for_preview_images_04.png

As soon as we zoom in the amount of data in view becomes small enough that Manifold considers it reasonable to show a preview.    Previews are indicated by a grid of small dots in blue preview color within a border of blue preview color.

 

We can compare what the preview shows to what the original data is by checking the Restrict to selection box in the Transform panel.

 

il_zoom_for_preview_images_05.png

 

We have not made a selection, so restricting the action of the expression to only the selection means it does nothing, and thus no preview.   We therefore see the original, unmodified data.  When we want the expression to take effect, we simply uncheck the Restrict to selection box.

 

Comparing the above two illustrations we see that the TileMax expression changes all the negative values for ocean depths into zero elevation, without altering the terrain elevations over land.  

 

To see where previews end we can simply scroll the mouse wheel to zoom out to see where Manifold decides computing a preview causes too much of a pause.

 

il_zoom_for_preview_images_06.png

In this case it is near the total extent of the data, with approximately the view above being as far as we can zoom out before the Transform panel stops previewing the expression.

 

See Also

Selection

 

Images

 

Command Window

 

Queries

 

Functions

 

Style

 

Style: Images

 

Style: Palettes

 

Contents Pane

 

Transform panel

 

Transform Templates - Images

 

SQL Operators

 

SQL Functions

 

Examples

 

Example: Transform Elevation Image to Flatten Bathymetry to Zero - Using the Transform panel with an image, which contains a single data channel for terrain elevation data for land together bathymetry data for oceans, we use the Expression tab of the Transform dialog to reset all pixel values less than zero to zero.   This takes all below-zero elevations and sets them to zero, in effect removing bathymetry effects so that ocean areas are represented with zero elevation.  

 

Example: Parallel Speed Increase in an Image Transform - A short example illustrating how checking the Allow parallel execution option (on by default) increases speed by a factor of four in a simple use of the Transform panel to modify an image.

 

Intermediate Levels