VIGRA - TemplateVectorNormFunctor class Reference

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

| VectorNormFunctor Class Template Reference |
--- | --- | ---

A functor for computing the vector norm. More...

`#include "vigra/transformimage.hxx"`

## Public Types
typedef ValueType | argument_type
typedef NumericTraits< typename ValueType::value_type >::RealPromote | result_type
## Public Methods
result_type | operator() (const argument_type &a) const

## Detailed Description

### template<class ValueType>
class vigra::VectorNormFunctor< ValueType >

A functor for computing the vector norm.

Calculate the magnitude or norm from a given vector-valued entity. The vector type will typically be some sort of ref vigra::TinyVector. If the vector is represented by a pair of scalar-valued images, use vigra::MagnitudeFunctor instead.

At least, the vector type is required to have a function 'result`= dot(v,v)`'.

Traits defined:

`FunctorTraits::isUnaryFunctor` is true (`VigraTrueType`)``

Usage:

#include "vigra/transformimage.hxx"
Namespace: vigra

        typedef vigra::TinyVector<float, 2> Vector;
        vigra::BasicImage<Vector> grad(width, height);
        vigra::FImage magn(width,height);
        ...
        vigra::transformImage(srcImageRange(grad), destImage(magn),
                              VectorNormFunctor<float>()
                              );

See also:
  vigra::TinyVector, dot(), vigra::MagnitudeFunctor

## Member Typedef Documentation

typedef ValueType argument_type

| the functor's argument type

typedef NumericTraits<typename ValueType::value_type>::RealPromote result_type

| the functor's result type

## Member Function Documentation

result_type operator() | ( | const argument_type & | a | ) | const`[inline]`

| calculate transform '`sqrt(v1*v1 + v2*v2 + ...)`'.

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

- vigra/transformimage.hxx

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.5.0 (7 Dec 2006)