Panda3D
Public Member Functions | List of all members
PNMImageHeader::Histogram Class Reference

Public Member Functions

 __init__ ()
 
 __init__ (const PNMImageHeader::Histogram)
 
int getCount (const PNMImageHeader::PixelSpec pixel)
 Returns the number of occurrences in the image of the indicated pixel color. More...
 
int getCount (int n)
 Returns the number of occurrences in the image of the nth unique pixel color in the histogram. More...
 
int getNumPixels ()
 Returns the number of unique pixel colors in the histogram. More...
 
const PNMImageHeader::PixelSpec getPixel (int n)
 Returns the nth unique pixel color in the histogram. More...
 
list getPixels ()
 
 write (Ostream out)
 

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( const PNMImageHeader::Histogram  )

◆ getCount() [1/2]

int getCount ( const PNMImageHeader::PixelSpec  pixel)

Returns the number of occurrences in the image of the indicated pixel color.

◆ getCount() [2/2]

int getCount ( int  n)

Returns the number of occurrences in the image of the nth unique pixel color in the histogram.

◆ getNumPixels()

int getNumPixels ( )

Returns the number of unique pixel colors in the histogram.

◆ getPixel()

const PNMImageHeader::PixelSpec getPixel ( int  n)

Returns the nth unique pixel color in the histogram.

These are ordered by default from most common to least common.

◆ getPixels()

list getPixels ( )

◆ write()

write ( Ostream  out)