STIR  6.2.0
Public Member Functions | Protected Types | List of all members
stir::CartesianCoordinate2D< coordT > Class Template Reference

a templated class for 2-dimensional coordinates. More...

#include "stir/CartesianCoordinate2D.h"

Inheritance diagram for stir::CartesianCoordinate2D< coordT >:
Inheritance graph
[legend]

Public Member Functions

 CartesianCoordinate2D (const coordT &, const coordT &)
 
 CartesianCoordinate2D (const BasicCoordinate< 2, coordT > &c)
 
CartesianCoordinate2Doperator= (const BasicCoordinate< 2, coordT > &c)
 
coordT & y ()
 
coordT y () const
 
coordT & x ()
 
coordT x () const
 
- Public Member Functions inherited from stir::Coordinate2D< coordT >
 Coordinate2D (const coordT &, const coordT &)
 
 Coordinate2D (const BasicCoordinate< 2, coordT > &c)
 
Coordinate2Doperator= (const BasicCoordinate< 2, coordT > &c)
 
- Public Member Functions inherited from stir::BasicCoordinate< 2, coordT >
 BasicCoordinate ()
 default constructor. NO initialisation
 
 BasicCoordinate (const coordT &)
 constructor that sets all elements equal to value.
 
 BasicCoordinate (const BasicCoordinate< num_dimensions, coordT2 > &c)
 constructor from different type of coordT More...
 
BasicCoordinateoperator= (const BasicCoordinate &c)
 assignment
 
bool operator== (const BasicCoordinate &c) const
 comparison
 
bool operator< (const BasicCoordinate &c) const
 less-than (using lexical ordering)
 
coordT & operator[] (const int d)
 Return value at index t (which is 1-based)
 
coordT const & operator[] (const int d) const
 Return value at index t (which is 1-based) if the BasicCoordinate object is const. More...
 
coordT & at (const int d)
 Return value at index t (which is 1-based), but with range checking (throws std::out_of_range)
 
coordT const & at (const int d) const
 Return value at index t (which is 1-based) if the BasicCoordinate object is const, but with range checking (throws std::out_of_range)
 
bool empty () const
 
BasicCoordinateoperator+= (const BasicCoordinate &c)
 
BasicCoordinateoperator+= (const coordT &a)
 
BasicCoordinateoperator-= (const BasicCoordinate &c)
 
BasicCoordinateoperator-= (const coordT &a)
 
BasicCoordinateoperator*= (const BasicCoordinate &c)
 
BasicCoordinateoperator*= (const coordT &a)
 
BasicCoordinateoperator/= (const BasicCoordinate &c)
 
BasicCoordinateoperator/= (const coordT &a)
 
BasicCoordinate operator+ (const BasicCoordinate &c) const
 
BasicCoordinate operator- (const BasicCoordinate &c) const
 
BasicCoordinate operator* (const BasicCoordinate &c) const
 
BasicCoordinate operator/ (const BasicCoordinate &c) const
 
BasicCoordinate operator+ (const coordT &a) const
 
BasicCoordinate operator- (const coordT &a) const
 
BasicCoordinate operator- () const
 
BasicCoordinate operator* (const coordT &a) const
 
BasicCoordinate operator/ (const coordT &a) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void fill (const coordT &)
 fill elements with value
 

Protected Types

typedef Coordinate2D< coordT > base_type
 
typedef base_type::base_type basebase_type
 
- Protected Types inherited from stir::Coordinate2D< coordT >
typedef BasicCoordinate< 2, coordT > base_type
 

Additional Inherited Members

- Public Types inherited from stir::BasicCoordinate< 2, coordT >
typedef std::random_access_iterator_tag iterator_category
 
typedef coordT value_type
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * iterator
 
typedef value_type * pointer
 
typedef const value_type * const_iterator
 
typedef std::ptrdiff_t difference_type
 
typedef std::size_t size_type
 
- Static Public Member Functions inherited from stir::BasicCoordinate< 2, coordT >
static int get_min_index ()
 
static int get_max_index ()
 
static unsigned size ()
 

Detailed Description

template<typename coordT>
class stir::CartesianCoordinate2D< coordT >

a templated class for 2-dimensional coordinates.

It is derived from Coordinate2D<coordT>. The only new methods are y(),x(), corresponding resp. to operator[](1), operator[](2)

Warning
The constructor uses the order CartesianCoordinate2D<coordT>(y,x)

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