meegpype.interfaces.custom.fit_surface moduleπ
- class meegpype.interfaces.custom.fit_surface.FitSurfaceToMask(from_file=None, resource_monitor=None, ignore_exception=False, **inputs)π
Bases:
BaseInterfaceFit a deformable spherical template to the boundary of a mask.
An icosahedron enclosing the mask is shrunk until it reaches the iso-surface of the signed distance to the mask at
offsetmm, while a smoothing term keeps the mesh regular. The surface keeps the topology of MNEβs icosahedron, so it can be used directly withmne.make_bem_model(ico=...).- Mandatory Inputs:
in_mask (a string or os.PathLike object referring to an existing file) β The path to a binary mask volume (any non-zero voxel is in the mask).
in_reference (a string or os.PathLike object referring to an existing file) β The path to a FreeSurfer volume of the subject (e.g. T1.mgz), used to express the surface in FreeSurfer surface RAS coordinates.
output_surface (a string or os.PathLike object) β The path to the output surface mesh.
- Optional Inputs:
ico (an integer) β Subdivision of the icosahedron used as template (4 = 5120 triangles). (Nipype default value:
4)n_iterations (an integer) β Maximum number of deformation iterations. (Nipype default value:
1000)offset (a float) β Distance (mm) between the mask boundary and the fitted surface. Positive values place the surface outside the mask. (Nipype default value:
0.0)
- Outputs:
output_surface (a string or os.PathLike object referring to an existing file) β The path to the output surface mesh.
- meegpype.interfaces.custom.fit_surface.fit_surface_to_mask(in_mask, in_reference, offset=0.0, ico=4, n_iterations=1000)π
Fit an icosahedral surface to the iso-surface at
offsetmm of a mask.Returns the vertices (FreeSurfer surface RAS, mm), the triangles and the volume info of the reference volume.