This package contains definitions for the geometric primitives in use in phantomas.
This module contains the definition of FiberSource, which is a continuous representation of a fiber. All the fibers created are supposed to connect two cortical areas. Currently, the only supported shape for the “cortical surface” is a sphere.
A FiberSource is a continuous representation of a fiber trajectory,
The trajectory is modeled by 3 piecewise polynomials (one for each dimension). Note that the fiber is connecting two end points on the “cortical surface”. The construction makes sure that the tangents to the fiber are normal to this surface.
Parameters :  control_points : arraylike shape (nb_points, 3)
tangents : optional, default = ‘symmetric’
scale : optional, default = 1.0


Methods
curvature(ts)  Evaluates the curvature of the fiber at given positions. 
interpolate(ts)  From a FiberSource, which is a continuous representation, to a 
tangents(ts)  Get tangents (as unit vectors) at given timesteps. 
Evaluates the curvature of the fiber at given positions. The curvature is computed with the formula
Parameters :  ts : arraylike, shape (N, )


Returns :  curvatures : arraylike, shape (N, )

From a FiberSource, which is a continuous representation, to a Fiber, a discretization of the fiber trajectory.
Parameters :  ts : arraylike, shape (N, )


Returns :  trajectory : arraylike, shape (N, 3)

Get tangents (as unit vectors) at given timesteps.
Parameters :  ts : arraylike, shape (N, )


Returns :  tangents : arraylike, shape (N, 3)

Model definition for the fibers geometry. A Fiber is a discrete representation of a white matter fiber bundle.
A Fiber is a cylindrical shape wrapped around a discrete curve in 3D, represented by its discretization over a certain number of points.
Parameters :  mode : ‘from_points’ points : arraylike, shape (N, 3)
tangents : arraylike, shape (N, 3)
radius : double


Methods
get_nb_points()  Gets the number of points over which the center line is defined. 
get_points()  Gets the points of the fiber bundle centerline. 
get_radius()  Gets the radius of the fiber bundle. 
intersects_bounding_box(bounding_box_extents)  Computes logical intersection between current instance and given bounding box. 
save_to_file(index[, path])  Saves the fiber trajectory to a text file. 
set_radius(radius)  Sets the radius of the fiber bundle. 
Gets the number of points over which the center line is defined.
Returns :  nb_points : int 

Gets the points of the fiber bundle centerline.
Returns :  points : arraylike, shape (N, 3) 

Gets the radius of the fiber bundle.
Returns :  radius : double 

Computes logical intersection between current instance and given bounding box.
Parameters :  bounding_box_extents : tuple


Returns :  intersects : bool 
Saves the fiber trajectory to a text file.
Parameters :  index : int
path : string


Sets the radius of the fiber bundle.
Parameters :  radius : double 

An IsotropicRegion is a spherical region defined by its radius and center. It usually defines a region of rapid diffusivity, modelling a cerebrospinal fluidfilled region, such as ventricle.
Parameters :  radius : double center : arraylike, shape (3, )


Methods
get_center() 


get_radius() 

Returns :  center : arraylike, shape (3, )


Returns :  radius : double

