Transform Templates - Tile

This topic discusses application of the Transform panel with Tables or Images on a tile field in a table. See the Transform panel 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 Drawings.

 

Many tile functions are the tile equivalents of mathematical functions operating on numeric fields.  In the case of tiles, the computation is performed upon the tile pixel value within a tile and put into the corresponding tile pixel in the target.   Tile functions are all GPGPU enabled.

 

 

 

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.

il_trans_img_tile_add_dlg.png

Preview: Apply Add to Tile using an Add value of 100.

 

il_trans_img_tile_elevation_raster.png il_trans_img_tile_add.png

The effect is the equivalent of lifting the terrain 100 units (in this case, feet).  From the above we see that palette and hill-shading 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:  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.  

il_trans_img_tile_aspect_dlg.png

Preview: Apply Aspect to Tile using a Radius of 10.

il_trans_img_tile_elevation_raster.png il_trans_img_tile_aspect.png

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.

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.  Take the source field, Interpolate pixel values based on radius and power, 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:  A Radius of 1 results in a 3x3 pixel array. The Power 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 works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.  

 

il_trans_img_tile_blur_dlg.png

Preview: Apply Blur to Tile using a Radius of 10 and a Power of 1.

 

il_trans_img_tile_ginevra_grayscale.png il_trans_img_tile_blur.png

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.

Copy

Copy the source field 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.

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.

Direction Blur

Appears for single channel images.   Take the source field, Interpolate pixel values based on radius and power, averaging pixel values over a square array of pixels emphasizing the direction specified by the given angle, and place the result in the target field.  The Radius value sets the number of pixels from the center pixel to the edge:  A Radius of 1 results in a 3x3 pixel array. The Power 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.  Direction Blur works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.  

 

il_trans_img_tile_direction_blur_dlg.png

Preview: Apply Direction Blur to Tile using a Radius of 5, a Power of 1, and an Angle of 0.27 radians, which is approximately 15.5 degrees.

 

il_trans_img_tile_buildings_grayscale.png il_trans_img_tile_direction_blur2.png

The system blurs more in the direction of the specified Angle.

Direction Edges

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:  A Radius of 1 results in a 3x3 pixel array. The Power 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.  

 

il_trans_img_tile_direction_edges_dlg.png

Preview: Apply Direction Edges to Tile using a Radius of 1, a Power of 3, and an Angle of 0.27 radians, which is approximately 15.5 degrees.

 

il_trans_img_tile_buildings_grayscale.png il_trans_img_tile_direction_edges.png

The system emphasizes the edges where changes are found between pixel values when traversing the data in an approximately 15.5 degree angle.

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.

il_trans_img_tile_divide_dlg.png

Preview: Apply Divide to Tile using a Divide by factor of 2.

 

il_trans_img_tile_elevation_raster.png il_trans_img_tile_divide.png

The terrain heights become lower and less steep. From the above we see that palette and hill-shading 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.  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:  A Radius of 1 results in a 3x3 pixel array. The Power 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.  

 

il_trans_img_tile_edges_dlg.png

Preview: Apply Edges to Tile using a Radius of 1 and a Power of 2.

 

il_trans_img_tile_buildings_grayscale.png il_trans_img_tile_edges.png

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.  

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.

Gaussian Blur

Appears for single channel images.  Take the source field, Interpolate pixel values based on radius and power, 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:  A Radius of 1 results in a 3x3 pixel array. The Power 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 Power.  Gaussian Blur corrects for circular radius while Blur computes blur on a square matrix.    Gaussian Blur works on a single channel: tiles should be a single channel, such as uint8, and not multichannel, such as uint8x3.  

 

il_trans_img_tile_gaussian_blur_dlg.png

Preview: Apply Gaussian Blur to Tile using a Radius of 10 and a Power of 1.

 

il_trans_img_tile_ginevra_grayscale.png il_trans_img_tile_gaussian_blur.png

 

Comparing Gaussian Blur to Blur

 

Blur is the classic box blur of many image editing programs, with the added ability to weight the central pixel.  Blur more closely approximates the "bokeh" effect of lense blur in out-of-focus regions of photographic images where some parts of the image are in-focus while others are out-of-focus.   A Blur example is on the left below.  

 

il_trans_img_tile_blur.png il_trans_img_tile_gaussian_blur.png

 

Gaussian Blur, on the right above, combines a Gaussian function (often thought of as a bell curve) with pixel values to compute weighted pixel averaging.  Gaussian Blur tends to better preserve boundaries and edges and operates as a low-pass filter as well.  Applying a slight Gaussian Blur to an image before downsizing it will often produce a better appearance for the reduced-size image by eliminating Moire effects and other high-frequency feature artefacts.

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.

Log-gamma Function

The log-gamma 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.

Maximum Value

Take the maximum, that is the greater value, of either the source field or the comparison field and save into the target field.

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.

il_trans_img_tile_multiply_dlg.png

Preview: Apply Multiply to Tile using a Multiply by factor of 2.

 

il_trans_img_tile_elevation_raster.png il_trans_img_tile_multiply.png

The terrain heights become higher and more steep. From the above we see that palette and hill-shading 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.  

 

il_trans_img_tile_negate_dlg.png

Preview: Apply Negate to Tile.

 

il_trans_img_tile_ginevra_grayscale.png il_trans_img_tile_negate.png

Creates a photographic negative.

Noise

Appears for single channel images. Place random noise values into pixels over the given range.

 

il_trans_img_tile_noise_dlg.png

Preview: Apply Noise to Tile using a Range of 60.

 

il_trans_img_tile_ginevra_grayscale.png il_trans_img_tile_noise.png

Parse Base64 String

Takes a base64-encoded string that encodes a tile value, convert it back into the original value and store into the tile.

Parse Hex String

Takes a hex-encoded string that encodes a tile value, convert it back into the original value and store into the tile.

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:  A Radius of 1 results in a 3x3 pixel array. The Power 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.  

 

il_trans_img_tile_sharpen_dlg.png

Preview: Apply Sharpen to Tile using a Radius of 5 and a Power of 1.

 

il_trans_img_tile_ginevra_grayscale.png il_trans_img_tile_sharpen.png

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

 

il_trans_img_tile_slope_dlg.png

Preview: Apply Slope to Tile using a Radius of 10.

 

il_trans_img_tile_elevation_raster.png il_trans_img_tile_slope.png

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.

il_trans_img_tile_subtract_dlg.png

Preview: Apply Subtract to Tile using a Subtract value of 100.

 

il_trans_img_tile_elevation_raster.png il_trans_img_tile_subtract.png

The effect is the equivalent of lowering the terrain 100 units (in this case, feet).  From the above we see that palette and hill-shading effects are applied even during a preview.

Tangent

Take the tangent of the source field and put it into the target field.

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.

 

 

 

Notes

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

 

See Also

Contents Pane

 

Transform

 

Contents - Transform

 

Transform Options


Transform Templates

 

Transform Templates - Drawings

 

Transform Templates - Images

 

Transform Templates - Binary

 

Transform Templates - Boolean

 

Transform Templates - Datetime

 

Transform Templates - Geom

 

Transform Templates - Numeric

 

Transform Templates - Text

 

Transform Templates - Tile

 

Transform: Center and Centroids

 

Transform: Escape Templates

 

Transform: Overlay Topology

 

Transform: Voronoi Diagrams