oln::morpho::internal::stat_< I, E, V > Struct Template Reference

Min and Max on a structuring element. More...

#include <stat.hh>

List of all members.

Static Public Member Functions

static V max (const I &input, const typename mlc::exact< I >::ret::point_type &p, const E &se)
 Maximum of a structuring element.
static V min (const I &input, const typename mlc::exact< I >::ret::point_type &p, const E &se)
 Minimum of a structuring element.


Detailed Description

template<class I, class E, class V = typename mlc::exact< I >::ret::value_type>
struct oln::morpho::internal::stat_< I, E, V >

Min and Max on a structuring element.

We need to use this inner definition in order to specialize max and min on binary images.

Parameters:
I Image exact type.
E Structuring element type.
V Associated value type.

Definition at line 51 of file morpho/stat.hh.


Member Function Documentation

template<class I, class E, class V = typename mlc::exact< I >::ret::value_type>
static V oln::morpho::internal::stat_< I, E, V >::max ( const I &  input,
const typename mlc::exact< I >::ret::point_type &  p,
const E &  se 
) [inline, static]

Maximum of a structuring element.

Look for the maximum in the structuring element se disposed on the image input, at the point p.

Definition at line 64 of file morpho/stat.hh.

References mlc::eq< i, j >::ensure().

00065         {
00066           mlc::eq<I::dim, E::dim>::ensure();
00067 
00068          oln_iter_type(E) dp(se);
00069           dp = begin;
00070           V val = input[p + dp];
00071           for_all_remaining (dp)
00072             if (val < input[p + dp])
00073               val = input[p + dp];
00074           return val;
00075         }

template<class I, class E, class V = typename mlc::exact< I >::ret::value_type>
static V oln::morpho::internal::stat_< I, E, V >::min ( const I &  input,
const typename mlc::exact< I >::ret::point_type &  p,
const E &  se 
) [inline, static]

Minimum of a structuring element.

Look for the minimum in the structuring element se disposed on the image input, at the point p.

Definition at line 88 of file morpho/stat.hh.

References mlc::eq< i, j >::ensure().

00089         {
00090           mlc::eq<I::dim, E::dim>::ensure();
00091          oln_iter_type(E) dp(se);
00092           dp = begin;
00093           V val = input[p + dp];
00094           for_all_remaining (dp)
00095             if (val > input[p + dp])
00096               val = input[p + dp];
00097           return val;
00098         }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:29:15 2007 for Olena by  doxygen 1.5.1