FreeMat
vtkImageQuantizeRGBToIndex

Section: Visualization Toolkit Imaging Classes

Usage

vtkImageQuantizeRGBToIndex takes a 3 component RGB image as input and produces a one component index image as output, along with a lookup table that contains the color definitions for the index values. This filter works on the entire input extent - it does not perform streaming, and it does not supported threaded execution (because it has to process the entire image).

To use this filter, you typically set the number of colors (between 2 and 65536), execute it, and then retrieve the lookup table. The colors can then be using the lookup table and the image index.

To create an instance of class vtkImageQuantizeRGBToIndex, simply invoke its constructor as follows

  obj = vtkImageQuantizeRGBToIndex

Methods

The class vtkImageQuantizeRGBToIndex has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkImageQuantizeRGBToIndex class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkImageQuantizeRGBToIndex = obj.NewInstance ()
  • vtkImageQuantizeRGBToIndex = obj.SafeDownCast (vtkObject o)
  • obj.SetNumberOfColors (int ) - Set / Get the number of color index values to produce - must be a number between 2 and 65536.
  • int = obj.GetNumberOfColorsMinValue () - Set / Get the number of color index values to produce - must be a number between 2 and 65536.
  • int = obj.GetNumberOfColorsMaxValue () - Set / Get the number of color index values to produce - must be a number between 2 and 65536.
  • int = obj.GetNumberOfColors () - Set / Get the number of color index values to produce - must be a number between 2 and 65536.
  • vtkLookupTable = obj.GetLookupTable () - Get the resulting lookup table that contains the color definitions corresponding to the index values in the output image.
  • double = obj.GetInitializeExecuteTime ()
  • double = obj.GetBuildTreeExecuteTime ()
  • double = obj.GetLookupIndexExecuteTime ()