SkeletonCommand Class (original) (raw)

Summary

Finds the skeleton of objects or regions in the image. This command is available in the Document/Medical Toolkits.

Syntax

class SkeletonCommand(RasterCommand): 

Example

Run the SkeletonCommand on an image.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Effects; public void SkeletonCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); // Prepare the command SkeletonCommand command = new SkeletonCommand(); command.Threshold = 128; command.Run(image); codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }