-
Notifications
You must be signed in to change notification settings - Fork 532
[RTM] Support GIFTI outputs in SampleToSurface #1886
New issue
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
Conversation
fac6c4f
to
839e250
Compare
Codecov Report
@@ Coverage Diff @@
## master #1886 +/- ##
==========================================
- Coverage 70.94% 70.92% -0.03%
==========================================
Files 1057 1057
Lines 53142 53164 +22
Branches 7699 7709 +10
==========================================
+ Hits 37703 37705 +2
- Misses 14065 14096 +31
+ Partials 1374 1363 -11
Continue to review full report at Codecov.
|
I've done some playing, and Also, |
I guess one issue here is that, currently, setting output type allows you to get away with non-matching names. Here, setting the target type to So if this change is to be accepted, I should notify users. Would something in the interface docstring, trait description, or a runtime check for output filename and target type |
We can throw an error in format_args if the type and extensions are inconsistent. Nothing good can come out of such combinations. BTW is |
For the error, I'd say a warning if they mismatch, an error if they mismatch and the extension belongs to a supported type. There are some extension-less FreeSurfer files, and catching all of those could be tricky. |
sounds good to me |
Error if extension is associated with a known file type Warn if extension is unknown
if there are no other changes requested, this looks good to me. feel free to merge. |
This PR creates "implicit" output types for Freesurfer utilities, where no explicit
--out_type
is supported, but a filename with the associated extension will be correctly produced as that type.At present, I've only tested this with GIFTI on
mri_vol2surf
. I expectmri_surf2surf
will have the same level of support. I also suspect that any of themris_convert
outputs would work fine.Note that
.gii.gz
actually produces a.mgz
file with.gii.gz
extension, and so any additional output types need to be checked for correctness. Similarly, not all files seem to produce a correct GIFTI; for example,--srchit test.gii
produces a valid GIFTI file with completely different data.