Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

mln::win::cuboid3d Struct Reference
[3D windows]

Cuboid defined on the 3-D square grid. More...

#include <cuboid3d.hh>

Inheritance diagram for mln::win::cuboid3d:
Inheritance graph

List of all members.

Public Types

typedef dpsites_fwd_piter
< cuboid3d
bkd_qiter
 Backward site iterator associated type.
typedef Window< void > category
typedef dpoint3d dpsite
 DPsite associated type.
typedef cuboid3d exact_t
typedef dpsites_fwd_piter
< cuboid3d
fwd_qiter
 Forward site iterator associated type.
typedef dpoint3d::psite psite
 Psite associated type.
typedef fwd_qiter qiter
 Site iterator associated type.
typedef window< dpoint3dregular
 Regular window associated type.
typedef dpoint3d::site site
 Site associated type.

Public Member Functions

 cuboid3d (unsigned depth, unsigned height, unsigned width)
 Constructor.
unsigned delta () const
 Give the maximum coordinate gap between the window center and a window point.
unsigned delta_ () const
 Give the maximum coordinate gap between the center of the window and a point of the window.
const dpoint3ddp (unsigned i) const
 Give the i-th delta-point.
bool has (const dpoint3d &dp) const
 Test if the delta-point dp belongs to the window.
bool is_centered () const
 Test if the window is centered; return true.
bool is_empty () const
 Test if the window is empty (null size; no delta-point).
bool is_neighbable_ () const
 Test if this window can be a neighborhood.
bool is_symmetric () const
 Test if the window is symmetric; return true.
bool is_valid () const
 return true by default.
void print (std::ostream &ostr) const
 Print into ostr the window definition.
void print_ (std::ostream &ostr) const
unsigned size () const
 Give the number of delta-points.
const std::vector< dpoint3d > & std_vector () const
 Give the vector of delta-points.
void sym ()
 Apply a central symmetry to the target window; a no-op here.
const std::vector< dpoint3d > & vect () const
 Give the vector of delta-points.
unsigned volume () const
 Return the volume of the cuboid.

unsigned depth () const
 Accessors.
unsigned height () const
 Return the height of the cuboid.
unsigned width () const
 Return the width of the cuboid.

Protected Member Functions

void insert (const dpoint3d &d)

Protected Attributes

unsigned depth_
 The depth of the cuboid (expressed as a number of slices).
unsigned height_
 The height of the cuboid (expressed as a number of rows).
unsigned width_
 The width of the cuboid (expressed as a number of columns).
mln::window< dpoint3dwin_

Detailed Description

Cuboid defined on the 3-D square grid.

A cuboid3d is a 3-D window with cuboid (also known as rectangular prism or rectangular parallelepiped) shape. It is centered and symmetric.

For instance:

            o o o o o o o
           o o o o o o o
          o o o o o o o
         o o o o o o o
        o o o o o o o

            o o o o o o o
           o o o o o o o
          o o o x o o o
         o o o o o o o
        o o o o o o o

            o o o o o o o
           o o o o o o o
          o o o o o o o
         o o o o o o o
        o o o o o o o
	

is defined with depth = 3, height = 5 and width = 7.

Reference: http://en.wikipedia.org/wiki/Cuboid


Member Typedef Documentation

Backward site iterator associated type.

typedef Window<void> mln::Window< cuboid3d >::category [inherited]

Reimplemented from mln::Object< cuboid3d >.

DPsite associated type.

typedef cuboid3d mln::Object< cuboid3d >::exact_t [inherited]

Forward site iterator associated type.

Psite associated type.

Site iterator associated type.

Regular window associated type.

Site associated type.


Constructor & Destructor Documentation

mln::win::cuboid3d::cuboid3d ( unsigned  depth,
unsigned  height,
unsigned  width 
) [inline]

Constructor.

Parameters:
[in] depth The depth of the cuboid3d.
[in] height The height of the cuboid3d.
[in] width The width of the cuboid3d.
Precondition:
Argument depth, height and width must be odd.

References mln::internal::classical_window_base< dpoint3d, cuboid3d >::insert().


Member Function Documentation

unsigned mln::internal::classical_window_base< dpoint3d , cuboid3d >::delta (  )  const [inherited]

Give the maximum coordinate gap between the window center and a window point.

unsigned mln::win::cuboid3d::delta_ (  )  const [inline]

Give the maximum coordinate gap between the center of the window and a point of the window.

Reimplemented from mln::internal::classical_window_base< dpoint3d, cuboid3d >.

References depth_, height_, and width_.

unsigned mln::win::cuboid3d::depth (  )  const [inline]

Accessors.

Return the depth of the cuboid.

References depth_.

const dpoint3d & mln::internal::classical_window_base< dpoint3d , cuboid3d >::dp ( unsigned  i  )  const [inherited]

Give the i-th delta-point.

bool mln::internal::classical_window_base< dpoint3d , cuboid3d >::has ( const dpoint3d dp  )  const [inherited]

Test if the delta-point dp belongs to the window.

unsigned mln::win::cuboid3d::height (  )  const [inline]

Return the height of the cuboid.

References height_.

void mln::internal::classical_window_base< dpoint3d , cuboid3d >::insert ( const dpoint3d d  )  [protected, inherited]

Referenced by cuboid3d().

bool mln::internal::classical_window_base< dpoint3d , cuboid3d >::is_centered (  )  const [inherited]

Test if the window is centered; return true.

bool mln::internal::classical_window_base< dpoint3d , cuboid3d >::is_empty (  )  const [inherited]

Test if the window is empty (null size; no delta-point).

bool mln::internal::window_base< dpoint3d , cuboid3d >::is_neighbable_ (  )  const [inherited]

Test if this window can be a neighborhood.

bool mln::internal::classical_window_base< dpoint3d , cuboid3d >::is_symmetric (  )  const [inherited]

Test if the window is symmetric; return true.

bool mln::internal::window_base< dpoint3d , cuboid3d >::is_valid (  )  const [inherited]

return true by default.

void mln::internal::classical_window_base< dpoint3d , cuboid3d >::print ( std::ostream &  ostr  )  const [inherited]

Print into ostr the window definition.

void mln::win::cuboid3d::print_ ( std::ostream &  ostr  )  const [inline]
unsigned mln::internal::classical_window_base< dpoint3d , cuboid3d >::size (  )  const [inherited]

Give the number of delta-points.

const std::vector<dpoint3d >& mln::internal::classical_window_base< dpoint3d , cuboid3d >::std_vector (  )  const [inherited]

Give the vector of delta-points.

void mln::internal::classical_window_base< dpoint3d , cuboid3d >::sym (  )  [inherited]

Apply a central symmetry to the target window; a no-op here.

const std::vector<dpoint3d >& mln::internal::classical_window_base< dpoint3d , cuboid3d >::vect (  )  const [inherited]

Give the vector of delta-points.

unsigned mln::win::cuboid3d::volume (  )  const [inline]

Return the volume of the cuboid.

References depth_, height_, and width_.

unsigned mln::win::cuboid3d::width (  )  const [inline]

Return the width of the cuboid.

References width_.


Member Data Documentation

unsigned mln::win::cuboid3d::depth_ [protected]

The depth of the cuboid (expressed as a number of slices).

Referenced by delta_(), depth(), print_(), and volume().

unsigned mln::win::cuboid3d::height_ [protected]

The height of the cuboid (expressed as a number of rows).

Referenced by delta_(), height(), print_(), and volume().

unsigned mln::win::cuboid3d::width_ [protected]

The width of the cuboid (expressed as a number of columns).

Referenced by delta_(), print_(), volume(), and width().