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

OpenTissue::grid::Grid< T, math_types_ > Class Template Reference

#include <grid.h>

List of all members.

Public Types

typedef OpenTissue::grid::Grid
< T, math_types_ > 
grid_type
typedef T value_type
typedef math_types_ math_types
typedef
math_types::index_vector3_type 
index_vector
typedef
OpenTissue::grid::detail::Iterator
< grid_type, value_type
&, value_type * > 
iterator
typedef
OpenTissue::grid::detail::Iterator
< const grid_type, value_type
const &, value_type const * > 
const_iterator
typedef
OpenTissue::grid::detail::IndexIterator
< grid_type, value_type
&, value_type * > 
index_iterator
typedef
OpenTissue::grid::detail::IndexIterator
< const grid_type, value_type
const &, value_type const * > 
const_index_iterator

Public Member Functions

iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
 Grid ()
 Grid (value_type const &unused_val)
 Grid (grid_type const &G)
 ~Grid ()
grid_typeoperator= (grid_type const &G)
void create (vector3_type const &min_coord, vector3_type const &max_coord, size_t const &Ival, size_t const &Jval, size_t const &Kval)
void create (size_t I_val, size_t J_val, size_t K_val, real_type dx_val, real_type dy_val, real_type dz_val)
void clear ()
void set_spacing (real_type const &new_dx, real_type const &new_dy, real_type const &new_dz)
value_typeget_value (size_t const &i, size_t const &j, size_t const &k) const
value_typeget_value (size_t const &linear_index) const
value_typeoperator() (size_t const &i, size_t const &j, size_t const &k)
value_type const & operator() (size_t const &i, size_t const &j, size_t const &k) const
value_typeoperator() (size_t const &linear_index)
value_type const & operator() (size_t const &linear_index) const
value_typeoperator() (index_vector const &iv)
value_type const & operator() (index_vector const &iv) const
real_type width () const
real_type height () const
real_type depth () const
real_typedx ()
real_typedy ()
real_typedz ()
real_type const & dx () const
real_type const & dy () const
real_type const & dz () const
size_t I () const
size_t J () const
size_t K () const
size_t size () const
vector3_type const & min_coord () const
vector3_type const & max_coord () const
real_type const & min_coord (size_t const &idx) const
real_type const & max_coord (size_t const &idx) const
value_type unused () const
value_type infinity () const
bool valid () const
bool empty () const
value_typedata ()
value_type const * data () const

Protected Types

typedef math_types::vector3_type vector3_type
typedef math_types::real_type real_type
typedef math_types::value_traits value_traits

Protected Attributes

vector3_type m_min_coord
vector3_type m_max_coord
size_t m_N
 Total number of nodes in grid.
size_t m_I
 Number of nodes along x-axis.
size_t m_J
 Number of nodes along y-axis.
size_t m_K
 Number of nodes along z-axis.
vector3_type m_delta
 Internode spacing along coordinate axes.
value_typem_value
value_typem_value_end
value_type m_infinity
 Value specifying unused grid nodes.

template<typename T, typename math_types_>
class OpenTissue::grid::Grid< T, math_types_ >


Member Typedef Documentation

template<typename T, typename math_types_>
typedef OpenTissue::grid::detail::IndexIterator< const grid_type, value_type const &, value_type const *> OpenTissue::grid::Grid< T, math_types_ >::const_index_iterator
template<typename T, typename math_types_>
typedef OpenTissue::grid::detail::Iterator< const grid_type, value_type const &, value_type const *> OpenTissue::grid::Grid< T, math_types_ >::const_iterator
template<typename T, typename math_types_>
typedef OpenTissue::grid::Grid<T, math_types_> OpenTissue::grid::Grid< T, math_types_ >::grid_type
template<typename T, typename math_types_>
typedef OpenTissue::grid::detail::IndexIterator< grid_type, value_type &, value_type *> OpenTissue::grid::Grid< T, math_types_ >::index_iterator
template<typename T, typename math_types_>
typedef math_types::index_vector3_type OpenTissue::grid::Grid< T, math_types_ >::index_vector
template<typename T, typename math_types_>
typedef OpenTissue::grid::detail::Iterator< grid_type, value_type &, value_type *> OpenTissue::grid::Grid< T, math_types_ >::iterator
template<typename T, typename math_types_>
typedef math_types_ OpenTissue::grid::Grid< T, math_types_ >::math_types
template<typename T, typename math_types_>
typedef math_types::real_type OpenTissue::grid::Grid< T, math_types_ >::real_type [protected]
template<typename T, typename math_types_>
typedef math_types::value_traits OpenTissue::grid::Grid< T, math_types_ >::value_traits [protected]
template<typename T, typename math_types_>
typedef T OpenTissue::grid::Grid< T, math_types_ >::value_type
template<typename T, typename math_types_>
typedef math_types::vector3_type OpenTissue::grid::Grid< T, math_types_ >::vector3_type [protected]

Constructor & Destructor Documentation

template<typename T, typename math_types_>
OpenTissue::grid::Grid< T, math_types_ >::Grid (  )  [inline]
template<typename T, typename math_types_>
OpenTissue::grid::Grid< T, math_types_ >::Grid ( value_type const &  unused_val  )  [inline]

Specialized Constructor. Should be used for more complex data types, which do not have a default numeric_limits

template<typename T, typename math_types_>
OpenTissue::grid::Grid< T, math_types_ >::Grid ( grid_type const &  G  )  [inline]
template<typename T, typename math_types_>
OpenTissue::grid::Grid< T, math_types_ >::~Grid (  )  [inline]

Member Function Documentation

template<typename T, typename math_types_>
iterator OpenTissue::grid::Grid< T, math_types_ >::begin (  )  [inline]
template<typename T, typename math_types_>
const_iterator OpenTissue::grid::Grid< T, math_types_ >::begin (  )  const [inline]
template<typename T, typename math_types_>
void OpenTissue::grid::Grid< T, math_types_ >::clear (  )  [inline]

Clears the map to infinity/unused values.

template<typename T, typename math_types_>
void OpenTissue::grid::Grid< T, math_types_ >::create ( vector3_type const &  min_coord,
vector3_type const &  max_coord,
size_t const &  Ival,
size_t const &  Jval,
size_t const &  Kval 
) [inline]

Create Grid. This method allocates internal data structures.

Parameters:
min_coord 
max_coord 
Ival 
Jval 
Kval 
template<typename T, typename math_types_>
void OpenTissue::grid::Grid< T, math_types_ >::create ( size_t  I_val,
size_t  J_val,
size_t  K_val,
real_type  dx_val,
real_type  dy_val,
real_type  dz_val 
) [inline]

Create a map with given dimensions and place it in center of world.

Parameters:
I_val Number of elements in x-direction.
J_val Number of elements in y-direction.
K_val Number of elements in z-direction.
dx_val World-coord spacing between elements in x-direction.
dy_val World-coord spacing between elements in y-direction.
dz_val World-coord spacing between elements in z-direction.
template<typename T, typename math_types_>
value_type* OpenTissue::grid::Grid< T, math_types_ >::data (  )  [inline]
template<typename T, typename math_types_>
value_type const* OpenTissue::grid::Grid< T, math_types_ >::data (  )  const [inline]
template<typename T, typename math_types_>
real_type OpenTissue::grid::Grid< T, math_types_ >::depth (  )  const [inline]
template<typename T, typename math_types_>
real_type& OpenTissue::grid::Grid< T, math_types_ >::dx (  )  [inline]
template<typename T, typename math_types_>
real_type const& OpenTissue::grid::Grid< T, math_types_ >::dx (  )  const [inline]
template<typename T, typename math_types_>
real_type& OpenTissue::grid::Grid< T, math_types_ >::dy (  )  [inline]
template<typename T, typename math_types_>
real_type const& OpenTissue::grid::Grid< T, math_types_ >::dy (  )  const [inline]
template<typename T, typename math_types_>
real_type& OpenTissue::grid::Grid< T, math_types_ >::dz (  )  [inline]
template<typename T, typename math_types_>
real_type const& OpenTissue::grid::Grid< T, math_types_ >::dz (  )  const [inline]
template<typename T, typename math_types_>
bool OpenTissue::grid::Grid< T, math_types_ >::empty (  )  const [inline]
template<typename T, typename math_types_>
const_iterator OpenTissue::grid::Grid< T, math_types_ >::end (  )  const [inline]
template<typename T, typename math_types_>
iterator OpenTissue::grid::Grid< T, math_types_ >::end (  )  [inline]
template<typename T, typename math_types_>
value_type& OpenTissue::grid::Grid< T, math_types_ >::get_value ( size_t const &  i,
size_t const &  j,
size_t const &  k 
) const [inline]
template<typename T, typename math_types_>
value_type& OpenTissue::grid::Grid< T, math_types_ >::get_value ( size_t const &  linear_index  )  const [inline]
template<typename T, typename math_types_>
real_type OpenTissue::grid::Grid< T, math_types_ >::height (  )  const [inline]
template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::I (  )  const [inline]
template<typename T, typename math_types_>
value_type OpenTissue::grid::Grid< T, math_types_ >::infinity (  )  const [inline]
template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::J (  )  const [inline]
template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::K (  )  const [inline]
template<typename T, typename math_types_>
vector3_type const& OpenTissue::grid::Grid< T, math_types_ >::max_coord (  )  const [inline]
template<typename T, typename math_types_>
real_type const& OpenTissue::grid::Grid< T, math_types_ >::max_coord ( size_t const &  idx  )  const [inline]
template<typename T, typename math_types_>
real_type const& OpenTissue::grid::Grid< T, math_types_ >::min_coord ( size_t const &  idx  )  const [inline]
template<typename T, typename math_types_>
vector3_type const& OpenTissue::grid::Grid< T, math_types_ >::min_coord (  )  const [inline]
template<typename T, typename math_types_>
value_type const& OpenTissue::grid::Grid< T, math_types_ >::operator() ( index_vector const &  iv  )  const [inline]
template<typename T, typename math_types_>
value_type const& OpenTissue::grid::Grid< T, math_types_ >::operator() ( size_t const &  linear_index  )  const [inline]
template<typename T, typename math_types_>
value_type const& OpenTissue::grid::Grid< T, math_types_ >::operator() ( size_t const &  i,
size_t const &  j,
size_t const &  k 
) const [inline]
template<typename T, typename math_types_>
value_type& OpenTissue::grid::Grid< T, math_types_ >::operator() ( size_t const &  i,
size_t const &  j,
size_t const &  k 
) [inline]
template<typename T, typename math_types_>
value_type& OpenTissue::grid::Grid< T, math_types_ >::operator() ( size_t const &  linear_index  )  [inline]
template<typename T, typename math_types_>
value_type& OpenTissue::grid::Grid< T, math_types_ >::operator() ( index_vector const &  iv  )  [inline]
template<typename T, typename math_types_>
grid_type& OpenTissue::grid::Grid< T, math_types_ >::operator= ( grid_type const &  G  )  [inline]
template<typename T, typename math_types_>
void OpenTissue::grid::Grid< T, math_types_ >::set_spacing ( real_type const &  new_dx,
real_type const &  new_dy,
real_type const &  new_dz 
) [inline]
template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::size (  )  const [inline]
template<typename T, typename math_types_>
value_type OpenTissue::grid::Grid< T, math_types_ >::unused (  )  const [inline]
template<typename T, typename math_types_>
bool OpenTissue::grid::Grid< T, math_types_ >::valid (  )  const [inline]
template<typename T, typename math_types_>
real_type OpenTissue::grid::Grid< T, math_types_ >::width (  )  const [inline]

Member Data Documentation

template<typename T, typename math_types_>
vector3_type OpenTissue::grid::Grid< T, math_types_ >::m_delta [protected]

Internode spacing along coordinate axes.

template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::m_I [protected]

Number of nodes along x-axis.

template<typename T, typename math_types_>
value_type OpenTissue::grid::Grid< T, math_types_ >::m_infinity [protected]

Value specifying unused grid nodes.

template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::m_J [protected]

Number of nodes along y-axis.

template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::m_K [protected]

Number of nodes along z-axis.

template<typename T, typename math_types_>
vector3_type OpenTissue::grid::Grid< T, math_types_ >::m_max_coord [protected]
template<typename T, typename math_types_>
vector3_type OpenTissue::grid::Grid< T, math_types_ >::m_min_coord [protected]
template<typename T, typename math_types_>
size_t OpenTissue::grid::Grid< T, math_types_ >::m_N [protected]

Total number of nodes in grid.

template<typename T, typename math_types_>
value_type* OpenTissue::grid::Grid< T, math_types_ >::m_value [protected]
template<typename T, typename math_types_>
value_type* OpenTissue::grid::Grid< T, math_types_ >::m_value_end [protected]

The documentation for this class was generated from the following file: