Example: Zoom In to See Transform Previews for Big Images

News!  Manifold Future editions have moved Transform dialog capabilities from an Edit - Transform dialog to a Transform panel in the Contents pane.  Transform features work very much the same as described in this topic, just better as a pane.  See also the Contents pane topic.  Documentation will be updated soon.

 

This example shows how previews for the Transform Dialog 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.    We then choose Edit - Transform to launch the Transform dialog.

 

il_zoom_for_preview_images_02.png

 

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

 

TileMax([Tile], 0)

 

...using the Manifold SQL TileMax function 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 highlighting the TileMax expression in the Transform dialog and then choosing Ctrl-X to Cut it to the Clipboard.

 

il_zoom_for_preview_images_05.png

That empties the expression pane with no expression to preview so we can see the original data.   When we want the expression back we press Ctrl-V to Paste it and the preview, of course, comes back.   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 very near the total extent of the data, with approximately the view above being as far as we can zoom out before the Transform dialog stops previewing the expression.

 

See Also

Selection

 

Images

 

Command Window

 

Queries

 

Functions

 

Style

 

Style: Images

 

Style: Palettes

 

Transform Dialog

 

Transform Templates - Images

 

SQL Operators

 

SQL Functions

 

Examples

 

Example: Transform Elevation Image to Flatten Bathymetry to Zero - Using the Transform dialog 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 dialog to modify an image.

 

Intermediate Levels