oln::morpher Namespace Reference

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


Classes

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  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  color_mute< ntg::color< nbcomps_, nbits_, color_system >, N >
 Specialized version for ntg::color. More...

struct  subq_morpher
 Sub quantify an image. More...


Functions

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.
  • ima The image.
  • p The reference's point.
  • s The size of the window.


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.
  • ima The image.
  • slice The slice.


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> 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.

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

template<class I>
const color_morpher<I> 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.

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

template<class IterType, class I>
const iter_morpher<I, IterType> 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.

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

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.

  • ima The image.
  • p The reference's point.
  • s The size of the window.

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 347 of file piece_morpher.hh.

00348     {
00349       return piece_morpher<I>(ima, p, s);
00350     }

template<class I>
const color_morpher<I> 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.

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

template<class I>
const slicing_morpher<I> slicing_morph I &  ima,
coord  slice
 

Instantiate a temporary read-only slicing morpher.

  • ima The image.
  • slice The slice.

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 405 of file slicing_morpher.hh.

References oln::coord.

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

template<unsigned S, class I>
const subq_morpher<I, S> 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.

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


Generated on Thu Apr 15 20:16:31 2004 for Olena by doxygen 1.3.6-20040222