[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

FindROISize< VALUETYPE > Class Template Reference

Calculate the size of an ROI in an image. More...

`#include <vigra/inspectimage.hxx>`

## Public Types

typedef VALUETYPE | argument_type
typedef unsigned int | result_type
typedef VALUETYPE | value_type

## Public Member Functions

| FindROISize ()
result_type | operator() () const
void | operator() (argument_type const &)
void | operator() (FindROISize const &o)
void | reset ()
result_type | size () const

## Public Attributes

result_type | count

## Detailed Description

template<class VALUETYPE>
class vigra::FindROISize< VALUETYPE >

Calculate the size of an ROI in an image.

This Functor is often used in conjunction with ArrayOfRegionStatistics to find the sizes of all regions in a labeled image.

Traits defined:

`FunctorTraits::isUnaryAnalyser` and `FunctorTraits::isInitializer` are true (`VigraTrueType`)

Usage:

#include <vigra/inspectimage.hxx>
Namespace: vigra

vigra::BImage img, mask;
vigra::FindROISize<vigra::BImage::PixelType> roisize; // init functor
vigra::inspectImageIf(srcImageRange(img), srcImage(mask), roisize);
cout << "Size of ROI: " << roisize.count;
vigra::RGBValue
Class for a single RGB value.
Definition rgbvalue.hxx:128
vigra::inspectImageIf
void inspectImageIf(...)
Apply read-only functor to every pixel in the ROI.

## Member Typedef Documentation

## ◆ argument_type

template<class VALUETYPE >

typedef VALUETYPE argument_type

the functor's argument type

## ◆ result_type

template<class VALUETYPE >

typedef unsigned int result_type

the functor's result type

## ◆ value_type

template<class VALUETYPE >

typedef VALUETYPE value_type

Deprecated:
  use argument_type and result_type

## Constructor & Destructor Documentation

## ◆ FindROISize()

template<class VALUETYPE >

FindROISize | ( |  | ) |

init counter to 0

## Member Function Documentation

## ◆ reset()

template<class VALUETYPE >

void reset | ( |  | ) |

(re-)init ROI size with 0

## ◆ operator()() [1/3]

template<class VALUETYPE >

void operator() | ( | argument_type const & |  | ) |

update counter

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

template<class VALUETYPE >

result_type operator() | ( |  | ) | const

return current size

## ◆ size()

template<class VALUETYPE >

result_type size | ( |  | ) | const

return current size

## ◆ operator()() [3/3]

template<class VALUETYPE >

void operator() | ( | FindROISize< VALUETYPE > const & | o | ) |

merge two statistics

## Member Data Documentation

## ◆ count

template<class VALUETYPE >

result_type count

the current counter

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

- vigra/inspectimage.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.12.2