fastpli.objects.fibers.FiberBundles
- class FiberBundles(data=None, layers=None, dtype=None)[source]
 Bases:
objectMethods
Appends FiberBundle
Applies function to fibers
Applies function to fibers positions
Applies function to fibers radii
Returns copy data as list(list(np.array))
Cast objects into new type
deep copy of class
Cut fiber into voi.
Cut fiber into voi.
Extends FiberBundle
Rotates fiber_bundles around offset
Rescales fiber_bundles
Translates fiber_bundles
Attributes
dtypeReturns layer properties of fiber_bundles
- apply(fun)[source]
 Applies function to fibers
- Parameters
 fun (function)
- Returns
 res – fun(fiber_bundles)
- Return type
 
- apply_to_points(fun)[source]
 Applies function to fibers positions
- Parameters
 fun (function)
- Returns
 res – fun(fiber_bundles[…].points)
- Return type
 
- apply_to_radii(fun)[source]
 Applies function to fibers radii
- Parameters
 fun (function)
- Returns
 res – fun(fiber_bundles[…].radii)
- Return type
 
- as_array()[source]
 Returns copy data as list(list(np.array))
- Returns
 res – fiber bundle as list(list(np.array))
- Return type
 [[(n,4)-array]]
- cast(dtype)[source]
 Cast objects into new type
- Parameters
 dtype (type)
- Returns
 res – fiber_bundles
- Return type
 
- cut(voi)[source]
 Cut fiber into voi. The cutting process can create multiple fibers. It checks every fiber_segment_aabb if it overlapps with the voi.
- Parameters
 voi ([xmin, ymin, zmin],[xmax,ymax,zmax]) – Volume of interest of which fibers to include. E.g. same as in Simulation
- Returns
 res – cutted fiber_bundles
- Return type
 
- cut_sphere(radius, center=(0, 0, 0))[source]
 Cut fiber into voi. The cutting process can create multiple fibers. It checks every fiber_segment_aabb if it overlapps with the voi.
- Parameters
 radius (float) – radius of cutting sphere
center (3d-array) – center of cutting sphere
- Returns
 res – cutted fiber_bundles
- Return type
 
- property layers
 Returns layer properties of fiber_bundles
- Returns
 res – [Layers] class containing [Layer]. The element position corresponds to FiberBundle index
- Return type
 [Layers]
- rotate(rot, offset=None)[source]
 Rotates fiber_bundles around offset
- Parameters
 fiber_bundles ([[(,4)-array, …]]) – list of fibers
rot ((3,3)-array_like) – rotation matrix
offset (3d-array-array_like, optional) – offset for rotation center
- Returns
 res – rotated fiber_bundles
- Return type
 
- scale(scale, mode='all')[source]
 Rescales fiber_bundles
- Parameters
 scale (float) – scale factor
mode (str, optional) – ‘all’, ‘points’ or ‘radii’ will be scaled
- Returns
 res – scaled fiber_bundles
- Return type