CSparseHistogram Class Reference

A sparse histogram. More...

`#include <mia/core/sparse_histogram.hh>`

Inheritance diagram for CSparseHistogram:
[legend]
Collaboration diagram for CSparseHistogram:
[legend]

## Public Types

typedef std::vector< std::pair< int, unsigned long > > | Compressed
Public Types inherited from TFilter< size_t >
typedef size_t | result_type
| defines the return type of the filter function

## Public Member Functions

| CSparseHistogram ()
Compressed | get_compressed_histogram () const
template<typename Image>
size_t | operator() (const Image &image)
template<typename InIterator>
size_t | operator() (InIterator begin, InIterator end)

## Detailed Description

A sparse histogram.

This class implements a sparse histogram. As input only 8 and 16 bit (un)signed data is allowed.

Definition at line 38 of file sparse_histogram.hh.

## Member Typedef Documentation

## Compressed

typedef std::vector<std::pair<int, unsigned long> > CSparseHistogram::Compressed

Definition at line 42 of file sparse_histogram.hh.

## Constructor & Destructor Documentation

## CSparseHistogram()

CSparseHistogram::CSparseHistogram | ( |  | ) |

## Member Function Documentation

## get_compressed_histogram()

Compressed CSparseHistogram::get_compressed_histogram | ( |  | ) | const

Returns
  the histogram as a vector of <value, count> pairs

## operator()() [1/2]

template<typename Image>

size_t CSparseHistogram::operator() | ( | const Image & | image | ) |

inline

Definition at line 57 of file sparse_histogram.hh.

## operator()() [2/2]

template<typename InIterator>

size_t CSparseHistogram::operator() | ( | InIterator | begin,
|  | InIterator | end )

Fees pixels to the histogram

Template Parameters

  InIterator | input iterator, must be a forward iterator

Parameters

  begin | start of range
  end | end of range

Returns
  number of added pixels

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

- sparse_histogram.hh