Gets the total number of entries between the start color and the end
color, and the index of the last occurrence of the start color. The
start and end colors are determined internally.
Syntax
Parameters
- lookupTable
- 16-bit-bit lookup table array to be filled by this method.
- type
- Flag that indicates whether the LookupTable contains signed or
unsigned data.
Example
Run the CountLookupTableColorsExt method to get the number of entries and start index from the image.
Visual Basic | Copy Code |
---|
Public Sub CountLookupTableColorsExtExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Image2.dcm")
Dim command As CountLookupTableColorsResult = CoreUtilities.CountLookupTableColorsExt(leadImage.GetLookupTable16, CountLookupTableColorsType.Signed)
MessageBox.Show("First Index = " + command.FirstIndex.ToString + Chr(13) + "Number Of Entries = " + command.NumberOfEntries.ToString)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
public void CountLookupTableColorsExtExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Image2.dcm"); // Prepare the command CountLookupTableColorsResult command = CoreUtilities.CountLookupTableColorsExt(image.GetLookupTable16(), CountLookupTableColorsType.Signed); MessageBox.Show("First Index = " + command.FirstIndex + "\n" + "Number Of Entries = " + command.NumberOfEntries); RasterCodecs.Shutdown(); } |
Remarks
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