cedalion.geometry package

Subpackages

Submodules

cedalion.geometry.landmarks module

class cedalion.geometry.landmarks.LandmarksBuilder1010(scalp_surface, landmarks)

Bases: object

Construct the 10-10-system on scalp surface based on Oostenveld and Praamstra [OP01].

Parameters:
  • scalp_surface (Surface) – a triangle-mesh representing the scalp

  • landmarks (DataArray) – positions of “Nz”, “Iz”, “LPA”, “RPA”

build()
plot()

cedalion.geometry.registration module

Registrating optodes to scalp surfaces.

cedalion.geometry.registration.register_icp(surface, landmarks, geo3d, niterations=1000, random_sample_fraction=0.5)
cedalion.geometry.registration.register_trans_rot(coords_target, coords_trafo)
cedalion.geometry.registration.register_trans_rot_isoscale(coords_target, coords_trafo)

cedalion.geometry.segmentation module

Funtionality to work with segmented MRI scans.

cedalion.geometry.segmentation.cell_coordinates(volume, flat=False)
cedalion.geometry.segmentation.surface_from_segmentation(segmentation_mask, segmentation_types, isovalue=0.9, fill_holes_in_mask=False)
Return type:

Surface

cedalion.geometry.utils module

cedalion.geometry.utils.m_rot(angles)

Calculate the affine transformation matrix for a 3D rotation.

R = Rz(alpha)Ry(beta)Rx(gamma)

https://en.wikipedia.org/wiki/Rotation_matrix#General_rotations

Return type:

ndarray

cedalion.geometry.utils.m_scale1(s)

Calculate the affine transformation matrix for scaling s.

Apply one scaling factor for all dimensions.

Return type:

ndarray

cedalion.geometry.utils.m_scale3(s)

Calculate the affine transformation matrix for scaling s.

Apply different scaling factors for each dimension.

Return type:

ndarray

cedalion.geometry.utils.m_trans(t)

Calculate the affine transformation matrix for a tranlation t.

Return type:

ndarray

Module contents

Tools for geometric calculations.