oln::morpher Namespace Reference

Contain all the morpher relative declarations and functions. More...


Classes

class  super_border_morpher
 Abstract border morpher class used for code factorization. More...
struct  border_morpher
 The default border morpher class. More...
struct  border_morpher< const SrcType, BehaviorType, Exact >
 The specialized version for `const' images. More...
class  super_color_morpher
 Abstract color_morpher class used for code factorization. More...
struct  color_morpher
struct  color_morpher< const SrcType, Exact >
 The specialized version for `const' declared images. More...
struct  func_morpher
struct  iter_morpher
struct  iter_morpher< const SrcType, IterType, Exact >
 The specialized version for `const' declared images. More...
class  super_piece_morpher
 Abstract piece morpher class used for code factorization. More...
struct  piece_morpher
 The default piece morpher class. More...
struct  piece_morpher< const SrcType, Exact >
 The specialized version for `const' images. More...
class  super_slicing_morpher
 Abstract slicing morpher class used for code factorization. More...
struct  slicing_morpher
 The default slicing morpher class. More...
struct  slicing_morpher< const SrcType, Exact >
 The specialized version for `const' images. More...
struct  color_mute
struct  subq_morpher
 Sub quantify an image. More...
struct  color_mute< ntg::color< nbcomps_, nbits_, color_system >, N >
 Specialized version for ntg::color. More...

Namespaces

namespace  abstract
 Implementation of oln::abstract::generic_morpher.

Functions

template<class I, class BehaviorType>
const border_morpher< I, BehaviorType > border_morph (I &ima, const coord width, const BehaviorType &be)
 Instantiate a temporary read-only border morpher.
template<class I>
const color_morpher< I > rmorph (I &ima)
 Instantiate a temporary read-only color_morpher.
template<class I>
const color_morpher< I > gmorph (I &ima)
 Instantiate a temporary read-only color_morpher.
template<class I>
const color_morpher< I > bmorph (I &ima)
 Instantiate a temporary read-only color_morpher.
template<class IterType, class I>
const iter_morpher< I, IterType > iter_morph (I &ima)
 Instantiate a temporary read-only iter morpher.
template<class I, class PointType, class SizeType>
const piece_morpher< I > piece_morph (I &ima, const PointType p, const SizeType s)
 Instantiate a temporary read-only piece morpher.
oln::image1d_size image_size_dec (const oln::image2d_size &image_size)
 Return a size of N-1 dimension.
oln::image2d_size image_size_dec (const oln::image3d_size &image_size)
 Return a size of N-1 dimension.
template<class I>
const slicing_morpher< I > slicing_morph (I &ima, coord slice)
 Instantiate a temporary read-only slicing morpher.
template<unsigned S, class I>
const subq_morpher< I, S > sqmorph (I &ima)
 Instantiate a temporary read-only subq_morpher.


Detailed Description

Contain all the morpher relative declarations and functions.

Function Documentation

template<class I>
const color_morpher<I> oln::morpher::bmorph ( I &  ima  ) 

Instantiate a temporary read-only color_morpher.

The image will be viewed according to its blue layer.

 #include <oln/morpher/color_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   oln::save(oln::morpher::bmorph(imc),
            IMG_OUT "oln_morpher_blue_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_blue_morpher.png

Definition at line 397 of file color_morpher.hh.

References bmorph().

Referenced by bmorph().

00398     {
00399       return color_morpher<I>(ima, ntg::rgb_B);
00400     }

template<class I, class BehaviorType>
const border_morpher<I, BehaviorType> oln::morpher::border_morph ( I &  ima,
const coord  width,
const BehaviorType &  be 
)

Instantiate a temporary read-only border morpher.

A border of the image will be viewed.

 #include <oln/morpher/border_morpher.hh>
 #include <oln/basics2d.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   assert(imc.has_impl());
   oln::save(oln::morpher::border_morph(imc, 100, oln::mirror_bhv()),
             IMG_OUT "oln_morpher_border_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_border_morpher.png

Definition at line 373 of file border_morpher.hh.

References border_morph().

Referenced by border_morph().

00376     {
00377       return border_morpher<I, BehaviorType>(ima, width, be);
00378     }

template<class I>
const color_morpher<I> oln::morpher::gmorph ( I &  ima  ) 

Instantiate a temporary read-only color_morpher.

The image will be viewed according to its green layer.

 #include <oln/morpher/color_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   oln::save(oln::morpher::gmorph(imc),
            IMG_OUT "oln_morpher_green_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_green_morpher.png

Definition at line 369 of file color_morpher.hh.

References gmorph().

Referenced by gmorph().

00370     {
00371       return color_morpher<I>(ima, ntg::rgb_G);
00372     }

template<class IterType, class I>
const iter_morpher<I, IterType> oln::morpher::iter_morph ( I &  ima  ) 

Instantiate a temporary read-only iter morpher.

The image will be viewed according to its iterator type. So the resulting image will be reversed.

 #include <oln/morpher/iter_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 template <class E, class F>
 void foo(const oln::abstract::image<E>& src,
          oln::abstract::image<F>& dst)
 {
   oln_iter_type(oln::abstract::image<E>) it_src(src);
   oln_iter_type(oln::abstract::image<F>) it_dst(dst);

   it_dst = mlc::begin;
   for_all(it_src)
     {
       dst[it_dst] = src[it_src];
       ++it_dst;
     }
 }
 int main()
 {
   const oln::image2d<ntg::rgb_8> im = oln::load(IMG_IN "lena.ppm");
   oln::image2d<ntg::rgb_8> im_out(im.size());

   foo(oln::morpher::iter_morph<
     oln_bkd_iter_type_(oln::image2d<ntg::rgb_8>)>(im), im_out);
   oln::save(im_out, IMG_OUT "oln_morpher_iter.pgm");
 }
lena_ppm.png
=>
oln_morpher_iter.png

Definition at line 273 of file iter_morpher.hh.

References iter_morph().

Referenced by iter_morph().

00274     {
00275       return iter_morpher<I, IterType>(ima);
00276     }

template<class I, class PointType, class SizeType>
const piece_morpher<I> oln::morpher::piece_morph ( I &  ima,
const PointType  p,
const SizeType  s 
)

Instantiate a temporary read-only piece morpher.

A piece of the image will be viewed.

 #include <oln/morpher/piece_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   oln::save(oln::morpher::piece_morph(imc,
                                       oln::dpoint2d(246, 244),
                                       oln::image2d_size(30, 60,
                                        imc.border())),
            IMG_OUT "oln_morpher_piece_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_piece_morpher.png

Definition at line 349 of file piece_morpher.hh.

References piece_morph().

Referenced by piece_morph().

00350     {
00351       return piece_morpher<I>(ima, p, s);
00352     }

template<class I>
const color_morpher<I> oln::morpher::rmorph ( I &  ima  ) 

Instantiate a temporary read-only color_morpher.

The image will be viewed according to its red layer.

 #include <oln/morpher/color_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   oln::save(oln::morpher::rmorph(imc),
            IMG_OUT "oln_morpher_red_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_red_morpher.png

Definition at line 341 of file color_morpher.hh.

References rmorph().

Referenced by rmorph().

00342     {
00343       return color_morpher<I>(ima, ntg::rgb_R);
00344     }

template<class I>
const slicing_morpher<I> oln::morpher::slicing_morph ( I &  ima,
coord  slice 
)

Instantiate a temporary read-only slicing morpher.

A slice of the image will be viewed.

 #include <oln/morpher/slicing_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN "lena.ppm");
   oln::save(oln::morpher::slicing_morph(imc, 5),
            IMG_OUT "oln_morpher_slicing_morpher.pgm");
 }
lena_ppm.png
=>
oln_morpher_slicing_morpher.png

Definition at line 406 of file slicing_morpher.hh.

00407     {
00408       return slicing_morpher<I>(ima, slice);
00409     }

template<unsigned S, class I>
const subq_morpher<I, S> oln::morpher::sqmorph ( I &  ima  ) 

Instantiate a temporary read-only subq_morpher.

Parameters:
S Indicate the color depth of the resulting image. It can't be higher than the color depth of ima.
 #include <oln/morpher/subq_morpher.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
   oln::save(oln::morpher::sqmorph<3>(imc),
            IMG_OUT "oln_morpher_subq_morpher.ppm");
 }
lena_ppm.png
=>
oln_morpher_subq_morpher.png

Definition at line 222 of file subq_morpher.hh.

References sqmorph().

Referenced by sqmorph().

00223     {
00224       return subq_morpher<I, S>(ima);
00225     }


Generated on Tue Feb 20 20:28:00 2007 for Olena by  doxygen 1.5.1