We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.tfm
.mat
.h5
Permit calling load without fmt argument and still use the right loader.
load
fmt
The text was updated successfully, but these errors were encountered:
I think .mat is also common for FSL and SPM affines, so I would have a look at:
https://github.com/nipy/nibabel/blob/65d5fc61545f55a50a45a07fbbaeb99c2dbe6bbb/nibabel/loadsave.py#L48-L53
Each class can provide a method:
def path_maybe_image(cls, fname, sniff=None): if sniff is None or len(sniff) < cls.sniff_size: with open(fname, 'rb') as fobj: sniff = fobj.read(cls.sniff_size) is_valid = ... # some check return is_valid, sniff
It defines a sniff_size class variable and some criterion to determine whether it's valid.
sniff_size
Sorry, something went wrong.
enh: guess open linear transform formats
b692390
EAFP implementation of loading linear transforms without specifying the format of the file. Resolves: #86. Resolves: #87. Resolves: #107.
oesteban
Successfully merging a pull request may close this issue.
Permit calling
load
withoutfmt
argument and still use the right loader.The text was updated successfully, but these errors were encountered: