nipy / nitransforms

a standalone fork of nipy/nibabel#656
https://nitransforms.readthedocs.io
MIT License
28 stars 15 forks source link

Transforms should implement an `ndim` property #196

Closed oesteban closed 2 months ago

oesteban commented 3 months ago

Something like:

>>> from nitransforms import linear
>>> linear.Affine().ndim
3

(only one timepoint)

>>> from nitransforms import linear
>>> linear.LinearTransformsMapping().ndim
4

In the future, we can imagine two more use cases:

>>> from nitransforms import linear
>>> linear.ComplexAffine().ndim
4

(only one timepoint)

>>> from nitransforms import linear
>>> linear.ComplexLinearTransformsMapping().ndim
5

cc/ @jmarabotto

oesteban commented 3 months ago

We just realized they do. So this is going to be changed a little: