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
Example
Visual Basic | Copy Code |
---|
ImageProcessing.Core.SelectDataCommand
Public Sub SelectDataCommandExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Beauty16.jpg")
Dim command As SelectDataCommand = New SelectDataCommand
command.Color = New RasterColor(233, 10, 77)
command.Combine = True
command.SourceLowBit = 2
command.SourceHighBit = 6
command.Threshold = 25
command.Run(leadImage)
codecs.Save(command.DestinationImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\SelectDataResult.bmp", RasterImageFormat.Bmp, 24)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
ImageProcessing.Core.SelectDataCommand public void SelectDataCommandExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\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, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\SelectDataResult.Bmp", RasterImageFormat.Bmp, 24); RasterCodecs.Shutdown(); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also