STIR 6.5.0
Items related to simple geometric calculations
Collaboration diagram for Items related to simple geometric calculations:

Files

file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/geometry/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
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.

Detailed Description

Functions to compute distances between lines etc.

Function Documentation

◆ coordinate_between_2_lines()

template<class coordT>
coordT stir::coordinate_between_2_lines ( CartesianCoordinate3D< coordT > & result,
const LORAs2Points< coordT > & line0,
const LORAs2Points< coordT > & line1 )
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 coordinate_between_2_lines(), inner_product(), and square().

Referenced by coordinate_between_2_lines().

◆ distance_between_line_and_point()

template<class coordT>
coordT stir::distance_between_line_and_point ( const LORAs2Points< coordT > & line,
const CartesianCoordinate3D< coordT > & r1 )
inline

find the distance between a point and a line

References distance_between_line_and_point(), inner_product(), and square().

Referenced by distance_between_line_and_point().

◆ project_point_on_a_line()

template<class coordT>
void stir::project_point_on_a_line ( const CartesianCoordinate3D< coordT > & p1,
const CartesianCoordinate3D< coordT > & p2,
CartesianCoordinate3D< coordT > & r1 )
inline

Project a point on a line.

Author
Nikos Efthimiou

References inner_product(), and project_point_on_a_line().

Referenced by project_point_on_a_line().