aimsalgo  5.1.2
Neuroimaging image processing
geometry.h File Reference
#include <stdlib.h>
Include dependency graph for geometry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Angle between 2 lines in radians.

Get the angle between two lines which you give one direction vector.

The returned value is expressed in radians and is between 0 and PI/2.

Parameters
v1the direction of the first line
v2the direction of the second line
float Aims2VectorsAngle (const AimsVector< float, 3 > &v1, const AimsVector< float, 3 > &v2)
 
Angle between 2 vectors in radians.

Get the angle between two vectors.

The returned value is expressed in radians and is between 0 and PI.

Parameters
v1the first vector
v2the second vector
float Aims2LinesAngle (const AimsVector< float, 3 > &v1, const AimsVector< float, 3 > &v2)
 
Generating trieder.

Get a random orthonormal trieder from one of its axis.

Parameters
v1one axis of the trieder
Trieder AimsOrthonormalTrieder (const AimsVector< float, 3 > &v1)
 
Cylinder.

Return true if a point is inside a cylinder.

Parameters
pthe point to test
p0a central point of one of both bases of the cylinder
dirunit direction or axis of the cylinder (direction is important)
radiusradius of the cylinder
lengthlength of the cylinder
bool AimsIsInCylinder (const AimsVector< float, 3 > &p, const AimsVector< float, 3 > &p0, const AimsVector< float, 3 > &dir, float radius, float length)
 
Torus.

Return true if a point is inside a torus.

Parameters
pthe point to test
p0center of the torus
axemain axis of the torus
Radiusgreatest radius of the torus
radiussmallest radius of the torus
dirpointer where the unit vector of the direction at point p is stored
bool AimsIsInTorus (const AimsVector< float, 3 > &p, const AimsVector< float, 3 > &p0, const AimsVector< float, 3 > &axe, float Radius, float radius, AimsVector< float, 3 > *dir=NULL)
 
Cube.

Return true if a point is inside a cube.

Parameters
pthe point to test
p0the inferior vertex
p1the superior vertex
bool AimsIsInCube (const AimsVector< float, 3 > &p, const AimsVector< float, 3 > &p0, const AimsVector< float, 3 > &p1)
 
Parallelepipede.

Return true if a point is inside a parallelepipede.

Parameters
pthe point to test
p0one of the different verteces of the parallelepipede
v1one unit vector that is an edge of the parallelepipede
v2another perpendicular unit vector that is an edge of the parallelepipede
L1length of the first edge associated to v1
L2length of the second edge associated to v2
L3length of the third edge associated to v1^v2
bool AimsIsInParallelepipede (const AimsVector< float, 3 > &p, const AimsVector< float, 3 > &p0, const AimsVector< float, 3 > &v1, const AimsVector< float, 3 > &v2, float L1, float L2, float L3)
 

Function Documentation

◆ Aims2LinesAngle()

float Aims2LinesAngle ( const AimsVector< float, 3 > &  v1,
const AimsVector< float, 3 > &  v2 
)

◆ Aims2VectorsAngle()

float Aims2VectorsAngle ( const AimsVector< float, 3 > &  v1,
const AimsVector< float, 3 > &  v2 
)

◆ AimsIsInCube()

bool AimsIsInCube ( const AimsVector< float, 3 > &  p,
const AimsVector< float, 3 > &  p0,
const AimsVector< float, 3 > &  p1 
)

◆ AimsIsInCylinder()

bool AimsIsInCylinder ( const AimsVector< float, 3 > &  p,
const AimsVector< float, 3 > &  p0,
const AimsVector< float, 3 > &  dir,
float  radius,
float  length 
)

◆ AimsIsInParallelepipede()

bool AimsIsInParallelepipede ( const AimsVector< float, 3 > &  p,
const AimsVector< float, 3 > &  p0,
const AimsVector< float, 3 > &  v1,
const AimsVector< float, 3 > &  v2,
float  L1,
float  L2,
float  L3 
)

◆ AimsIsInTorus()

bool AimsIsInTorus ( const AimsVector< float, 3 > &  p,
const AimsVector< float, 3 > &  p0,
const AimsVector< float, 3 > &  axe,
float  Radius,
float  radius,
AimsVector< float, 3 > *  dir = NULL 
)

◆ AimsOrthonormalTrieder()

Trieder AimsOrthonormalTrieder ( const AimsVector< float, 3 > &  v1)