public RasterColor[] LookupTable { get; set; } @property (nonatomic, strong) NSMutableArray<LTRasterColor *> *lookupTable; public RasterColor[ getLookupTable();public void setLookupTable(RasterColor[] rasterColor[);
public:property array<RasterColor>^ LookupTable {array<RasterColor>^ get();void set ( array<RasterColor>^ );}
LookupTable # get and set (WindowLevelCommand)
Optional lookup table that can be used to implement a user defined conversion. For every intensity value between 0 and 2 raised to the power of (HighBit - LowBit + 1) - 1 there should be a corresponding entry in the lookup table that contains an RGB quad. If LookupTable is null, the conversion is a normal shift (right or left) and the output image is 8-bit grayscale. If LookupTable is not null, the output image is a 24-bit image.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;public void WindowLevelCommandExample(){// Load an imageRasterCodecs codecs = new RasterCodecs();codecs.ThrowExceptionsOnInvalidImages = true;RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "IMAGE3.dcm"));// Prepare the commandint x;byte y;int Size;RasterColor[] LookupTable;//Change the image to 16-bit grayscaleGrayscaleCommand graycommand = new GrayscaleCommand(16);MinMaxBitsCommand MinMaxBits = new MinMaxBitsCommand();MinMaxValuesCommand MinMaxValues = new MinMaxValuesCommand();WindowLevelCommand command = new WindowLevelCommand();graycommand.Run(image);MinMaxBits.Run(image);MinMaxValues.Run(image);Size = (1 << (MinMaxBits.MaximumBit - MinMaxBits.MinimumBit + 1));LookupTable = new Leadtools.RasterColor[Size];// fill the first half of the LookupTable with RED.for (x = 0; x < Size / 2; x++)LookupTable[x] = new Leadtools.RasterColor(255, 0, 0);// fill the rest with gray values.for (x = Size / 2; x < Size; x++){y = (byte)((x - MinMaxValues.MinimumValue) * 255 / (MinMaxValues.MaximumValue - MinMaxValues.MinimumValue));LookupTable[x] = new Leadtools.RasterColor(y, y, y);}command.HighBit = MinMaxBits.MaximumBit;command.LowBit = MinMaxBits.MinimumBit;command.LookupTable = LookupTable;command.Order = Leadtools.RasterByteOrder.Bgr;command.Run(image);}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
