$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::image2d< T > Class Template Reference

#include <mln/core/image/image2d.hh>

Public Member Functions

 image2d ()
 image2d (int nrows, int ncols, unsigned bdr=border::thickness)
 image2d (const box2d &b, unsigned bdr=border::thickness)
template<typename P >
Talt (const P &p)
const Tat_ (mln::def::coord row, mln::def::coord col) const
Tat_ (mln::def::coord row, mln::def::coord col)
const box2dbbox () const
unsigned border () const
const Tbuffer () const
Tbuffer ()
int delta_offset (const dpoint2d &dp) const
void destroy ()
const box2ddomain () const
const Telement (unsigned i) const
Telement (unsigned i)
bool has (const point2d &p) const
void init_ (const box2d &b, unsigned bdr=border::thickness)
bool is_valid () const
unsigned ncols () const
unsigned nelements () const
unsigned nrows () const
std::size_t nsites () const
const Toperator() (const point2d &p) const
Toperator() (const point2d &p)
point2d point_at_offset (unsigned i) const
void resize_ (unsigned new_border)
const t_eligible_values_setvalues_eligible () const
const t_values_spacevalues_space () const
const box2dvbbox () const

Protected Attributes

mln::util::tracked_ptr
< internal::data< image2d< T > > > 
data_

Public Types

typedef mln::box2d::bkd_piter bkd_piter
typedef Image< void > category
typedef mln::box2d domain_t
typedef image2d< Texact_t
typedef mln::box2d::fwd_piter fwd_piter
typedef Tlvalue
typedef fwd_piter piter
typedef mln::box2d::psite psite
typedef const Trvalue
typedef mln::box2d::site site
typedef image2d< tag::value_< T > > skeleton
typedef mln::value::set< Tt_eligible_values_set
typedef mln::value::set
< typename
mln::value::super_value< T >
::ret
t_values_space
typedef T value

Detailed Description

template<typename T>
class mln::image2d< T >

Basic 2D image class.

The parameter T is the type of pixel values. This image class stores data in memory and has a virtual border with constant thickness around data.

Definition at line 134 of file core/image/image2d.hh.

Constructor & Destructor Documentation

template<typename T>
mln::image2d< T >::image2d ( )

Constructor without argument.

template<typename T>
mln::image2d< T >::image2d ( int  nrows,
int  ncols,
unsigned  bdr = border::thickness 
)

Constructor with the numbers of rows and columns and the border thickness.

template<typename T>
mln::image2d< T >::image2d ( const box2d b,
unsigned  bdr = border::thickness 
)

Constructor with a box and the border thickness (default is 3).

Member Function Documentation

template<typename T>
template<typename P >
T& mln::image2d< T >::alt ( const P &  p)
inline

Definition at line 191 of file core/image/image2d.hh.

template<typename T>
const T& mln::image2d< T >::at_ ( mln::def::coord  row,
mln::def::coord  col 
) const

INTERNAL_API Read-only access to the image value located at (row, col).

template<typename T>
T& mln::image2d< T >::at_ ( mln::def::coord  row,
mln::def::coord  col 
)

Read-write access to the image value located at (row, col).

template<typename T>
const box2d& mln::image2d< T >::bbox ( ) const

Give the bounding box domain.

template<typename T>
unsigned mln::image2d< T >::border ( ) const

Give the border thickness.

template<typename T>
const T* mln::image2d< T >::buffer ( ) const

Give a hook to the value buffer.

template<typename T>
T* mln::image2d< T >::buffer ( )

Give a hook to the value buffer.

template<typename T>
int mln::image2d< T >::delta_offset ( const dpoint2d dp) const

Give the delta-offset corresponding to the delta-point dp.

void mln::internal::image_base< T, mln::box2d , image2d< T > >::destroy ( )
inherited

Detach data from an image (free it if nobody else hold it).

template<typename T>
const box2d& mln::image2d< T >::domain ( ) const

Give the definition domain.

template<typename T>
const T& mln::image2d< T >::element ( unsigned  i) const

Read-only access to the image value located at offset i.

template<typename T>
T& mln::image2d< T >::element ( unsigned  i)

Read-write access to the image value located at offset i.

template<typename T>
bool mln::image2d< T >::has ( const point2d p) const

Test if p is valid.

Reimplemented from mln::internal::image_base< T, mln::box2d, image2d< T > >.

template<typename T>
void mln::image2d< T >::init_ ( const box2d b,
unsigned  bdr = border::thickness 
)

INTERNAL_API Initialize an empty image.

bool mln::internal::image_base< T, mln::box2d , image2d< T > >::is_valid ( ) const
inherited

Test if this image has been initialized; default impl.

template<typename T>
unsigned mln::image2d< T >::ncols ( ) const

Give the number of columns.

template<typename T>
unsigned mln::image2d< T >::nelements ( ) const

Give the number of elements (points including border ones).

template<typename T>
unsigned mln::image2d< T >::nrows ( ) const

Give the number of rows.

std::size_t mln::internal::image_base< T, mln::box2d , image2d< T > >::nsites ( ) const
inherited

Give the number of sites of the image domain.

template<typename T>
const T& mln::image2d< T >::operator() ( const point2d p) const

Read-only access to the image value located at point p.

template<typename T>
T& mln::image2d< T >::operator() ( const point2d p)

Read-write access to the image value located at point p.

template<typename T>
point2d mln::image2d< T >::point_at_offset ( unsigned  i) const

Give the point corresponding to the offset i.

template<typename T>
void mln::image2d< T >::resize_ ( unsigned  new_border)

INTERNAL_API Resize image border with new_border.

const t_eligible_values_set& mln::internal::image_base< T, mln::box2d , image2d< T > >::values_eligible ( ) const
inherited
const t_values_space& mln::internal::image_base< T, mln::box2d , image2d< T > >::values_space ( ) const
inherited

Return the value space of the image.

template<typename T>
const box2d& mln::image2d< T >::vbbox ( ) const

Member Data Documentation

mln::util::tracked_ptr< internal::data<image2d< T > > > mln::internal::image_base< T, mln::box2d , image2d< T > >::data_
protectedinherited

INTERNAL_API Internal data, sharable by several images.

Definition at line 176 of file core/internal/image_base.hh.

Member Typedef Documentation

Backward Site_Iterator associated type.

Definition at line 122 of file core/internal/image_base.hh.

typedef Image<void> mln::Image< image2d< T > >::category
inherited

Definition at line 78 of file core/concept/image.hh.

Site_Set associated type.

Definition at line 109 of file core/internal/image_base.hh.

typedef image2d< T > mln::Object< image2d< T > >::exact_t
inherited

Definition at line 105 of file object.hh.

Forward Site_Iterator associated type.

Definition at line 119 of file core/internal/image_base.hh.

template<typename T>
typedef T& mln::image2d< T >::lvalue

Return type of read-write access.

Definition at line 146 of file core/image/image2d.hh.

Site_Iterator associated type; default definition is fwd_piter.

Definition at line 127 of file core/internal/image_base.hh.

Point_Site associated type.

Definition at line 112 of file core/internal/image_base.hh.

template<typename T>
typedef const T& mln::image2d< T >::rvalue

Return type of read-only access.

Definition at line 143 of file core/image/image2d.hh.

Site associated type.

Definition at line 115 of file core/internal/image_base.hh.

template<typename T>
typedef image2d< tag::value_<T> > mln::image2d< T >::skeleton

Skeleton.

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

Eligible-value-set associated type.

Definition at line 95 of file core/internal/image_base.hh.

Value space associated type.

Definition at line 102 of file core/internal/image_base.hh.

template<typename T>
typedef T mln::image2d< T >::value

Value associated type.

Definition at line 140 of file core/image/image2d.hh.