Core Optical, Inc.
ShadedReliefMap ClassIndustrial Strength, Scientific Grade
A type encapsulating analytical hillshading functionality.
Inheritance Hierarchy

OnlineSystem Object
  PrecisionImage.SpatialFiltering SpatialFilteringOperator
    PrecisionImage.Visualization ShadedReliefMap

Namespace: PrecisionImage.Visualization
Assembly: PrecisionImage (in PrecisionImage.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public class ShadedReliefMap : SpatialFilteringOperator
Remarks

Use this class to retrieve the data rendered as an analytically-shaded relief map. Alter the Elevation and Azimuth properties to affect the light source origin. Elevation controls the elevation angle (in degrees) above horizontal of the light source and accepts values within the range of 0.0 - 90.0. Azimuth refers to the in-plane orientation (the angle from the image horizontal axis) in degrees and accepts values within the range of 0.0 - 360. The SlopeFactor property controls the amplification of the computed slope. The default value is 1.0f (no amplification). Larger values (100 - 500) cause greater visual slope effects.
Examples

The following example illustrates the output of the Laplacian of Gaussian edge-detection algorithm using 3 different settings:

using System.PrecisionImage;
using System.Visualization;

// Read the source (16-bit) image from disk and load into a SourceData object: 
Uri imageUri                   = new Uri("HorseStatueXray.tif", UriKind.Relative);
TiffBitmapDecoder imageDecoder = new TiffBitmapDecoder(imageUri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
BitmapSource SourceImage       = imageDecoder.Frames[0];
SourceData imageData           = new SourceData(SourceImage, GammaEncoding.None);

// Display original image in Image component:
image1.Source = SourceImage;

// Instantiate a ShadedReliefMap object and set properties: 
ShadedReliefMap reliefShader = new ShadedReliefMap();
reliefShader.Azimuth   = 0.0f;
reliefShader.Elevation = 45.0f;

// Generate image based on the x-ray and display:
image2.Source = reliefShader.GetShadedReliefImage(imageData, 0);

The above example generates the following images:

See Also