Example: Zoom In to See Transform Previews for Big Images

This example shows how previews for the Transform pane 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.




We open the image in a window and use Zoom to Fit so the entire data set is seen in the window.   


We launch the  Transform pane.




In the Transform pane 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.




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.



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 pane.




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.



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 pane stops previewing the expression.


See Also





Command Window








Style: Images


Style: Palettes


Transform pane


Transform Templates - Images


SQL Operators


SQL Functions


Example: Rearrange Channels using an Expression - We use a simple expression in the Transform pane to rearrange the order of channels within the data.


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


Intermediate Levels