C# Класс ImageProcessor.Imaging.Quantizers.OctreeQuantizer.Octree.OctreeNode

Class which encapsulates each node in the tree
Показать файл Открыть проект

Открытые методы

Метод Описание
AddColor ( ImageProcessor.Imaging.Colors.Color32 pixel, int colorBits, int level, Octree octree ) : void

Add a color into the tree

ConstructPalette ( ArrayList palette, int &index ) : void

Traverse the tree, building up the color palette

GetPaletteIndex ( ImageProcessor.Imaging.Colors.Color32 pixel, int level ) : int

Return the palette index for the passed color

Increment ( ImageProcessor.Imaging.Colors.Color32 pixel ) : void

Increment the pixel count and add to the color information

OctreeNode ( int level, int colorBits, Octree octree ) : System

Initializes a new instance of the OctreeNode class.

Reduce ( ) : int

Reduce this node by removing all of its children

Описание методов

AddColor() публичный Метод

Add a color into the tree
public AddColor ( ImageProcessor.Imaging.Colors.Color32 pixel, int colorBits, int level, Octree octree ) : void
pixel ImageProcessor.Imaging.Colors.Color32 /// The color ///
colorBits int /// The number of significant color bits ///
level int /// The level in the tree ///
octree Octree /// The tree to which this node belongs ///
Результат void

ConstructPalette() публичный Метод

Traverse the tree, building up the color palette
public ConstructPalette ( ArrayList palette, int &index ) : void
palette System.Collections.ArrayList /// The palette ///
index int /// The current palette index ///
Результат void

GetPaletteIndex() публичный Метод

Return the palette index for the passed color
public GetPaletteIndex ( ImageProcessor.Imaging.Colors.Color32 pixel, int level ) : int
pixel ImageProcessor.Imaging.Colors.Color32 /// The representing the pixel. ///
level int /// The level. ///
Результат int

Increment() публичный Метод

Increment the pixel count and add to the color information
public Increment ( ImageProcessor.Imaging.Colors.Color32 pixel ) : void
pixel ImageProcessor.Imaging.Colors.Color32 /// The pixel to add. ///
Результат void

OctreeNode() публичный Метод

Initializes a new instance of the OctreeNode class.
public OctreeNode ( int level, int colorBits, Octree octree ) : System
level int /// The level in the tree = 0 - 7 ///
colorBits int /// The number of significant color bits in the image ///
octree Octree /// The tree to which this node belongs ///
Результат System

Reduce() публичный Метод

Reduce this node by removing all of its children
public Reduce ( ) : int
Результат int