Generic point class. More...
#include <point.hh>
Public Types | |
enum | { dim = G::dim } |
typedef Gpoint< void > | category |
typedef C | coord |
Coordinate associated type. | |
typedef dpoint< G, C > | delta |
Delta associated type. | |
typedef dpoint< G, C > | dpsite |
DPsite associated type. | |
typedef point< G, C > | exact_t |
typedef G | grid |
Grid associated type. | |
typedef algebra::h_vec< G::dim, float > | h_vec |
Algebra hexagonal vector (hvec) associated type. | |
typedef point | psite |
typedef point | site |
typedef algebra::vec< G::dim, float > | vec |
Algebra vector (vec) associated type. | |
Public Member Functions | |
const C & | last_coord () const |
Read-only access to the last coordinate. | |
C & | last_coord () |
Read-write access to the last coordinate. | |
operator typename internal::vec_of_point< G, C >::ret () const | |
point< G, C > & | operator+= (const delta &dp) |
Shifting by dp . | |
point< G, C > & | operator-= (const delta &dp) |
Shifting by the inverse of dp. | |
C & | operator[] (unsigned i) |
Read-write access to the i-th coordinate value. | |
const C & | operator[] (unsigned i) const |
Read-only access to the i-th coordinate value. | |
template<typename F > | |
point (const Function_v2v< F > &f) | |
Constructor; coordinates are set by function f . | |
point () | |
Constructor without argument. | |
template<typename C2 > | |
point (const algebra::vec< dim, C2 > &v) | |
Constructor from an algebra vector. | |
void | set_all (C c) |
Set all coordinates to the value c . | |
h_vec | to_h_vec () const |
Transform to point in homogene coordinate system. | |
vec | to_vec () const |
Explicit conversion towards mln::algebra::vec. | |
point (C ind) | |
point (C row, C col) | |
point (C sli, C row, C col) | |
point (const literal::origin_t &) | |
Constructors/assignments with literals. | |
point< G, C > & | operator= (const literal::origin_t &) |
point (const literal::zero_t &) | |
point< G, C > & | operator= (const literal::zero_t &) |
point (const literal::one_t &) | |
point< G, C > & | operator= (const literal::one_t &) |
Static Public Member Functions | |
static const point< G, C > & | minus_infty () |
Point with all coordinates set to the mininum value. | |
static const point< G, C > & | plus_infty () |
Point with all coordinates set to the maximum value. | |
Static Public Attributes | |
static const point< G, C > | origin = all_to(0) |
Origin point (all coordinates are 0). | |
Protected Attributes | |
algebra::vec< G::dim, C > | coord_ |
Generic point class.
Parameters are n
the dimension of the space and C
the coordinate type in this space.
typedef Gpoint<void> mln::Gpoint< point< G, C > >::category [inherited] |
Reimplemented from mln::Site< point< G, C > >.
typedef C mln::point< G, C >::coord |
Coordinate associated type.
typedef dpoint<G,C> mln::point< G, C >::delta |
Delta associated type.
typedef dpoint<G,C> mln::point< G, C >::dpsite |
DPsite associated type.
typedef point< G, C > mln::Object< point< G, C > >::exact_t [inherited] |
typedef G mln::point< G, C >::grid |
Grid associated type.
typedef algebra::h_vec<G::dim, float> mln::point< G, C >::h_vec |
Algebra hexagonal vector (hvec) associated type.
typedef point mln::point< G, C >::psite |
typedef point mln::point< G, C >::site |
typedef algebra::vec<G::dim, float> mln::point< G, C >::vec |
Algebra vector (vec) associated type.
anonymous enum |
mln::point< G, C >::point | ( | ) | [inline] |
Constructor without argument.
mln::point< G, C >::point | ( | const algebra::vec< dim, C2 > & | v | ) | [inline] |
Constructor from an algebra vector.
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
mln::point< G, C >::point | ( | C | ind | ) | [inline, explicit] |
Constructors with different numbers of arguments (coordinates) w.r.t. the dimension.
References mln::point< G, C >::coord_.
mln::point< G, C >::point | ( | C | row, | |
C | col | |||
) | [inline] |
References mln::point< G, C >::coord_.
mln::point< G, C >::point | ( | C | sli, | |
C | row, | |||
C | col | |||
) | [inline] |
References mln::point< G, C >::coord_.
mln::point< G, C >::point | ( | const literal::origin_t & | ) | [inline] |
Constructors/assignments with literals.
References mln::point< G, C >::coord_, and mln::algebra::vec< n, T >::set_all().
mln::point< G, C >::point | ( | const literal::zero_t & | ) | [inline] |
References mln::point< G, C >::coord_.
mln::point< G, C >::point | ( | const literal::one_t & | ) | [inline] |
References mln::point< G, C >::coord_.
mln::point< G, C >::point | ( | const Function_v2v< F > & | f | ) | [inline] |
Constructor; coordinates are set by function f
.
References mln::point< G, C >::coord_, and mln::exact().
const C & mln::point< G, C >::last_coord | ( | ) | const [inline] |
Read-only access to the last coordinate.
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
Referenced by mln::convert::impl::internal::from_image_to_site_set(), and mln::debug::put_word().
C & mln::point< G, C >::last_coord | ( | ) | [inline] |
Read-write access to the last coordinate.
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
const point< G, C > & mln::point< G, C >::minus_infty | ( | ) | [inline, static] |
Point with all coordinates set to the mininum value.
References mln::all_to().
mln::point< G, C >::operator typename internal::vec_of_point< G, C >::ret | ( | ) | const [inline] |
References mln::point< G, C >::to_vec().
point< G, C > & mln::point< G, C >::operator+= | ( | const delta & | dp | ) | [inline] |
Shifting by dp
.
References mln::point< G, C >::coord_.
point< G, C > & mln::point< G, C >::operator-= | ( | const delta & | dp | ) | [inline] |
Shifting by the
inverse of dp.
References mln::point< G, C >::coord_.
point< G, C > & mln::point< G, C >::operator= | ( | const literal::one_t & | ) | [inline] |
References mln::point< G, C >::coord_.
point< G, C > & mln::point< G, C >::operator= | ( | const literal::origin_t & | ) | [inline] |
References mln::point< G, C >::coord_, and mln::algebra::vec< n, T >::set_all().
point< G, C > & mln::point< G, C >::operator= | ( | const literal::zero_t & | ) | [inline] |
References mln::point< G, C >::coord_.
C & mln::point< G, C >::operator[] | ( | unsigned | i | ) | [inline] |
Read-write access to the i-th
coordinate value.
[in] | i | The coordinate index. |
i
< dim
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
const C & mln::point< G, C >::operator[] | ( | unsigned | i | ) | const [inline] |
Read-only access to the i-th
coordinate value.
[in] | i | The coordinate index. |
i
< dim
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
const point< G, C > & mln::point< G, C >::plus_infty | ( | ) | [inline, static] |
Point with all coordinates set to the maximum value.
References mln::all_to().
void mln::point< G, C >::set_all | ( | C | c | ) | [inline] |
Set all coordinates to the value c
.
References mln::point< G, C >::coord_, and mln::algebra::vec< n, T >::set_all().
point< G, C >::h_vec mln::point< G, C >::to_h_vec | ( | ) | const [inline] |
Transform to point in homogene coordinate system.
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
point< G, C >::vec mln::point< G, C >::to_vec | ( | ) | const [inline] |
Explicit conversion towards mln::algebra::vec.
References mln::point< G, C >::coord_, and mln::point< G, C >::dim.
Referenced by mln::registration::compute_distance_criteria(), mln::cut_(), mln::registration::draw_last_run(), mln::convert::over_load::from_to_(), mln::registration::get_mu_yk(), mln::io::magick::load(), mln::io::dicom::load(), mln::point< G, C >::operator typename internal::vec_of_point< G, C >::ret(), mln::registration::remove_too_far_sites(), mln::io::magick::save(), mln::io::cloud::internal::save_data(), and mln::internal::subject_point_impl< point< G, C >, E >::to_vec().
algebra::vec<G::dim, C> mln::point< G, C >::coord_ [protected] |
Referenced by mln::point< G, C >::last_coord(), mln::point< G, C >::operator+=(), mln::point< G, C >::operator-=(), mln::point< G, C >::operator=(), mln::point< G, C >::operator[](), mln::point< G, C >::point(), mln::point< G, C >::set_all(), mln::point< G, C >::to_h_vec(), and mln::point< G, C >::to_vec().
const point< G, C > mln::point< G, C >::origin = all_to(0) [static] |
Origin point (all coordinates are 0).