-
Notifications
You must be signed in to change notification settings - Fork 169
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
[ENH] Add volspace entity for CIFTI files #1900
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1900 +/- ##
=======================================
Coverage 88.10% 88.10%
=======================================
Files 16 16
Lines 1396 1396
=======================================
Hits 1230 1230
Misses 166 166 ☔ View full report in Codecov by Sentry. |
TBH I don't like it very much (see https://github.com/bids-standard/bids-specification/pull/518/files#r447942761). I would rather revive #1165 than have two entities with such similar purposes. A space can refer to a dictionary of references (https://bids-specification.readthedocs.io/en/stable/derivatives/common-data-types.html#spatial-references), so you can already just make up a name and define it. Permitting |
I had hoped to use |
I see, the concern is parsing filenames in order to look up associated files in something like templateflow. That makes me think that metadata is probably the better way to go. What if you had something like {
"SpatialReference": {
"VolumeReference": "bids:MNIInfant:cohort-2/tpl-MNIInfant_cohort-2_res-1_T2w.nii.gz",
"CIFTI_STRUCTURE_CORTEX_LEFT": "bids:dhcpAsym:cohort-42/tpl-dhcpAsym_cohort-42_hemi-L_den-32k_white.surf.gii",
"CIFTI_STRUCTURE_CORTEX_RIGHT": "bids:dhcpAsym:cohort-42/tpl-dhcpAsym_cohort-42_hemi-R_den-32k_white.surf.gii"
}
} (I'm making up these filenames. They may not be right.) |
According to the spec, space values must be defined in the schema's list of coordinate spaces. I imagine we could have something in the spec/schema about parsing the space values, though it would make the validator a bit more complicated I assume. I'm fine switching to your proposal, but I'm a little worried about what the effects would be on downstream software (e.g., niworkflows, fMRIPrep, XCP-D). Adding new entities is straightforward, but changing how we structure space definitions might be tougher. Maybe I'm just not doing a good job of predicting the consequences. |
Reference? AFAIK this was never intended to be exhaustive but to provide common names for frequently-used spaces. |
https://bids-specification.readthedocs.io/en/stable/appendices/entities.html#space
|
Got it, thanks. That requirement was introduced in #734, and it appears to be for the sake of validating raw iEEG data (https://github.com/bids-standard/bids-validator/issues/743) and has been enforced for iEEG and EEG (https://github.com/bids-standard/bids-validator/pull/1190) only. It has been widely flouted in the derivatives context, at least. fMRIPrep, for example, has used spaces bids-specification/src/schema/rules/sidecars/derivatives/common_derivatives.yaml Lines 12 to 28 in 7b0f76d
This apparently doesn't have corresponding text, but it is what the schema validator is enforcing. The text I would write would be:
|
To summarize what I think the current state of the conversation is, we are going to try to support Additionally, in some cases, we will use surface template names as shorthand for specific surface-volume combinations. For example, I don't want to extend that to every surface-volume combination though. For example, if the onavg surface template folks prefer to combine it with MNI152NLin2009cAsym, I'd like to see that labeled as In any case, I guess I can close this in favor of #1926. |
This PR adds a
volspace
entity to describe the volumetric space in combined surface-volume derivative files (i.e., CIFTIs). The volspace entity comes from BEP011: Structural derivatives (#518).