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

Public Member Functions

int get_count (int n) const
 Returns the number of occurrences in the image of the nth unique pixel color in the histogram. More...
 
int get_count (const PixelSpec &pixel) const
 Returns the number of occurrences in the image of the indicated pixel color. More...
 
int get_num_pixels () const
 
const PixelSpecget_pixel (int n) const
 
void swap (PixelCount &pixels, HistMap &hist_map)
 Swaps the data in the Histogram with the indicated data. More...
 
void write (std::ostream &out) const
 

Public Attributes

 get_num_pixels
 Returns the number of unique pixel colors in the histogram. More...
 
 get_pixel
 Returns the nth unique pixel color in the histogram. More...
 

Detailed Description

Definition at line 167 of file pnmImageHeader.h.

Member Function Documentation

◆ get_count() [1/2]

int PNMImageHeader::Histogram::get_count ( int  n) const
inline

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

Definition at line 477 of file pnmImageHeader.I.

◆ get_count() [2/2]

int PNMImageHeader::Histogram::get_count ( const PixelSpec pixel) const
inline

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

Definition at line 487 of file pnmImageHeader.I.

◆ swap()

void PNMImageHeader::Histogram::swap ( PixelCount pixels,
HistMap hist_map 
)
inline

Swaps the data in the Histogram with the indicated data.

This is normally used to load the Histogram data initially in PNMImage::make_histogram().

Definition at line 501 of file pnmImageHeader.I.

Referenced by PNMImage::make_histogram().

Member Data Documentation

◆ get_num_pixels

int PNMImageHeader::Histogram::get_num_pixels
inline

Returns the number of unique pixel colors in the histogram.

Definition at line 175 of file pnmImageHeader.h.

◆ get_pixel

const PNMImageHeader::PixelSpec & PNMImageHeader::Histogram::get_pixel
inline

Returns the nth unique pixel color in the histogram.

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

Definition at line 175 of file pnmImageHeader.h.


The documentation for this class was generated from the following files: