This topic discusses application of the Transform panel with Images on a tile field for the image. That is equivalent to applying the Transform dialog to a table for an image and using the tile field in the table. See the Contents  Transform and Transform Templates topics for use and for links to lists of templates for other data types for tables and use of the Transform Dialog with other components, such as Tables and Drawings.
Important: Many tile functions are the tile equivalents of mathematical functions operating on numbers. The examples and table illustrations in this table show the operation of numeric transforms, since those are easily visible in a table. The tile function equivalents for tile data type fields will do the same math, but operating upon the numeric pixel values within the tile.
Images such as RGB images that utilize multiple channels have only the Channels template, allowing creation of an image that extracts one of the channels used. Images that utilize only a single channel have many more transforms as listed below.
Many illustrations in this topic use 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.
Tech Tip: Manifold runs CPU parallel and also GPU parallel, as discussed in the GPGPU topic. Having a GPU can make a huge difference in speed for many of the transforms listed in this topic, for example, when computing Curvature or Slope or Aspect using a radius of 3 or more. Manifold running without a GPU installed will automatically use CPU parallelism instead for spectacular parallel speed, but with a GPU installed Manifold can often run dramatically faster. Installing at least one, inexpensive NVIDIA GPU card in our systems allows such operations to run with astonishing speed, at times reducing computations from minutes to seconds or from hours to seconds. A wide range of GPU cards costing from under $100 to around $250 will make a spectacular difference.
Convolution filters as used in any transform that involves a Radius parameter will usually output floating point numbers as the data type. This leads to two effects we should keep in mind:
When we choose Add Component in the Transform panel we will create a new image where pixel values are expressed in floating point numbers, even if the original image used integers.
If the image on which we operate uses integers for pixel values, the preview in the Transform panel may show noise or otherwise unexpected effects. The resulting image will be correct, but because the preview attempts to show floating point variations rounded to integer values, the preview may be wildly inaccurate.
Most terrain surfaces already use floating point numbers for their pixel values. However, photographs and graphics arts images often will use integers. If we apply transforms like Sharpen to those, the output image will use floating point numbers. Within the Transform panel, the preview will look strange. For example, Sharpen previews for an integer image will look like noise. The photographic images used in this topic have all been converted from integer to floating point.
For examples of numeric function operation, see the Transform Templates  Numeric topic. For information on transform templates that use a Radius argument, utilizing a filter matrix, see the How Matrix Filters Work topic.
Absolute Value 
Take the absolute value of the tile pixel value in the source field and put it into the target field. Absolute value leaves positive numbers unchanged and converts negative numbers into their positive equivalents. 
Add 
Add two values and put the result into the target field. Appears for single channel images as well. Useful for increasing the level of terrain elevation data. Preview: Apply Add to Tile using an Add value of 100.
The effect is the equivalent of lifting the terrain 100 units (in this case, feet). From the above we see that palette and hillshading effects are applied even during a preview. 
Arc Cosine 
Take the arc cosine (inverse cosine) of the source field and put it into the target field. 
Arc Sine 
Take the arc sine (inverse sine) of the source field and put it into the target field. 
Arc Tangent 
Take the arc tangent (inverse tangent) of the source field and put it into the target field. 
Arc Tangent of Ratio 
Take the arc tangent (inverse tangent) of the ratio between the DY field and the DX field and put into the target field. 
Aspect 
Appears for single channel images. Treating the pixel values as heights to imply a surface, compute the direction in which the slope of the terrain faces and save as a pixel value that direction in degrees, with 0 to 180 representing the Eastern semicircle and 1 to 179 the Western semicircle. A larger Radius takes longer to calculate but averages out the changes in slope to a greater extent. The direction is computed by comparing heights of a square array of pixels within a given radius.
The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Aspect works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.
Caution: Slight increases in Radius can cause disproportionately enormous increases in the computation time required. Without a GPU a Radius of 3 is slow but tolerable because Manifold will run CPU parallel for better speed. With a GPU, even incredibly large computations involving a Radius of 7 or even 8 are possible on a desktop machine, as Manifold will automatically GPGPU parallelize the aspect calculation. Without a GPU, start with a Radius of 1 and then scale up slowly to see where patience ends. As a practical matter, there is not much gain in accuracy of aspect computation when increasing Radius beyond 4 or 5. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Preview: Apply Aspect to Tile using a Radius of 3.
The values resulting from Aspect are no longer heights but are degrees of compass orientation, so all are colored within the blue range of the palette in use. It makes little sense to apply hill shading to a raster display of aspect values. We would remove hill shading and choose a different palette after applying Aspect.

Average 
Appears for single channel images. Identical to Blur, but uses a fixed Center value of 1. Provided for convenience, since beginners and those who do not use the system every day might not realize that Blur using a Center value of 1 is just averaging.
Similar to Median but using the average of values and not the median as Median does. Take the source field, Interpolate pixel values based on radius, averaging pixel values over a square array of pixels, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. Average works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. Clicking into the Shape parameter allows us to choose the shape of the filter as a circle, cross or square, the default. Square Shape
Preview: Apply Average to Tile using a Radius of 10 and the default Shape of square. Caution: a Radius of 10 is OK for small images like those used in graphics arts, but unreasonably large for aerial photos and other geographic images. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Cross Shape
Preview: Apply Average to Tile using a Radius of 10 and a Shape of cross.
Circle Shape
Preview: Apply Average to Tile using a Radius of 10 and a Shape of circle.
Using a circle shape for the filter tends to reproduce the "bokeh" effect when objects are seen through an outoffocus effect.

Base 10 Logarithm 
Put the base 10 logarithm (also called the common logarithm) of the source field into the target field. 
Base 2 Logarithm 
Put the base 2 logarithm (also called the binary logarithm) of the source field into the target field. 
Bessel J0 
A Bessel function of the first kind: Put the result of the Bessel function J0(x) using the source field as x into the target. 
Bessel J1 
A Bessel function of the first kind: Put the result of the Bessel function J1(x) using the source field as x into the target. 
Bessel Jn 
The nth Bessel function of the first kind: Put the result of the Bessel function Jn(x) for Order n using the source field as x into the target. Specifying 2 for Order uses a J2(x) Bessel function. Using 0 or 1 for the Order is equivalent to using J0(x) or J1(x), respectively. 
Bessel Y0 
A Bessel function of the second kind: Put the result of the Bessel Function Y0(x) using the source field as x into the target. 
Bessel Y1 
A Bessel function of the second kind: Put the result of the Bessel Function Y1(x) using the source field as x into the target. 
Bessel Yn 
The nth Bessel function of the second kind: Put the result of the Bessel Function Yn(x) for Order n using the source field as x into the target. Specifying 2 for Order uses a Y2(x) Bessel function. Using 0 or 1 for the Order is equivalent to using Y0(x) or Y1(x), respectively. 
Blur 
Appears for single channel images. Identical to Average, but allows specifying the Center value instead of using a fixed Center value of 1. Blur is similar to Median but using the average of values and not the median as Median does. Take the source field, Interpolate pixel values based on radius and center, averaging pixel values over a square array of pixels, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. Blur works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.
Clicking into the Shape parameter allows us to choose the shape of the filter as a circle, cross or square, the default. Square Shape
Preview: Apply Blur to Tile using a Radius of 10, a Center of 1, and the default Shape of square. Caution: a Radius of 10 is OK for small images like those used in graphics arts, but unreasonably large for aerial photos and other geographic images. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Cross Shape
Preview: Apply Blur to Tile using a Radius of 10, a Center of 1, and a Shape of cross.
At the cost of introducing some blurriness, the cross shape filter is often used to remove artifacts from image processing.
For speed and simplicity, some image processing algorithms in various different graphics editors or image processing systems will often make two passes through an image, one pass considering pixels in each row, looking at neighbors to the left and right, and then a second pass considering pixels above and below in a column.
Using a cross shape filter, Blur averages against only pixels in the matrix above and below in the same column or to the left and right in the same row, ignoring diagonal pixel values. The filter therefore tends to average out artifacts that appear in the same column or the same row as a pixel. Using a cross shape filter with Median has a similar function. Circle Shape
Preview: Apply Blur to Tile using a Radius of 10, a Center of 1, and a Shape of circle.
Using a circle shape for the filter tends to reproduce the "bokeh" effect when objects are seen through an outoffocus effect.

Blur, Direction 
Appears for single channel images. Take the source field, Interpolate pixel values based on radius and center, averaging pixel values over a square array of pixels emphasizing the direction specified by the given angle (in radians), and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. Blur, Direction works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Preview: Apply Blur, Direction to Tile using a Radius of 5, a Center of 1, and an Angle of 0.27 radians, which is approximately 15.5 degrees.
The system blurs more in the direction of the specified Angle. 
Blur, Gaussian 
Appears for single channel images. Take the source field, Interpolate pixel values based on radius and center, averaging pixel values over a circular radius with a convolution function computed using a Gaussian function, and place the result in the target field.
The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. Radius has a greater visual effect than Center. Blur, Gaussian corrects for circular radius while Blur computes blur on a square, cross or uncorrected circular matrix. Blur, Gaussian works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.
Preview: Apply Blur, Gaussian to Tile using a Radius of 10 and a Center of 1. Caution: a Radius of 10 is OK for small images like those used in graphics arts, but unreasonably large for aerial photos and other geographic images. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
A familiar effect in Photoshop editing, Gaussian Blur is also useful to reduce details in raster data such as terrain elevation data sets. For example, a highly detailed, militarygrade, terrain elevation data set might be reduced in resolution using Gaussian Blur to enable release as a declassified data set for civilian use.
Comparing Blur, Gaussian to Blur
Blur is the classic box blur, using a square shape filter, of many image editing programs, with the added ability to weight the central pixel. When used with a circle shape filter, Blur more closely approximates the "bokeh" effect of lense blur in outoffocus regions of photographic images where some parts of the image are infocus while others are outoffocus. A Blur example using a circle shape filter is on the left below.
Blur, Gaussian, on the right above, combines a Gaussian function (often thought of as a bell curve) with pixel values to compute weighted pixel averaging. Blur, Gaussian tends to better preserve boundaries and edges and operates as a lowpass filter as well. Applying a slight Blur, Gaussian to an image before downsizing it will often produce a better appearance for the reducedsize image by eliminating Moire effects and other highfrequency feature artifacts. 
Ceiling 
Put the rounded up integer value of the source field into the target field. 
Ceiling up to Decimals 
Put the value of the source field rounded up to the specified number of Decimal positions into the target field. 
Complementary Error Function 
Take the complementary error function (also called erfc(z) ) of the source field and put it into the target field. 
Contour Areas 
Using values in a raster image as heights of terrain, create a drawing with vector areas representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step. Each area record will have ValueMin and ValueMax attribute fields giving the minimum and maximum height for that contour area.
The Decompose to shapes option, when checked (default), will automatically decompose all areas for the same range of contour interval values into separate area objects. Unchecking this option will result in the creation of a single, multibranched area object for each contour interval value range. This makes for a simpler results table and the ease of selecting all like areas with a single Ctrlclick, but when starting with larger raster data it can result in very large areas, consisting of millions of coordinates to cover all of the branches.
Zoom in for previews: The system shows a preview for data in the current viewport if reasonable. If a preview does not appear, zoom further into the display to reduce the quantity of data in the viewport.
See the Example: Contour Areas and Contour Lines topic for a stepbystep example. To learn how to create contour areas on whatever intervals we want, and not just evenlyspaced intervals, see the SQL Example: Custom Contour Intervals topic for an extremely easy method.
See also the Example: Trace Vector Areas from Raster Pixels topic, for the related template that traces areas by pixel values.
See the Manifold 9  Five Minutes for Contours video and the Manifold 9  Contour a 300MB DEM in Five Seconds video.

Contour Lines 
Using values in a raster image as heights of terrain, create a drawing with vector lines representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step. Each line record will have a Value attribute fields giving the height for that contour line.
The Decompose to shapes option, when checked (default), will automatically decompose all lines for the same contour value into separate line objects. Unchecking this option will result in the creation of a single, multibranched line object for each contour value. This makes for a simpler results table and the ease of selecting all like lines with a single Ctrlclick, but when starting with larger raster data it can result in very large lines, consisting of millions of coordinates to cover all of the branches.
Leaving the default Decompose to shapes option checked also has the advantage that if any of the created lines exceeds 64 million coordinates (! ... a big line...), Manifold will automatically split it into more than one line so that each stays less than 64 million coordinates in size.
Zoom in for previews: The system shows a preview for data in the current viewport if reasonable. If a preview does not appear, zoom further into the display to reduce the quantity of data in the viewport.
See the Example: Contour Areas and Contour Lines topic for a stepbystep example. To learn how to create contour lines on whatever intervals we want, and not just evenlyspaced intervals, see the SQL Example: Custom Contour Intervals topic for an extremely easy method.
See also the Example: Trace Vector Areas from Raster Pixels topic, for the related template that traces areas by pixel values.
See the Manifold 9  Five Minutes for Contours video and the Manifold 9  Contour a 300MB DEM in Five Seconds video.

Cosine 
Take the cosine of the source field and put it into the target field. 
Cube Root 
Take the cube root of the source field and put it into the target field. 
Curvature, Gaussian 
Appears for single channel images. Used for raster images that represent terrain elevations. Compute curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Curvature transforms work on a single channel: tiles should be a single channel using a floating point number such as FLOAT32 or FLOAT64, and not multichannel.
Curvature, Gaussian computes curvature as the product of the curvature in the direction of greatest curvature and the curvature in the direction of least curvature.
Compute Curvature, Gaussian using Tile with a Radius of 3. Previews do not make sense because Style must be used to specify the display of the result, typically using at least medium Autocontrast.
The illustration at above right shows the resulting image as a layer above the original image.
The illustration at above right shows a typical use for curvature results. The original image is shown in the upper Layer with 80% opacity, allowing the curvature image to partially show through. The blended result emphasizes details in a subtle manner. Multiple layers combining the results of different curvature transforms with different transparencies can be combined this way.
See the Speed Demo with 1280 GPU Cores video for an example using a Curvature filter. 
Curvature, Mean 
Appears for single channel images. Used for raster images that represent terrain elevations. Compute curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Curvature transforms work on a single channel: tiles should be a single channel using a floating point number such as FLOAT32 or FLOAT64, and not multichannel.
Curvature, Mean computes curvature as the average of the curvature in the direction of greatest curvature and the curvature in the direction of least curvature.
Compute Curvature, Mean using Tile with a Radius of 3. Previews do not make sense because Style must be used to specify the display of the result, typically using at least medium Autocontrast.
The illustration at above right shows the resulting image as a layer above the original image.
The illustration at above right shows a typical use for curvature results. The original image is shown in the upper Layer with 80% opacity, allowing the curvature image to partially show through. The blended result emphasizes details in a subtle manner. Multiple layers combining the results of different curvature transforms with different transparencies can be combined this way.
See the Speed Demo with 1280 GPU Cores video for an example using a Curvature filter. See also the Example: Enhance Terrain with Curvatures topic. 
Curvature, Plan 
Appears for single channel images. Used for raster images that represent terrain elevations. Compute curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Curvature transforms work on a single channel: tiles should be a single channel using a floating point number such as FLOAT32 or FLOAT64, and not multichannel.
Curvature, Plan (short for planform) computes curvature perpendicular to the direction of maximum slope. Plan curvature brings out ridges and valleys in a surface. See the ESRI blog entry for a good discussion.
Compute Curvature, Plan using Tile with a Radius of 3. Previews do not make sense because Style must be used to specify the display of the result, typically using at least medium Autocontrast.
The illustration at above right shows the resulting image as a layer above the original image.
The illustration at above right shows a typical use for curvature results. The original image is shown in the upper Layer with 80% opacity, allowing the curvature image to partially show through. The blended result emphasizes details in a subtle manner. Multiple layers combining the results of different curvature transforms with different transparencies can be combined this way.
See the Speed Demo with 1280 GPU Cores video for an example using a Curvature filter. See also the Example: Enhance Terrain with Curvatures topic. 
Curvature, Profile 
Appears for single channel images. Used for raster images that represent terrain elevations. Compute curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Curvature transforms work on a single channel: tiles should be a single channel using a floating point number such as FLOAT32 or FLOAT64, and not multichannel.
Curvature, Profile computes curvature parallel to the direction of maximum slope. Profile curvature brings out terrace effects in a surface. See the ESRI blog entry for a good discussion.
Compute Curvature, Profile using Tile with a Radius of 3. Previews do not make sense because Style must be used to specify the display of the result, typically using at least medium Autocontrast.
The illustration at above right shows the resulting image as a layer above the original image.
The illustration at above right shows a typical use for curvature results. The original image is shown in the upper Layer with 80% opacity, allowing the curvature image to partially show through. The blended result emphasizes details in a subtle manner. Multiple layers combining the results of different curvature transforms with different transparencies can be combined this way.
See the Speed Demo with 1280 GPU Cores video for an example using a Curvature filter. See also the Example: Enhance Terrain with Curvatures topic. 
Diversity 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to compute the total number of different values found within the pixels covered by the matrix, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Diversity Index 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to compute the diversity index of the values found within the pixels covered by the matrix, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle.
A diversity index provides a measure of diversity, computed as 1  sum(individualcount^2) / (totalcount^2), 0 means that all values are equal. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Divide 
Divide the source field by the divide field and put the result into the target field. Appears for single channel images as well. Useful for decreasing vertical scale in terrain elevation data. Preview: Apply Divide to Tile using a Divide by factor of 2.
The terrain heights become lower and less steep. From the above we see that palette and hillshading effects are applied even during a preview. 
Divide and Truncate 
Divide the source field by the divide field and put the integer part of the result into the target field. 
Edges 
Appears for single channel images. Find edges (transitions between pixel values) in any direction. Begin by setting Radius and Center to 1. Take the source field, emphasize edges by examining pixel values over a square array of pixels, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in comparisons compared to other pixels in the array. Edges works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Preview: Apply Edges to Tile using a Radius of 1 and a Center of 2.

Edges, Direction 
Appears for single channel images. Take the source field, emphasize edges by examining pixel values over a square array of pixels looking for changes along a direction at the specified angle, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in comparisons compared to other pixels in the array. Direction Edges works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Preview: Apply Direction Edges to Tile using a Radius of 1, a Center of 3, and an Angle of 0.27 radians, which is approximately 15.5 degrees.
The system emphasizes the edges where changes are found between pixel values when traversing the data in an approximately 15.5 degree angle. 
Error Function 
Take the error function (also called erf(z) ) of the source field and put it into the target field. 
Exponent 
The exponential function: Take e to the power of the source field and place result into the target field. For anything but small numbers in the source field such exponentiation very rapidly results in numbers larger than can be represented in most types and thus stores a NULL in the target. 
Fill 
Appears for single channel images. Given a tile Value (often the same tile as the target field, to edit it "in place") and a Fill with value, fill all visible pixels in the tile with the specified value. Useful for forcing all terrain elevations to a single, specified height.
Preview: Apply Fill to Tile using a Fill with value of 0.
The SRTM terrain height seen at left in a hill shaded view of the foothills of the Alps near Vicenza has missing pixels, seen in white, where the Space Shuttle radar scan did not acquire elevations. The Fill template flattens the terrain to a single height of 0 in the preview. Only visible pixels are altered. See the Fill in Missing Pixels video. 
Fill Missing 
Appears for single channel images. Given a tile Value (often the same tile as the target field, to edit it "in place") and a Fill with value, fill all missing, that is invisible, pixels in the tile with the specified value. Useful for filling all missing pixels to the same value. Preview: Apply Fill Missing to Tile using a Fill with value of 500.
The SRTM terrain height seen at left in a hill shaded view of the foothills of the Alps near Vicenza has missing pixels, seen in white, where the Space Shuttle radar scan did not acquire elevations. The Fill Missing template fills all missing pixels with a single height of 500 in the preview. Only missing pixels are altered. Visible pixels are not altered.
The TileFillMissing SQL Function used can accept xN values for filling values, but the template's Fill with box does not. To use xN values, press the Edit Query button to launch in the Command Window the query that does the work for this template, enter the desired xN value into the query, and run the query. See the Fill in Missing Pixels video. 
Fill Missing Nearest 
Appears for both multichannel images and single channel images. Given a tile Value (often the same tile as the target field, to edit it "in place") and a Radius value, fill each missing, that is invisible, pixel in the tile 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. Preview: Apply Fill Missing Nearest to Tile using a Radius value of 5.
The SRTM terrain height seen at left in a hill shaded view of the foothills of the Alps near Vicenza has missing pixels, seen in white, where the Space Shuttle radar scan did not acquire elevations. The Fill Missing Nearest template 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. See the Fill in Missing Pixels video. 
Floor 
Put the rounded down integer value of the source field into the target field. 
Floor down to Decimals 
Put the value of the source field rounded up to the specified number of Decimal positions into the target field. 
Fractional Part 
Take only the decimal fraction portion of the source and put into the target field. 
Fractional Part from Decimals 
Take only the decimal fraction portion of the source beyond the specified number of Decimal positions and put into the target field. 
Gamma Function 
Put the gamma function for the source field into the target field. 
Hyperbolic Arc Cosine 
Put the hyperbolic arc cosine of the source field into the target field. 
Hyperbolic Arc Sine 
Put the hyperbolic arc sine of the source field into the target field. 
Hyperbolic Arc Tangent 
Put the hyperbolic arc tangent of the source field into the target field. 
Hyperbolic Cosine 
Put the hyperbolic cosine of the source field into the target field. 
Hyperbolic Sine 
Put the hyperbolic sine of the source field into the target field. 
Hyperbolic Tangent 
Put the hyperbolic tangent of the source field into the target field. 
Hypotenuse 
The great and ancient Pythagorean theorem: The square root of the sum of the squares of the two sides of a right triangle. Save into the target the value of the hypotenuse taking two given source fields as DX and DY. 
Limit 
Appears for single
channel images. Limit the result at both the low
end and also the high
end, to no less than the limiting value in the At
least field and also to no more than the limiting value
in the At most field.
Save the Value field
into the result, unless that is below the At
least field, in which case the At
least field value is saved into the result, or unless that
exceeds the At most field,
in which case the At most field
value is saved into the result. Another way of looking at
this is to take the Value
field if it falls between
the At least and At most fields, inclusive. Yet
another way is to consider simultaneously the At
least field as the floor and
the At most field the
ceiling
for what is taken from the Value
field.
Preview: Apply Limit to Tile using an At least value of 250 and an At most value of 300.
The terrain height display becomes limited at the low end to the At least value of 250 and at the high end to the At most value of 300. The result is to extract varying terrain elevations from Value that are between 250 and 300, and to replace all other values with 250 for heights that were below the At least value and with 300 for heights that were above the At most value. See the Know Your Limits video. 
Limit High 
Appears for single channel images. Limit the result at the high end, to no more than the limiting value in the At most field. Save the Value field into the result, unless that exceeds the At most field, in which case the At most field value is saved into the result. Another way of looking at this is to take the minimum of the Value field or the At most field. Yet another way is to consider the At most field the ceiling for what is taken from the Value field. Preview: Apply Limit High to Tile using an At most value of 300.
The terrain height display becomes limited at the high end to the At most value of 300. Terrain elevation values that were above 300 have now been set to the high limit of 300. See the Know Your Limits video. 
Limit Low 
Appears for single channel images. Limit the result at the low end, to no less than the limiting value in the At least field. Save the Value field into the result, unless that is below the At least field, in which case the At least field value is saved into the result. Another way of looking at this is to take the maximum of the Value field or the At least field. Yet another way is to consider the At lease field the floor for what is taken from the Value field. Preview: Apply Limit Low to Tile using an At least value of 300.
The terrain height display becomes limited at the low end to the At least value of 300. Terrain elevation values that were below 300 have now been set to the low limit of 300. See the Know Your Limits video. 
Loggamma Function 
The loggamma function takes the natural logarithm of the gamma function for the source field and stores the result into the target field. 
Logarithm 
Put the base e logarithm (also called the natural logarithm) of the source field into the target field. 
Major 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to find the most frequently occurring value found within the pixels covered by the matrix, and place the result in the target field. If all values are different, use the lowest value. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Maximum 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to find the maximum value found within the pixels covered by the matrix, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Median 
Appears for single channel images. Similar to Blur but using the median of values and not the average as Blur does. Take the source field, interpolate pixel values based on radius and center, using the median of pixel values over a square array of pixels, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. Median works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.
Clicking into the Shape parameter allows us to choose the shape of the filter as a circle, cross or square, the default. Square Shape
Preview: Apply Median to Tile using a Radius of 10, a Center of 1, and the default Shape of square. Caution: a Radius of 10 is OK for small images like those used in graphics arts, but unreasonably large for aerial photos and other geographic images. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Cross Shape
Preview: Apply Median to Tile using a Radius of 10, a Center of 1, and a Shape of cross.
At the cost of introducing some blurriness, using a cross shape filter with Median is often used to remove artifacts from image processing similar to how a cross shape filter is used with Blur. Circle Shape
Preview: Apply Median to Tile using a Radius of 10, a Center of 1, and a Shape of circle.
Using a circle shape for the filter tends to reproduce the "bokeh" effect when objects are seen through an outoffocus effect., but with more simplified regions than with a circle shape filter in Blur.
Median with smaller radius is often used to eliminate noise pixels in an image.
The image at left has some noise pixels, white and black pixels scattered about. The image at right shows a preview of Median using a Radius of 1 and use of the square shape filter. Using the cross shape filter might produce an even better effect.

Minimum 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to find the minimum value found within the pixels covered by the matrix, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Modulo 
The remainder (of a congruence) function: Take what is left over by the integral division of the source field by the given Divide by value and place into the target field. 
Multiply 
Multiply the two source fields and place the result into the target field. Appears for single channel images as well. Useful for increasing vertical scale in terrain elevation data. Preview: Apply Multiply to Tile using a Multiply by factor of 2.
The terrain heights become higher and more steep. From the above we see that palette and hillshading effects are applied even during a preview.

Negate 
Appears for single channel images. Multiply the source field by 1 and place the result into the target field.
Preview: Apply Negate to Tile.
Creates a photographic negative.
With terrain elevation data, Negate turns hills into depressions.

Noise 
Appears for single channel images. Place random noise values into pixels over the given range.
Preview: Apply Noise to Tile using a Range of 60.

Power 
Compute the source field to the power of the specified Power value and put the result into the target field. A Power of 2 is the source field squared while a Power of 3 is the source field cubed. 
Power of 10 
Compute 10 to the power of the source field and put the result into the target field. If the source field has values 1, 2, 3,... the result of Power of 10 will be 10, 100, 1000,.... For anything but small numbers in the source field such exponentiation very rapidly results in numbers larger than can be represented in most types and thus stores a NULL in the target. 
Power of 2 
Compute 2 to the power of the source field and put the result into the target field. If the source field has values 1, 2, 3,... the result of Power of 2 will be 2, 4, 8,.... For anything but small numbers in the source field such exponentiation very rapidly results in numbers larger than can be represented in most types and thus stores a NULL in the target. 
Reciprocal Cube Root 
Also known as the inverse cube root: Take 1 divided by the cube root of the source field and put the result into the target field. 
Reciprocal Square Root 
Also known as the inverse square root: Take 1 divided by the square root of the source field and put the result into the target field. 
Round 
Round a source field with a fractional part up or down to the nearest integer and put the result into the target field. 
Round to Decimals 
Round a source field with a fractional part up or down to the number of decimals specified by Decimals and put the result into the target field. 
Sharpen 
Appears for single channel images. Enhance contrast and edge detection by comparing pixel values within a square array of pixels. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it. A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. Sharpen works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.
Preview: Apply Sharpen to Tile using a Radius of 1 and a Center of 1.
With terrain elevation data, Sharpen may appear to add detail but it does not. It simply emphasizes contrasts between pixels that are already in the data. Increasing Z for hill shading might give a better effect. 
Sign 
For a source field that is positive or negative put a 1 or 1 respectively into the target field. 
Sine 
Take the sine of the source field and put it into the target field. 
Slope 
Appears for single channel images. Treating the pixel values as heights to imply a surface, compute the inclination in degrees of the surface at the pixel's position and save as a pixel value from 0 to 90 . Compute the degree to which terrain slopes by comparing heights of a square array of pixels within a given radius. A larger Radius takes longer to calculate but averages out the changes in slope to a greater extent. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. Slope works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.
Caution: As with the Aspect template, slight increases in Radius can cause disproportionately enormous increases in the computation time required. Without a GPU a Radius of 3 is slow but tolerable because Manifold will run CPU parallel for better speed. With a GPU, even incredibly large computations involving a Radius of 7 or even 8 are possible on a desktop machine, as Manifold will automatically GPGPU parallelize the aspect calculation. Without a GPU, start with a Radius of 1 and then scale up slowly to see where patience ends. As a practical matter, there is not much gain in accuracy of slope computation when increasing Radius beyond 5.
Preview: Apply Slope to Tile using a Radius of 5.
The values resulting from Slope are no longer heights but are degrees of inclination, so all are colored within the blue range of the palette in use. It makes little sense to apply hill shading to a raster display of aspect values. We would remove hill shading and choose a different palette after applying Slope.

Square Root 
Take the square root of the source field and put it into the target field. 
Subtract 
Subtract one source field from the other and put the result into the target field. Appears for single channel images as well. Useful for decreasing the level of terrain elevation data. Preview: Apply Subtract to Tile using a Subtract value of 100.
The effect is the equivalent of lowering the terrain 100 units (in this case, feet). From the above we see that palette and hillshading effects are applied even during a preview. 
Sum 
Appears for single channel images. Take the source field, for each pixel using a matrix of the given Radius to find the sum of values found within the pixels covered by the matrix, and place the result in the target field. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter: A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a square, a cross, or a circle. This transform works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3. GPU parallelism switches to CPU parallelism at a Radius of 9 or greater. 
Tangent 
Take the tangent of the source field and put it into the target field. 
Trace Areas 
Using values in a raster image, create a drawing with vector areas covering regions of similarlycolored, that is, similarlyvalued, pixels. Each area will also have a Value attribute field giving the pixel value for which it was created. The template can create areas whether values for pixels are intended as colors or as elevation or other values.
The Similarity factor gives the range within which pixel values will be considered to be in the same classification. A Similarity of 10 would group values of 11, 14, and 18 together in one group and values of 20, 23 and 27 in a different group. The default value of 1 for Similarity means to treat pixels within the same integer values as unique. A value of 0 for Similarity would treat each unique pixel value found as a separate classification (using 0 is often a mistake given there might not be an intended difference between close pixel values such as 1.00003 and 1.000031).
The Decompose to shapes option, when checked (default), will automatically decompose all areas for the same class of color into separate area objects. Unchecking this option will result in the creation of a single, multibranched area object for each class. This makes for a simpler results table and the ease of selecting all like areas with a single Ctrlclick, but when starting with larger raster data it can result in very large areas, consisting of millions of coordinates to cover all of the branches.
We start with a raster image where a single number for each pixel, that is, a single channel, is intended to be an index number for a palette image. Each number indicates a land use code for that pixel. The image above is colored with a palette to represent visually the content of the image. For example, it uses green colors for pixels where the classification code is intended to mean forest. The image is created from a tile field in the table called Tile1. Approximately 30 different colors are used, to represent 30 different land uses in the region.
Preview: Apply Trace Areas to Tile1 using a Similarity of 0.
The preview shows the area objects that will be created in the new drawing. Press Add Component to create the new drawing.
Dragging and dropping the new drawing into the map, we can color it using Style to show the areas it contains. Trace Areas and HeightsThe Trace Areas template can be used with data sets that show terrain elevations to create results similar to using the Contour Areas template.
Consider the elevation data set used in examples, as seen above.
Choosing Trace Areas with a Similarity of 1 will attempt to create an area for each region of pixels that has a different integer bounded value.
That creates so many areas so densely packed that the preview is a mass of blue preview color.
Using a Similarity of 10 tells the template to create an area that covers each swath of pixels within a range of 10, that is, heights from 0 to 10, 10 to 20, and so on.
From the preview we can see that results in a more useful set of areas. We press Add Component to create the new drawing.
Formatting the drawing we can see the effect is similar to creating contour areas.
See the Example: Trace Vector Areas from Raster Pixels topic as well as the Trace Vector Areas from Raster Pixels video. 
Truncate 
Take the integer part of the source field, discarding any decimal fraction part, and put the result into the target field. 
Truncate to Decimals 
Take the integer part of the source field as well as any decimal fraction up to the specified number of Decimal places, discarding any decimal fraction part beyond, and put the result into the target field. 
Why a GPU parallelism limit to radius of 8 or less?  Transforms using a Radius parameter to set the size of the filter matrix applied typically are limited to a radius of 8 or less for GPGPU parallelism, switching to CPU parallelism at a radius of 9 or greater. That limitation allows more flexible use of a greater range of GPU cards. Some cards, perhaps older cards or lower cost cards, may have limited memory or earlier generation GPU chips, but they nonetheless can provide very many cores for GPGPU parallel computation. Manifold makes it possible to use such cards effectively for GPGPU parallelism.
A radius of 8 implies a 17x17, 289cell matrix, an absurdly huge and almost always an excessively large choice for matrix size. A radius of 9 or above may indicate a conceptual error or workflow error. At the same time, use of a radius of 9 or above requires so much GPUaccessible memory that such tasks fit into fewer and fewer cards, even if performancereducing methods are adopted. Given a choice between assuring a wide range of GPU cards will always work well, or restricting GPU choice to allow practices that are probably wrong in any event, Manifold chooses to support a wider range of GPU cards, placing the current switch to CPU parallelism at a radius of 9. That may change as CUDA editions evolve.
Everything Math  For a handy reference to anything in mathematics, see the Wolfram MathWorld site. Thank you, Wolfram!
A guy walks into a bar and asks for 1.014 root beers. The bartender says, “I’ll have to charge you extra, that’s a root beer float”. So the guy says, “In that case, better make it a double.”
Why do programmers confuse Halloween with Christmas? Because OCT 31 = DEC 25.
Transform Templates  Drawings
Transform: Center and Centroids
Example: Import DDF SDTS DEM Raster File
SQL Example: Process Images with 3x3 Filters  Shows a stepbystep example of developing an SQL query that takes a query written by the Edit Query button and then modifies that query into a general purpose query that can apply any 3x3 filter. This makes it easy to use matrix filters we find on the web for custom image processing. We extend the query by using parameters and adding a function, and then show how it can be adapted to use a 5x5 filter.
SQL Example: Process Images using Dual 3x3 Filters  A continuation of the above topic, extending the example query to utilize two filters for processing, as commonly done with Sobel and Prewitt two filter processing.
SQL Example: Process RGB Images using Matrix Filters  A continuation of the above two topics, extending the example query to process three channel, RGB images.
SQL Example: Create NDVI Displays  How to create a query that creates an NDVI display from a fourband NAIP image, with tips and tricks on how to copy and paste existing information to get the result we want.
Example: Enhance Terrain with Curvatures  We enhance a terrain showing Crater Lake, Oregon, by using mean curvature calculation to bring out details. The example uses a 4 GB project containing a large terrain elevation surface. Using a pointandclick dialog with no SQL, we apply automatic CPU parallelism and GPU parallelism to absolutely crush a task in two and a half minutes that would take nonparallel software days.