DGtal 0.3.0
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions

DGtal::SpaceND< dim, TInteger > Class Template Reference

#include <SpaceND.h>

Data Structures

struct  Subcospace
 Define the type of a sub co-Space. More...
struct  Subspace
 Define the type of a subspace. More...

Public Types

typedef TInteger Integer
typedef IntegerTraits< Integer >
::UnsignedVersion 
UnsignedInteger
typedef UnsignedInteger Size
typedef PointVector< dim, IntegerPoint
typedef PointVector< dim, IntegerVector
typedef SpaceND< dim, IntegerSpace
typedef DGtal::Dimension Dimension
typedef boost::array< double, dim > RealPoint

Public Member Functions

 SpaceND ()
 ~SpaceND ()

Static Public Member Functions

template<Dimension subdimension>
static Subspace< subdimension >
::Type 
subspace ()
template<Dimension codimension>
static Subcospace< codimension >
::Type 
subcospace ()
static void selfDisplay (std::ostream &out)

Static Public Attributes

static const Dimension dimension = dim

Private Member Functions

 BOOST_CONCEPT_ASSERT ((CInteger< TInteger >))
 BOOST_CONCEPT_ASSERT ((CSignedInteger< TInteger >))
SpaceNDoperator= (const SpaceND &other)

Detailed Description

template<Dimension dim, typename TInteger = DGtal::int32_t>
class DGtal::SpaceND< dim, TInteger >

Description of class 'SpaceND'

Aim: SpaceND defines the fundamental structure of a Digital Space in ND.

This class just defines fundamental types associated to a digital space in dimension n. For instance, it specifies the type of a Point lying in this space, the type of a Vector or the type of subspace.

Template Parameters:
dimstatic constant of type DGtal::Dimension that specifies the static dimension of the space.
Integerspecifies the integer number type to use as a ring for the computations or as coordinates type. Integer must be a model of CInteger and CSignedInteger concepts.

Example of use:

#include <DGtal/kernel/SpaceND.h>

//...

//We define the type of a digital domain on dimension 4 using the
//"int" arithmetic ring.

typedef SpaceND<4, int> Space4Int;
   
//We deduce the type to represent points in this space
typedef Space4::Point Point4Int;

//and we use it (see PointVector documentation).
Point4Int a= {2, 3 , -5 , 6};
Examples:

3dBorderExtraction.cpp, and distancetransform3D.cpp.

Definition at line 96 of file SpaceND.h.


Member Typedef Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef DGtal::Dimension DGtal::SpaceND< dim, TInteger >::Dimension

Copy of the type used for the dimension.

Definition at line 124 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef TInteger DGtal::SpaceND< dim, TInteger >::Integer

Arithmetic ring induced by (+,-,*) and Integre numbers.

Definition at line 106 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim,Integer> DGtal::SpaceND< dim, TInteger >::Point

Points in DGtal::SpaceND.

Definition at line 115 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef boost::array<double,dim> DGtal::SpaceND< dim, TInteger >::RealPoint

Point with "double" as coordinate type with the same dimension as SpaceND.

Definition at line 145 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef UnsignedInteger DGtal::SpaceND< dim, TInteger >::Size

Type used to represent sizes in the digital space.

Definition at line 111 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef SpaceND<dim, Integer> DGtal::SpaceND< dim, TInteger >::Space

Type to denote the space itself.

Definition at line 121 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef IntegerTraits<Integer>::UnsignedVersion DGtal::SpaceND< dim, TInteger >::UnsignedInteger

Unsigned version of the Integers.

Definition at line 108 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
typedef PointVector<dim,Integer> DGtal::SpaceND< dim, TInteger >::Vector

Vectors in DGtal::SpaceND.

Definition at line 118 of file SpaceND.h.


Constructor & Destructor Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::SpaceND ( ) [inline]

Constructor

Definition at line 154 of file SpaceND.h.

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::~SpaceND ( ) [inline]

Destructor.

Definition at line 159 of file SpaceND.h.


Member Function Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::BOOST_CONCEPT_ASSERT ( (CInteger< TInteger >)  ) [private]
template<Dimension dim, typename TInteger = DGtal::int32_t>
DGtal::SpaceND< dim, TInteger >::BOOST_CONCEPT_ASSERT ( (CSignedInteger< TInteger >)  ) [private]
template<Dimension dim, typename TInteger = DGtal::int32_t>
SpaceND& DGtal::SpaceND< dim, TInteger >::operator= ( const SpaceND< dim, TInteger > &  other) [private]

Assignment.

Parameters:
otherthe object to copy.
Returns:
a reference on 'this'. Forbidden by default.
template<Dimension dim, typename TInteger = DGtal::int32_t>
static void DGtal::SpaceND< dim, TInteger >::selfDisplay ( std::ostream &  out) [inline, static]

Writes/Displays the object on an output stream.

Parameters:
outthe output stream where the object is written.

Definition at line 192 of file SpaceND.h.

References DGtal::SpaceND< dim, TInteger >::dimension.

template<Dimension dim, typename TInteger = DGtal::int32_t>
template<Dimension codimension>
static Subcospace<codimension>::Type DGtal::SpaceND< dim, TInteger >::subcospace ( ) [inline, static]
Returns:
the digital space of specified codimension of this space.

Definition at line 178 of file SpaceND.h.

References ASSERT, and dim.

Referenced by testSimpleSpace().

template<Dimension dim, typename TInteger = DGtal::int32_t>
template<Dimension subdimension>
static Subspace<subdimension>::Type DGtal::SpaceND< dim, TInteger >::subspace ( ) [inline, static]
Returns:
the digital space of specified subdimension of this space.

Definition at line 166 of file SpaceND.h.

References ASSERT, and dim.


Field Documentation

template<Dimension dim, typename TInteger = DGtal::int32_t>
const Dimension DGtal::SpaceND< dim, TInteger >::dimension = dim [static]

static constants to store the dimension.

Definition at line 127 of file SpaceND.h.

Referenced by DGtal::SpaceND< dim, TInteger >::selfDisplay().


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines