Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages   Examples  

Histogram Class Template Reference

#include <Histogram.h>

List of all members.

Public Methods

 Histogram (Image< T > &input, int no_bins=100)
 Histogram (Image< T > &input, int no_bins, T min, T max)
 ~Histogram ()
double* getHistogram ()
void equalize (Image< T > &output)
void setDimensions (int w=600, int h=600)
void setBgColor (const char *color)
void setTitle (const char *title)
void setTitleFontName (const char *title_font)
void setTitleFontSize (double title_size)
void setXLabel (const char *lb)
void setYLabel (const char *lb)
void setXYFontName (const char *lb)
void setXYFontSize (double lb_size)
void setXRange (T x_min, T x_max)
void resetXRange ()
void setYRange (T y_min, T y_max)
void resetYRange ()
void setXTicks (double xt)
void setYTicks (double yt)
void setLogMode (bool lg=true)
void transposeAxes (bool tr=true)
void setFillIntensity (double fill)
void showHistogram ()
void writeHistogram (char *type, char *file_name)
void closeWindow ()


Detailed Description

template<class T> class Histogram

Implements data structures and functions for computing, manipulating and outputting the histogram of an image.
Examples:

test_hist.cpp.

Definition at line 20 of file Histogram.h.


Constructor & Destructor Documentation

template<class T>
Histogram< T >::~Histogram<T> ( )
 

Destructor

Definition at line 80 of file Histogram.cpp.


Member Function Documentation

template<class T>
double * Histogram<T>::getHistogram<T> ( ) [inline]
 

Returns a pointer to the buffer storing the histogram.

Definition at line 92 of file Histogram.h.

template<class T>
void Histogram<T>::resetXRange ( ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It is complementary to the function setXRange(), determining that all bins be drawn. By default, all of the bins are plotted when a displaying method is called unless a call to setXRange() was made previously.

Definition at line 193 of file Histogram.h.

template<class T>
void Histogram<T>::resetYRange ( ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It is complementary to the function setYRange(), determining that the entire bars representing the bins be drawn. By default, the bars representing the bins are entirely drawn when a displaying method is called unless a call to setYRange() was made previously.

Definition at line 214 of file Histogram.h.

template<class T>
void Histogram<T>::setBgColor ( const char * color ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the background color of the window in which the histogram is drawn. The supported colors and the way of specifying them are given in the section "Specifying Colors by Name" of the documentation of the GNU Plotutils package (see http://www.gnu.org/manual/plotutils/).

Definition at line 117 of file Histogram.h.

template<class T>
void Histogram<T>::setDimensions ( int w = 600,
int h = 600 ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the size of the window in which the histogram is drawn.

Definition at line 106 of file Histogram.h.

template<class T>
void Histogram<T>::setFillIntensity ( double fill ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the gray intensity inside the bars representing the bins of the plotted histogram. By default, the bars are filled with black (intensity 1).

Definition at line 254 of file Histogram.h.

template<class T>
Histogram<T>::setLogMode ( bool lg = true ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It set the axes to be log axes rather than linear axes, or vice versa. By default, the axes are linear axes.

Definition at line 238 of file Histogram.h.

template<class T>
void Histogram<T>::setTitle ( const char * title ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the title of the histogram.

Definition at line 125 of file Histogram.h.

template<class T>
void Histogram<T>::setTitleFontName ( const char * title ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the font used for the title of the histogram. The supported fonts and the way of specifying them are given in the section "Available text fonts" of the documentation of the GNU Plotutils package (see http://www.gnu.org/manual/plotutils/).

Definition at line 133 of file Histogram.h.

template<class T>
void Histogram<T>::setTitleFontSize ( double title_size ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the size of the font used for the title of the histogram. The size is specified as a fraction of the minimum dimension (width or height) of the plotting window.

Definition at line 141 of file Histogram.h.

template<class T>
void Histogram<T>::setXLabel ( const char * lb ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the label of the x-axis.

Definition at line 149 of file Histogram.h.

template<class T>
void Histogram<T>::setXRange ( T x_min,
T x_max ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It determines which part of the histogram is drawn in the horizontal direction. In other words, it selects only a set from the computed bins to be drawn. By default, all of the bins are plotted when a displaying method is called unless a call to setXRange() was made previously.

Definition at line 181 of file Histogram.h.

template<class T>
void Histogram<T>::setXTicks ( double xt ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the distance between ticks on the x-axis.

Definition at line 222 of file Histogram.h.

template<class T>
void Histogram<T>::setXYFontName ( const char * lb ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the font used for the axis labels. The supported fonts and the way of specifying them are given in the section "Available text fonts" of the documentation of the GNU Plotutils package (see http://www.gnu.org/manual/plotutils/).

Definition at line 165 of file Histogram.h.

template<class T>
void Histogram<T>::setXYFontSize ( double lb ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the size of the font used for the axis labels. The size is specified as a fraction of the minimum dimension (width or height) of the plotting window.

Definition at line 173 of file Histogram.h.

template<class T>
void Histogram<T>::setYLabel ( const char * lb ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the label of the y-axis.

Definition at line 157 of file Histogram.h.

template<class T>
void Histogram<T>::setYRange ( T y_min,
T y_max ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It determines which part of the histogram is drawn in the vertical direction. In other words, it selects only a part from the bars representing the bins to be drawn. By default, the bars representing the bins are entirely drawn when a displaying method is called unless a call to setYRange() was made previously.

Definition at line 201 of file Histogram.h.

template<class T>
void Histogram<T>::setYTicks ( double yt ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It sets the distance between ticks on the y-axis.

Definition at line 230 of file Histogram.h.

template<class T>
void Histogram<T>::transposeAxes ( bool tr = true ) [inline]
 

Function related to the drawing methods (i.e. showHistogram() and writeHistogram()). It is available only if Plotutils package with libplotter class library is installed (see instalation notes).

It determines if the abscissa and the ordinate are transposed. The drawing methods display on the abscissa the gray level values while on the ordinate, they display the number of pixels corresponding to each bin. By default, the axes are not transposed.

Definition at line 246 of file Histogram.h.


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