Surface Transforms
Surface transforms.
- class nitransforms.surface.SurfaceCoordinateTransform(reference, moving)[source]
Represents surface transformations in which the indices correspond and the coordinates differ. This could be two surfaces representing difference structures from the same hemisphere, like white matter and pial, or it could be a sphere and a deformed sphere that moves those coordinates to a different location.
- class nitransforms.surface.SurfaceResampler(reference, moving, interpolation_method='barycentric', mat=None)[source]
Represents transformations in which the coordinate space remains the same and the indices change. To achieve surface project-unproject functionality:
sphere_in as the reference sphere_project_to as the moving
Then apply the transformation to sphere_unproject_from
- apply(x, inverse=False, normalize='element')[source]
Apply the transform to surface data.
- Parameters:
x (array-like, shape (..., nv1), or SurfaceMesh) – Data to transform or SurfaceMesh to resample
inverse (bool, default=False) – Whether to apply the inverse transform. If True,
x
has shape (…, nv2), and the output will have shape (…, nv1).normalize ({"element", "sum", "none"}, default="element") – Normalization strategy. If “element”, the scale of each value in the output is comparable to each value of the input. If “sum”, the sum of the output is comparable to the sum of the input. If “none”, no normalization is applied.
- Returns:
y – Transformed data.
- Return type:
array-like, shape (…, nv2)