#include <bsta_int_histogram_2d.h>
Public Member Functions | |
bsta_int_histogram_2d (const unsigned int nbins_x, const unsigned int nbins_y) | |
default constructor that assumes all data values are positive constructor parameters:. | |
~bsta_int_histogram_2d () | |
unsigned int | nbins_x () const |
unsigned int | nbins_y () const |
long int | get_count (const unsigned int binx, const unsigned int biny) |
get the count in a given bin. | |
void | set_count (const unsigned int binx, const unsigned int biny, const long int count) |
set the count in a given bin. | |
unsigned long int | get_area () |
Total area under the histogram = total counts in histogram. | |
unsigned long int | get_max_val (unsigned int &imax_x, unsigned int &imax_y) |
void | parzen (const float sigma) |
Smooth the 2D histogram with a Parzen window of sigma. | |
void | profile_histogram (bsta_int_histogram_1d &phist, bsta_int_histogram_1d &phist_x, bsta_int_histogram_1d &phist_y) |
Form a "profile" histogram along the diagonal with max value normal to diagonal in buckets. | |
bool | find_edge (unsigned int peak_y, unsigned int peak_x, float newslope, float edgepct, unsigned int &edge_x, unsigned int &edge_y, bool front) |
Find where peak drops to X% along normal on either front or rear edge of diagonal slope. | |
Private Attributes | |
unsigned int | nbins_x_ |
unsigned int | nbins_y_ |
unsigned int | diag_ |
vcl_vector< vcl_vector< long int > > | counts_ |
Definition at line 36 of file bsta_int_histogram_2d.h.
bsta_int_histogram_2d::bsta_int_histogram_2d | ( | const unsigned int | nbins_x, |
const unsigned int | nbins_y | ||
) |
default constructor that assumes all data values are positive constructor parameters:.
nbins_x,\param | nbins_y # bins to create in this 2D histogram. |
Definition at line 12 of file bsta_int_histogram_2d.cxx.
bsta_int_histogram_2d::~bsta_int_histogram_2d | ( | ) |
Definition at line 29 of file bsta_int_histogram_2d.cxx.
bool bsta_int_histogram_2d::find_edge | ( | unsigned int | peak_y, |
unsigned int | peak_x, | ||
float | newslope, | ||
float | edgepct, | ||
unsigned int & | edge_x, | ||
unsigned int & | edge_y, | ||
bool | front | ||
) |
Find where peak drops to X% along normal on either front or rear edge of diagonal slope.
Here the "front" is the top edge, "rear" is the bottom edge
Definition at line 175 of file bsta_int_histogram_2d.cxx.
unsigned long int bsta_int_histogram_2d::get_area | ( | ) |
Total area under the histogram = total counts in histogram.
Definition at line 33 of file bsta_int_histogram_2d.cxx.
long int bsta_int_histogram_2d::get_count | ( | const unsigned int | binx, |
const unsigned int | biny | ||
) | [inline] |
get the count in a given bin.
Definition at line 58 of file bsta_int_histogram_2d.h.
unsigned long int bsta_int_histogram_2d::get_max_val | ( | unsigned int & | imax_x, |
unsigned int & | imax_y | ||
) |
Definition at line 47 of file bsta_int_histogram_2d.cxx.
unsigned int bsta_int_histogram_2d::nbins_x | ( | ) | const [inline] |
Definition at line 54 of file bsta_int_histogram_2d.h.
unsigned int bsta_int_histogram_2d::nbins_y | ( | ) | const [inline] |
Definition at line 55 of file bsta_int_histogram_2d.h.
void bsta_int_histogram_2d::parzen | ( | const float | sigma | ) |
Smooth the 2D histogram with a Parzen window of sigma.
Definition at line 67 of file bsta_int_histogram_2d.cxx.
void bsta_int_histogram_2d::profile_histogram | ( | bsta_int_histogram_1d & | phist, |
bsta_int_histogram_1d & | phist_x, | ||
bsta_int_histogram_1d & | phist_y | ||
) |
Form a "profile" histogram along the diagonal with max value normal to diagonal in buckets.
Form a profile histogram with max value normal to diagonal buckets.
Definition at line 99 of file bsta_int_histogram_2d.cxx.
void bsta_int_histogram_2d::set_count | ( | const unsigned int | binx, |
const unsigned int | biny, | ||
const long int | count | ||
) | [inline] |
set the count in a given bin.
Definition at line 62 of file bsta_int_histogram_2d.h.
vcl_vector<vcl_vector<long int> > bsta_int_histogram_2d::counts_ [private] |
Definition at line 42 of file bsta_int_histogram_2d.h.
unsigned int bsta_int_histogram_2d::diag_ [private] |
Definition at line 41 of file bsta_int_histogram_2d.h.
unsigned int bsta_int_histogram_2d::nbins_x_ [private] |
Definition at line 39 of file bsta_int_histogram_2d.h.
unsigned int bsta_int_histogram_2d::nbins_y_ [private] |
Definition at line 40 of file bsta_int_histogram_2d.h.