You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nifti1Header.get_xyzt_units is entirely based on the bitfield as it is implemented in nifti1.h. Attempting to generalize it to Minc (#1098) requires reducing the available information, specifically raising a ValueError if the spatial axes have different units.
I think it makes sense to keep this interface which will be mostly useful, but we could start by generalizing, e.g.,
It's more that the upside of having get_xyzt_units() is that you might want a single spatial unit and allow it to raise an exception if it can't be satisfied by the file. Having that check implemented in a single place reduces the odds that a caller gets the check wrong or two different callers might choose different exception types for the same problem.
Nifti1Header.get_xyzt_units
is entirely based on the bitfield as it is implemented in nifti1.h. Attempting to generalize it to Minc (#1098) requires reducing the available information, specifically raising aValueError
if the spatial axes have different units.I think it makes sense to keep this interface which will be mostly useful, but we could start by generalizing, e.g.,
And keep the old behavior:
OTOH, maybe with
get_units()
,get_xyzt_units()
is redundant and can be deprecated.Thoughts?
The text was updated successfully, but these errors were encountered: