oln::abstract::image< Exact > Class Template Reference

#include <image.hh>

Inheritance diagram for oln::abstract::image< Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::abstract::image< Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef image_traits< Exact
>::point_type 
point_type
typedef image_traits< Exact
>::dpoint_type 
dpoint_type
typedef image_traits< Exact
>::iter_type 
iter_type
typedef image_traits< Exact
>::fwd_iter_type 
fwd_iter_type
typedef image_traits< Exact
>::bkd_iter_type 
bkd_iter_type
typedef image_traits< Exact
>::value_type 
value_type
typedef image_traits< Exact
>::size_type 
size_type
typedef image_traits< Exact
>::impl_type 
impl_type
typedef image< Exact > self_type
typedef Exact exact_type
enum  { dim = image_traits<Exact>::dim }

Public Member Functions

const value_type operator[] (const abstract::point< point_type > &p) const
 Return a reference to the value stored at p in the current image.

value_typeoperator[] (const abstract::point< point_type > &p)
 Return the value stored stored at p in the current image.

bool has_impl () const
 Indicate if the image can be processed.

exact_type clone () const
 Clone the image, all the points are duplicated.

bool hold (const abstract::point< point_type > &p) const
 Test if the point p belong to the image.

const size_type size () const
 Return a reference to the image size.

coord border () const
 Return the value of the border width.

size_t npoints () const
 Return the total number of points in the current image.

exact_type & operator= (self_type rhs)
 Perform a shallow copy from rhs to the current image, the points are not duplicated but shared between the two images.

void border_set_width (coord new_border, bool copy_border=false) const
 Set the width of the border to perform operations on the image sides.

void border_adapt_width (coord min_border, bool copy_border=false) const
 Adapt the border if min_border is less or equal to the current border value.

void border_adapt_copy (coord min_border) const
 The border points will have the same value as the nearer real point of the image.

void border_adapt_mirror (coord min_border) const
 The border points value are set according to the value of the points on the image sides.

void border_adapt_assign (coord min_border, value_type val) const
 The border points value will be equal to the val parameters.


Static Public Member Functions

std::string name ()

Protected Member Functions

 image (self_type &rhs)

Detailed Description

template<class Exact>
class oln::abstract::image< Exact >

The image class whom derives all other image classes.

Definition at line 82 of file core/abstract/image.hh.


Member Typedef Documentation

template<class Exact>
typedef image_traits<Exact>::bkd_iter_type oln::abstract::image< Exact >::bkd_iter_type
 

Backward iterator type.

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 106 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::dpoint_type oln::abstract::image< Exact >::dpoint_type
 

Prefer the macro oln_dpoint_type(I) to retrieve the dpoint_type of an image.

See also:
dpoint

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 92 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::fwd_iter_type oln::abstract::image< Exact >::fwd_iter_type
 

Forward iterator type.

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 104 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::impl_type oln::abstract::image< Exact >::impl_type
 

Underlying implementation.

Definition at line 117 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::iter_type oln::abstract::image< Exact >::iter_type
 

Prefer the macro oln_iter_type(I) to retrieve the iter_type of an image

See also:
iter

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 98 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::point_type oln::abstract::image< Exact >::point_type
 

Prefer the macro oln_point_type(I) to retrieve the point_type of an image.

See also:
point

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 86 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::size_type oln::abstract::image< Exact >::size_type
 

Indicate how the image size is handled.

See also:
image_size

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 112 of file core/abstract/image.hh.

template<class Exact>
typedef image_traits<Exact>::value_type oln::abstract::image< Exact >::value_type
 

Prefer the macro oln_value_type(I) to retrieve the value_type of an image.

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, and oln::abstract::image_with_dim< 3, Exact >.

Definition at line 108 of file core/abstract/image.hh.


Member Function Documentation

template<class Exact>
void oln::abstract::image< Exact >::border_adapt_assign coord  min_border,
value_type  val
const [inline]
 

The border points value will be equal to the val parameters.

  • min_border The new value of the border width.
  • val The new value of the border points.
See also:
image_size::border_

Definition at line 321 of file core/abstract/image.hh.

00322       {
00323         border_adapt_width(min_border);
00324         const_cast<impl_type *>(this->exact().impl())->border_assign(val);
00325       }

template<class Exact>
void oln::abstract::image< Exact >::border_adapt_copy coord  min_border  )  const [inline]
 

The border points will have the same value as the nearer real point of the image.

  • min_border The new value of the border width.
See also:
image_size::border_

Definition at line 289 of file core/abstract/image.hh.

Referenced by oln::convol::slow::convolve(), oln::morpho::dilation(), oln::morpho::erosion(), oln::morpho::fast_morpho(), and oln::morpho::sure::geodesic_dilation().

00290       {
00291         border_adapt_width(min_border);
00292         const_cast<impl_type *>(this->exact().impl())->border_replicate();
00293       }

template<class Exact>
void oln::abstract::image< Exact >::border_adapt_mirror coord  min_border  )  const [inline]
 

The border points value are set according to the value of the points on the image sides.

  • min_border The new value of the border width.
See also:
image_size::border_

Definition at line 304 of file core/abstract/image.hh.

00305       {
00306         border_adapt_width(min_border);
00307         const_cast<impl_type *>(this->exact().impl())->border_mirror();
00308       }

template<class Exact>
void oln::abstract::image< Exact >::border_adapt_width coord  min_border,
bool  copy_border = false
const [inline]
 

Adapt the border if min_border is less or equal to the current border value.

  • min_border The new value of the border width.
  • copy_border Its default value is false.
Precondition:
min_border >= 0
See also:
image_size::border_

Definition at line 270 of file core/abstract/image.hh.

Referenced by oln::abstract::image< I >::border_adapt_assign(), oln::abstract::image< I >::border_adapt_copy(), oln::abstract::image< I >::border_adapt_mirror(), and oln::convol::nagao_generalized().

00272       {
00273         precondition(min_border >= 0);
00274         if (border() >= min_border)
00275           return;                       // Don't shrink.
00276 
00277         this->exact().border_set_width(min_border, copy_border);
00278       }

template<class Exact>
void oln::abstract::image< Exact >::border_set_width coord  new_border,
bool  copy_border = false
const [inline]
 

Set the width of the border to perform operations on the image sides.

  • new_border The new value of the border width.
  • copy_border Its default value is false.
Precondition:
new_border >= 0

has_impl() == true

See also:
image_size::border_

Definition at line 246 of file core/abstract/image.hh.

00247       {
00248         precondition(new_border >= 0);
00249         precondition(has_impl());
00250         if (border() == new_border)
00251           return; // Nothing to do.
00252 
00253         const_cast<impl_type *>(this->exact().impl())->border_reallocate_and_copy(new_border, copy_border);
00254       }

template<class Exact>
exact_type oln::abstract::image< Exact >::clone  )  const [inline]
 

Clone the image, all the points are duplicated.

Returns:
A real copy of the current image.

Definition at line 162 of file core/abstract/image.hh.

Referenced by oln::morpho::fast_maxima_killer(), oln::morpho::fast_minima_killer(), oln::morpho::hybrid::geodesic_reconstruction_dilation(), oln::morpho::sequential::geodesic_reconstruction_dilation(), oln::morpho::sure::geodesic_reconstruction_dilation(), oln::morpho::n_dilation(), and oln::morpho::n_erosion().

00163       {
00164         return this->exact().clone_();
00165       }

template<class Exact>
bool oln::abstract::image< Exact >::has_impl  )  const [inline]
 

Indicate if the image can be processed.

Returns:
True if the image can be processed, false otherwise.

Definition at line 150 of file core/abstract/image.hh.

Referenced by oln::abstract::image< I >::border_set_width(), oln::abstract::image< I >::hold(), and oln::abstract::image< I >::size().

00151       {
00152         return this->exact().impl() != 0;
00153       }

template<class Exact>
bool oln::abstract::image< Exact >::hold const abstract::point< point_type > &  p  )  const [inline]
 

Test if the point p belong to the image.

Returns:
True if p belong to the image, false otherwise.

Definition at line 173 of file core/abstract/image.hh.

Referenced by oln::level::frontp_connected_component(), oln::morpho::is_a_strict_maximum(), oln::morpho::is_a_strict_minimum(), and oln::morpho::watershed_seg_or().

00174       {
00175         assertion(has_impl());
00176         return this->exact().impl()->hold(p.exact());
00177       }

template<class Exact>
exact_type& oln::abstract::image< Exact >::operator= self_type  rhs  )  [inline]
 

Perform a shallow copy from rhs to the current image, the points are not duplicated but shared between the two images.

See also:
image::clone()

Reimplemented in oln::abstract::image_with_dim< 1, Exact >, oln::abstract::image_with_dim< 2, Exact >, oln::abstract::image_with_dim< 3, Exact >, oln::abstract::image_with_type< T, Exact >, oln::abstract::data_type_image< Exact >, oln::abstract::data_type_image_with_dim< Dim, Exact >, oln::abstract::vectorial_image< Exact >, oln::abstract::non_vectorial_image< Exact >, oln::abstract::non_vectorial_image_with_dim< Dim, Exact >, oln::abstract::binary_image< Exact >, oln::abstract::binary_image_with_dim< Dim, Exact >, oln::abstract::integer_image< Exact >, oln::abstract::integer_image_with_dim< Dim, Exact >, oln::abstract::decimal_image< Exact >, oln::abstract::decimal_image_with_dim< Dim, Exact >, oln::abstract::image_with_type< image_id< Exact >::value_type, Exact >, oln::abstract::image_with_type< image_id< I >::value_type, I >, oln::abstract::data_type_image< I >, and oln::abstract::non_vectorial_image< I >.

Definition at line 215 of file core/abstract/image.hh.

00216       {
00217         return this->exact().assign(rhs.exact());
00218       }


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:14:46 2004 for Olena by doxygen 1.3.6-20040222