Base
Common interface for transforms.
- classnitransforms.base.ImageGrid(image)[source]
Class to represent spaces of gridded data (images).
- propertyaffine
Access the indexes-to-RAS affine.
- propertyheader
Access the original reference’s header.
- propertyinverse
Access the RAS-to-indexes affine.
- propertyndcoords
List the physical coordinates of this gridded space samples.
- propertyndindex
List the indexes corresponding to the space grid.
- classnitransforms.base.SampledSpatialData(dataset)[source]
Represent sampled spatial data: regularly gridded (images) and surfaces.
- propertyndcoords
List the physical coordinates of this sample.
- propertyndim
Access the number of dimensions.
- propertynpoints
Access the total number of voxels.
- propertyshape
Access the space’s size of each dimension.
- classnitransforms.base.SurfaceMesh(dataset)[source]
Class to represent surface meshes.
- check_sphere(tolerance=1.001)[source]
Check sphericity of surface.Based onhttps://github.com/Washington-University/workbench/blob/7ba3345d161d567a4b628ceb02ab4471fc96cb20/src/Files/SurfaceResamplingHelper.cxx#L503
- classnitransforms.base.TransformBase(reference=None)[source]
Abstract image class to represent transforms.
- apply(*args,**kwargs)[source]
Apply the transform to a dataset.
Deprecated. Please use
nitransforms.resampling.applyinstead.
- map(x,inverse=False)[source]
Apply\(y = f(x)\).
TransformBase implements the identity transform.
- Parameters:
x (N x D numpy.ndarray) – Input RAS+ coordinates (i.e., physical coordinates).
inverse (bool) – If
True, apply the inverse transform\(x = f^{-1}(y)\).
- Returns:
y – Transformed (mapped) RAS+ coordinates (i.e., physical coordinates).
- Return type:
N x D numpy.ndarray
- propertyndim
Access the dimensions of the reference space.
- propertyreference
Access a reference space where data will be resampled onto.