STIR
6.2.0
|
Files | |
file | line_distances.h |
A few functions to compute distances between lines etc. | |
Functions | |
template<class coordT > | |
coordT | stir::coordinate_between_2_lines (CartesianCoordinate3D< coordT > &result, const LORAs2Points< coordT > &line0, const LORAs2Points< coordT > &line1) |
find a point half-way between 2 lines and their distance More... | |
template<class coordT > | |
coordT | stir::distance_between_line_and_point (const LORAs2Points< coordT > &line, const CartesianCoordinate3D< coordT > &r1) |
find the distance between a point and a line | |
template<class coordT > | |
void | stir::project_point_on_a_line (const CartesianCoordinate3D< coordT > &p1, const CartesianCoordinate3D< coordT > &p2, CartesianCoordinate3D< coordT > &r1) |
Project a point on a line. More... | |
Functions to compute distances between lines etc.
|
inline |
find a point half-way between 2 lines and their distance
The point is found by minimising the distance with both lines.
If the lines are parallel, the point returned is still valid, although it is of course not unique in practice.
References stir::inner_product(), and stir::square().
|
inline |
Project a point on a line.
References stir::inner_product().