Updates the lookup table, based on a curve that passes through the specified points.
public static int GetUserLookupTable(int[] lookupTable,LeadPoint[] userPoints)
Public Shared Function GetUserLookupTable( _ByVal lookupTable() As Integer, _ByVal userPoints() As Leadtools.LeadPoint _) As Integer
public static int GetUserLookupTable(int[] lookupTable,Leadtools.LeadPoint[] userPoints)
+ (NSUInteger)getUserLookupTable:(unsigned int *)lookupTablelookupTableLength:(NSUInteger)lookupTableLengthuserPoints:(const LeadPoint *)userPointsuserPointsCount:(NSUInteger)userPointsCounterror:(NSError **)error
public static int getUserLookupTable(int[] lookupTable,LeadPoint[] userPoints)
function Leadtools.ImageProcessing.Effects.EffectsUtilities.GetUserLookupTable(lookupTable ,userPoints)
public:static int GetUserLookupTable(array<int>^ lookupTable,Leadtools.array<LeadPoint>^ userPoints)
lookupTable
Lookup table array to be filled by this method.
userPoints
Array of LeadPoint structures that contain the points on the curve used to update the lookup table.
return the number of entries in the lookup table array that were actually updated by this method.
| Value | Meaning |
| 65536 | 16-bit / sample image |
| 4096 | 12-bit / sample image |
| 256 | 256 8-bit / sample image |
This example will brighten the loaded bitmap using the lookup table updated by the GetUserLookupTable method.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Effects;using Leadtools.ImageProcessing.Color;public void GetUserLookupTableExample(){// Load an imageRasterCodecs codecs = new RasterCodecs();codecs.ThrowExceptionsOnInvalidImages = true;RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"));// Prepare the commandint[] LookupTable = new int[256];LeadPoint[] UserPoint = new LeadPoint[3];UserPoint[0] = new LeadPoint(0, 0);UserPoint[1] = new LeadPoint(128, 150);UserPoint[2] = new LeadPoint(255, 255);//Get Lookup table where the array effected by user data method.EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint);RemapIntensityCommand command = new RemapIntensityCommand();command.Flags = RemapIntensityCommandFlags.Master;command.LookupTable = LookupTable;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:\Users\Public\Documents\LEADTOOLS Images";}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.ColorImports Leadtools.ImageProcessing.EffectsLeadtools.Examples.Support.SetLicense()Public Sub GetUserLookupTableExample()Dim codecs As New RasterCodecs()codecs.ThrowExceptionsOnInvalidImages = TrueDim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"))' Prepare the commandDim LookupTable() As IntegerReDim LookupTable(255)Dim UserPoint() As LeadPointReDim UserPoint(2)UserPoint(0) = New LeadPoint(0, 0)UserPoint(1) = New LeadPoint(128, 150)UserPoint(2) = New LeadPoint(255, 255)'Get Lookup table where the array effected by user data method.EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint)Dim command As RemapIntensityCommand = New RemapIntensityCommandcommand.Flags = RemapIntensityCommandFlags.Mastercommand.LookupTable = LookupTablecommand.Run(leadImage)codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24)End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Effects;using Leadtools.ImageProcessing.Color;using Leadtools.Examples;public void GetUserLookupTableExample(RasterImage image, Stream outStream){// Prepare the commandint[] LookupTable = new int[256];LeadPoint[] UserPoint = new LeadPoint[3];UserPoint[0] = new LeadPoint(0, 0);UserPoint[1] = new LeadPoint(128, 150);UserPoint[2] = new LeadPoint(255, 255);//Get Lookup table where the array effected by user data method.EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint);RemapIntensityCommand command = new RemapIntensityCommand();command.Flags = RemapIntensityCommandFlags.Master;command.LookupTable = LookupTable;command.Run(image);// Save result imageRasterCodecs codecs = new RasterCodecs();codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24);image.Dispose();}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.EffectsImports Leadtools.ImageProcessing.ColorPublic Sub GetUserLookupTableExample(ByVal image As RasterImage, ByVal outStream As Stream)' Prepare the commandDim LookupTable As Integer() = New Integer(255) {}Dim UserPoint As LeadPoint() = New LeadPoint(2) {}UserPoint(0) = New LeadPoint(0, 0)UserPoint(1) = New LeadPoint(128, 150)UserPoint(2) = New LeadPoint(255, 255)'Get Lookup table where the array effected by user data method.EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint)Dim command As RemapIntensityCommand = New RemapIntensityCommand()command.Flags = RemapIntensityCommandFlags.Mastercommand.LookupTable = LookupTablecommand.Run(image)' Save result imageDim codecs As RasterCodecs = New RasterCodecs()codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24)image.Dispose()End Sub
Leadtools.ImageProcessing.Color.RemapIntensityCommand
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
