SelectDataCommand Class (original) (raw)

Summary

Selects a specific number of bits of an 8, 12 or 16-bit grayscale image and puts them into a mask, then colors the image depending on the mask. This can show image variances depending on user-defined conditions. This command is available in the Medical toolkits.

Syntax

C#

Objective-C

C++/CLI

Python

@interface LTSelectDataCommand : LTRasterCommand 
class SelectDataCommand(RasterCommand): 

Example

Run the SelectDataCommand on an image.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Core; public void SelectDataCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Beauty16.jpg")); // Prepare the command SelectDataCommand command = new SelectDataCommand(); command.Color = new RasterColor(233, 10, 77); command.Combine = true; command.SourceLowBit = 2; command.SourceHighBit = 6; command.Threshold = 25; command.Run(image); codecs.Save(command.DestinationImage, Path.Combine(LEAD_VARS.ImagesDir, "SelectDataResult.Bmp"), RasterImageFormat.Bmp, 24); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools.ImageProcessing.Core Assembly