Public Types | Public Member Functions | Protected Attributes

mln::image3d< T > Struct Template Reference
[Basic types]

Basic 3D image class. More...

#include <image3d.hh>

Inheritance diagram for mln::image3d< T >:
Inheritance graph

List of all members.

Public Types

typedef box3d::bkd_piter bkd_piter
 Backward Site_Iterator associated type.
typedef Image< void > category
typedef box3d domain_t
 Site_Set associated type.
typedef dpoint3d dpoint
typedef image3d< T > exact_t
typedef box3d::fwd_piter fwd_piter
 Forward Site_Iterator associated type.
typedef T & lvalue
 Return type of read-write access.
typedef fwd_piter piter
 Site_Iterator associated type; default definition is fwd_piter.
typedef point3d point
typedef box3d pset
typedef point3d psite
 Point_Site associated type.
typedef const T & rvalue
 Return type of read-only access.
typedef box3d::site site
 Site associated type.
typedef image3d< tag::value_< T > > skeleton
 Skeleton.
typedef
internal::image_primary< T,
box3d, image3d< T > > 
super_
 Super type.
typedef mln::value::set< T > t_eligible_values_set
 Eligible-value-set associated type.
typedef mln::value::set
< typename
mln::value::super_value< T >
::ret
t_values_space
 Value space associated type.
typedef T value
 Value associated type.

Public Member Functions

const T & at_ (def::coord sli, def::coord row, def::coord col) const
 Read-only access to the image value located at (sli, row, col).
T & at_ (def::coord sli, def::coord row, def::coord col)
 Read-write access to the image value located at (sli, row, col).
const box3dbbox () const
 Give the bounding box domain.
unsigned border () const
 Give the border thickness.
const T * buffer () const
 Give a hook to the value buffer.
T * buffer ()
 Give a hook to the value buffer.
int delta_index (const dpoint3d &dp) const
 Fast Image method.
void destroy ()
 Detach data from an image (free it if nobody else hold it).
const box3ddomain () const
 Give the definition domain.
const T & element (unsigned i) const
 Read-only access to the image value located at index i.
T & element (unsigned i)
 Read-write access to the image value located at index i.
bool has (const point3d &p) const
 Test if p is valid.
const util::tracked_ptr
< internal::data< image3d< T > > > & 
hook_data_ () const
 Hook to the image data.
const void * id_ () const
 Give an identifier of this image.
 image3d ()
 Constructor without argument.
 image3d (const box3d &b, unsigned bdr=border::thickness)
 Constructor with a box and the border thickness (default is 3).
 image3d (int nslis, int nrows, int ncols, unsigned bdr=border::thickness)
 Constructor with the numbers of indexes and the border thickness.
unsigned index_of_point (const P &p) const
 Give the offset of the site p.
void init_ (const box3d &b, unsigned bdr=border::thickness)
 Initialize an empty image.
bool is_valid () const
 Test if this image has been initialized; default impl.
unsigned ncols () const
 Give the number of columns.
unsigned nelements () const
 Give the number of cells (points including border ones).
unsigned nrows () const
 Give the number of rows.
std::size_t nsites () const
 Give the number of sites of the image domain.
unsigned nslis () const
 Give the number of slices.
T & operator() (const point3d &p)
 Read-write access to the image value located at point p.
const T & operator() (const point3d &p) const
 Read-only access to the image value located at point p.
point3d point_at_index (unsigned o) const
 Give the point corresponding to the offset o.
void resize_ (unsigned new_border)
 Resize image border with new_border.
const t_eligible_values_setvalues_eligible () const
const t_values_spacevalues_space () const
 Return the value space of the image.
const box3dvbbox () const
 virtual box, i.e., box including the virtual border

Protected Attributes

util::tracked_ptr
< internal::data< image3d< T > > > 
data_

Detailed Description

template<typename T>
struct mln::image3d< T >

Basic 3D 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 130 of file core/image/image3d.hh.


Member Typedef Documentation

template<typename T>
typedef box3d ::bkd_piter mln::image3d< T >::bkd_piter

Backward Site_Iterator associated type.

Reimplemented from mln::internal::image_base< T, box3d, image3d< T > >.

Definition at line 138 of file core/image/image3d.hh.

typedef Image<void> mln::Image< image3d< T > >::category [inherited]

Reimplemented from mln::Object< image3d< T > >.

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

typedef box3d mln::internal::image_base< T, box3d , image3d< T > >::domain_t [inherited]

Site_Set associated type.

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

template<typename T>
typedef dpoint3d mln::image3d< T >::dpoint

Definition at line 136 of file core/image/image3d.hh.

typedef image3d< T > mln::Object< image3d< T > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename T>
typedef box3d ::fwd_piter mln::image3d< T >::fwd_piter

Forward Site_Iterator associated type.

Reimplemented from mln::internal::image_base< T, box3d, image3d< T > >.

Definition at line 137 of file core/image/image3d.hh.

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

Return type of read-write access.

Definition at line 153 of file core/image/image3d.hh.

typedef fwd_piter mln::internal::image_base< T, box3d , image3d< T > >::piter [inherited]

Site_Iterator associated type; default definition is fwd_piter.

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

template<typename T>
typedef point3d mln::image3d< T >::point

Definition at line 135 of file core/image/image3d.hh.

template<typename T>
typedef box3d mln::image3d< T >::pset

Definition at line 133 of file core/image/image3d.hh.

template<typename T>
typedef point3d mln::image3d< T >::psite

Point_Site associated type.

Reimplemented from mln::internal::image_base< T, box3d, image3d< T > >.

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

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

Return type of read-only access.

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

typedef box3d ::site mln::internal::image_base< T, box3d , image3d< T > >::site [inherited]

Site associated type.

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

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

Skeleton.

Definition at line 157 of file core/image/image3d.hh.

template<typename T>
typedef internal::image_primary< T, box3d, image3d<T> > mln::image3d< T >::super_

Super type.

Definition at line 144 of file core/image/image3d.hh.

Eligible-value-set associated type.

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

Value space associated type.

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

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

Value associated type.

Reimplemented from mln::internal::image_base< T, box3d, image3d< T > >.

Definition at line 147 of file core/image/image3d.hh.


Constructor & Destructor Documentation

template<typename T >
mln::image3d< T >::image3d (  )  [inline]

Constructor without argument.

Definition at line 389 of file core/image/image3d.hh.

template<typename T >
mln::image3d< T >::image3d ( const box3d b,
unsigned  bdr = border::thickness 
) [inline]

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

Definition at line 395 of file core/image/image3d.hh.

References mln::image3d< T >::init_().

template<typename T >
mln::image3d< T >::image3d ( int  nslis,
int  nrows,
int  ncols,
unsigned  bdr = border::thickness 
) [inline]

Constructor with the numbers of indexes and the border thickness.

Definition at line 402 of file core/image/image3d.hh.

References mln::make::box3d(), and mln::image3d< T >::init_().


Member Function Documentation

template<typename T >
const T & mln::image3d< T >::at_ ( def::coord  sli,
def::coord  row,
def::coord  col 
) const [inline]

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

Definition at line 509 of file core/image/image3d.hh.

References mln::image3d< T >::has().

template<typename T >
T & mln::image3d< T >::at_ ( def::coord  sli,
def::coord  row,
def::coord  col 
) [inline]

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

Definition at line 518 of file core/image/image3d.hh.

References mln::image3d< T >::has().

template<typename T >
const box3d & mln::image3d< T >::bbox (  )  const [inline]

Give the bounding box domain.

Definition at line 428 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

template<typename T >
unsigned mln::image3d< T >::border (  )  const [inline]

Give the border thickness.

Definition at line 446 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

Referenced by mln::init_().

template<typename T >
const T * mln::image3d< T >::buffer (  )  const [inline]

Give a hook to the value buffer.

Definition at line 554 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

template<typename T >
T * mln::image3d< T >::buffer (  )  [inline]

Give a hook to the value buffer.

Definition at line 563 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

template<typename T >
int mln::image3d< T >::delta_index ( const dpoint3d dp  )  const [inline]

Fast Image method.

Give the offset corresponding to the delta-point dp.

Definition at line 572 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

void mln::internal::image_base< T, box3d , image3d< T > >::destroy (  )  [inherited]

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

template<typename T >
const box3d & mln::image3d< T >::domain (  )  const [inline]

Give the definition domain.

Definition at line 419 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

Referenced by mln::accu::stat::operator==().

template<typename T >
const T & mln::image3d< T >::element ( unsigned  i  )  const [inline]

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

Definition at line 491 of file core/image/image3d.hh.

References mln::image3d< T >::nelements().

template<typename T >
T & mln::image3d< T >::element ( unsigned  i  )  [inline]

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

Definition at line 500 of file core/image/image3d.hh.

References mln::image3d< T >::nelements().

template<typename T >
bool mln::image3d< T >::has ( const point3d p  )  const [inline]
const util::tracked_ptr< internal::data<image3d< T > > >& mln::internal::image_base< T, box3d , image3d< T > >::hook_data_ (  )  const [inherited]

Hook to the image data.

const void* mln::internal::image_base< T, box3d , image3d< T > >::id_ (  )  const [inherited]

Give an identifier of this image.

When several image variables designate the same image, they share the same identifier.

unsigned mln::internal::check::image_fastest_< image3d< T > , mln::metal::equal< mln_trait_image_speed(image3d< T >), trait::image::speed::fastest >::eval >::index_of_point ( const P &  p  )  const [inherited]

Give the offset of the site p.

Parameters:
[in] p A site.
Warning:
This method is final.
Precondition:
The image has to be initialized and to own the point p.
Postcondition:
p == point_at_index(result)
template<typename T >
void mln::image3d< T >::init_ ( const box3d b,
unsigned  bdr = border::thickness 
) [inline]
bool mln::internal::image_base< T, box3d , image3d< T > >::is_valid (  )  const [inherited]
template<typename T >
unsigned mln::image3d< T >::ncols (  )  const [inline]

Give the number of columns.

Definition at line 545 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

template<typename T >
unsigned mln::image3d< T >::nelements (  )  const [inline]

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

Definition at line 455 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

Referenced by mln::image3d< T >::element(), and mln::image3d< T >::point_at_index().

template<typename T >
unsigned mln::image3d< T >::nrows (  )  const [inline]

Give the number of rows.

Definition at line 536 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

std::size_t mln::internal::image_base< T, box3d , image3d< T > >::nsites (  )  const [inherited]

Give the number of sites of the image domain.

template<typename T >
unsigned mln::image3d< T >::nslis (  )  const [inline]

Give the number of slices.

Definition at line 527 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().

template<typename T >
const T & mln::image3d< T >::operator() ( const point3d p  )  const [inline]

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

Definition at line 473 of file core/image/image3d.hh.

References mln::image3d< T >::has().

template<typename T >
T & mln::image3d< T >::operator() ( const point3d p  )  [inline]

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

Definition at line 482 of file core/image/image3d.hh.

References mln::image3d< T >::has().

template<typename T >
point3d mln::image3d< T >::point_at_index ( unsigned  o  )  const [inline]

Give the point corresponding to the offset o.

Definition at line 583 of file core/image/image3d.hh.

References mln::image3d< T >::nelements().

template<typename T >
void mln::image3d< T >::resize_ ( unsigned  new_border  )  [inline]

Resize image border with new_border.

Definition at line 598 of file core/image/image3d.hh.

const t_eligible_values_set& mln::internal::image_base< T, box3d , image3d< T > >::values_eligible (  )  const [inherited]
const t_values_space& mln::internal::image_base< T, box3d , image3d< T > >::values_space (  )  const [inherited]

Return the value space of the image.

template<typename T >
const box3d & mln::image3d< T >::vbbox (  )  const [inline]

virtual box, i.e., box including the virtual border

Definition at line 437 of file core/image/image3d.hh.

References mln::internal::image_base< T, box3d, image3d< T > >::is_valid().


Member Data Documentation

util::tracked_ptr< internal::data<image3d< T > > > mln::internal::image_base< T, box3d , image3d< T > >::data_ [protected, inherited]

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