STIR 6.5.0
Items relating to coordinates
Collaboration diagram for Items relating to coordinates:

Files

file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/BasicCoordinate.h
 This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate objects.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/BasicCoordinate.inl
 (inline) implementations for stir::BasicCoordinate
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/CartesianCoordinate2D.h
 defines the stir::CartesianCoordinate2D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/CartesianCoordinate2D.inl
 inline implementations for the stir::CartesianCoordinate2D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/CartesianCoordinate3D.h
 defines the stir::CartesianCoordinate3D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/CartesianCoordinate3D.inl
 inline implementations for the stir::CartesianCoordinate3D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Coordinate2D.h
 defines the stir::Coordinate2D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Coordinate3D.h
 defines the stir::Coordinate3D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Coordinate3D.inl
 inline implementations for the stir::Coordinate3D class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Coordinate4D.h
 defines the stir::Coordinate4D<coordT> class
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Coordinate4D.inl
 inline implementations for the stir::Coordinate4D class

Classes

class  stir::BasicCoordinate< num_dimensions, coordT >
 class BasicCoordinate<int num_dimensions, typename coordT> defines num_dimensions -dimensional coordinates. More...
class  stir::CartesianCoordinate2D< coordT >
 a templated class for 2-dimensional coordinates. More...
class  stir::CartesianCoordinate3D< coordT >
 a templated class for 3-dimensional coordinates. More...
class  stir::Coordinate2D< coordT >
 a templated class for 2-dimensional coordinates. More...
class  stir::Coordinate3D< coordT >
 a templated class for 3-dimensional coordinates. More...
class  stir::Coordinate4D< coordT >
 a templated class for 4-dimensional coordinates. More...

Utility functions to make BasicCoordinate objects.

Warning
Because of template rules of C++, all arguments of the make_coordinate function have to have exactly the same type. For instance,
const BasicCoordinate<3,float> a = make_coordinate(1.F,2.F,0.F);
template<int num_dimensions, typename coordT>
coordT stir::inner_product (const BasicCoordinate< num_dimensions, coordT > &p1, const BasicCoordinate< num_dimensions, coordT > &p2)
 compute sum_i p1[i] * p2[i]
template<int num_dimensions, typename coordT>
double stir::norm_squared (const BasicCoordinate< num_dimensions, coordT > &p1)
 compute (inner_product(p1,p1))
template<int num_dimensions, typename coordT>
double stir::norm (const BasicCoordinate< num_dimensions, coordT > &p1)
 compute sqrt(inner_product(p1,p1))
template<int num_dimensions, typename coordT>
double stir::angle (const BasicCoordinate< num_dimensions, coordT > &p1, const BasicCoordinate< num_dimensions, coordT > &p2)
 compute angle between 2 directions
template<int num_dimensions, typename coordT>
double stir::cos_angle (const BasicCoordinate< num_dimensions, coordT > &p1, const BasicCoordinate< num_dimensions, coordT > &p2)
 compute cos of the angle between 2 directions
template<int num_dimensions, typename coordT>
BasicCoordinate< num_dimensions+1, coordT > stir::join (const coordT &a, const BasicCoordinate< num_dimensions, coordT > &c)
 make a longer BasicCoordinate, by prepending c with the single coordT
template<int num_dimensions, class coordT>
BasicCoordinate< num_dimensions+1, coordT > stir::join (const BasicCoordinate< num_dimensions, coordT > &c, const coordT &a)
 make a longer BasicCoordinate, by appending the coordT to c
template<int num_dimensions, class coordT>
BasicCoordinate< num_dimensions - 1, coordT > stir::cut_last_dimension (const BasicCoordinate< num_dimensions, coordT > &c)
 make a shorter BasicCoordinate, by cutting the last element from c
template<int num_dimensions, typename coordT>
BasicCoordinate< num_dimensions - 1, coordT > stir::cut_first_dimension (const BasicCoordinate< num_dimensions, coordT > &c)
 make a shorter BasicCoordinate, by cutting the first element from c
template<int num_dimensions>
BasicCoordinate< num_dimensions, float > stir::convert_int_to_float (const BasicCoordinate< num_dimensions, int > &cint)
 converts a BasicCoordinate<int> to BasicCoordinate<float>

Detailed Description

Function Documentation

◆ inner_product()

template<int num_dimensions, typename coordT>
coordT stir::inner_product ( const BasicCoordinate< num_dimensions, coordT > & p1,
const BasicCoordinate< num_dimensions, coordT > & p2 )
inline

◆ norm_squared()

◆ norm()

◆ angle()

template<int num_dimensions, typename coordT>
double stir::angle ( const BasicCoordinate< num_dimensions, coordT > & p1,
const BasicCoordinate< num_dimensions, coordT > & p2 )
inline

compute angle between 2 directions

Implemented in terms of acos(cos_angle(p1,p2)).

Todo
move to a new CartesianCoordinate class

References angle(), and cos_angle().

Referenced by angle(), angle(), and stir::ProjDataInfoGenericNoArcCorr::set_azimuthal_angle_offset().

◆ cos_angle()

template<int num_dimensions, typename coordT>
double stir::cos_angle ( const BasicCoordinate< num_dimensions, coordT > & p1,
const BasicCoordinate< num_dimensions, coordT > & p2 )
inline

compute cos of the angle between 2 directions

Todo
move to a new CartesianCoordinate class

References cos_angle(), inner_product(), and norm_squared().

Referenced by angle(), cos_angle(), stir::ScatterSimulation::detection_efficiency_no_scatter(), and stir::SingleScatterSimulation::simulate_for_one_scatter_point().

◆ join() [1/2]

template<int num_dimensions, typename coordT>
BasicCoordinate< num_dimensions+1, coordT > stir::join ( const coordT & a,
const BasicCoordinate< num_dimensions, coordT > & c )
inline

◆ join() [2/2]

template<int num_dimensions, class coordT>
BasicCoordinate< num_dimensions+1, coordT > stir::join ( const BasicCoordinate< num_dimensions, coordT > & c,
const coordT & a )
inline

make a longer BasicCoordinate, by appending the coordT to c

References join().

◆ cut_last_dimension()

template<int num_dimensions, class coordT>
BasicCoordinate< num_dimensions - 1, coordT > stir::cut_last_dimension ( const BasicCoordinate< num_dimensions, coordT > & c)
inline

make a shorter BasicCoordinate, by cutting the last element from c

References cut_last_dimension().

Referenced by cut_last_dimension(), and stir::coordinateTests::run_tests().

◆ cut_first_dimension()

template<int num_dimensions, typename coordT>
BasicCoordinate< num_dimensions - 1, coordT > stir::cut_first_dimension ( const BasicCoordinate< num_dimensions, coordT > & c)
inline

◆ convert_int_to_float()

template<int num_dimensions>
BasicCoordinate< num_dimensions, float > stir::convert_int_to_float ( const BasicCoordinate< num_dimensions, int > & cint)
inline