Skip to content
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

no "IntendedFor" for "inplaneT[12]" #1825

Open
yarikoptic opened this issue May 16, 2024 · 1 comment
Open

no "IntendedFor" for "inplaneT[12]" #1825

yarikoptic opened this issue May 16, 2024 · 1 comment

Comments

@yarikoptic
Copy link
Collaborator

yarikoptic commented May 16, 2024

I never used such images so I did not know their nature. Those according to https://bids-specification.readthedocs.io/en/stable/glossary.html#inplanet1-suffixes are intended to be "matched to a functional (task) image". And indeed they are in example openneuro datasets:

(git)smaug:/tmp/openneuro-fuse[master]
$> function gimme() {find "$1" -iname "*$2" | head -n 1;}; for ds in ds*; do f=$(gimme $ds _inplane*.nii.gz); [ -z "$f" ] && continue; t12=$(gimme $ds _T[12]w.nii.gz); bold=$(gimme $ds _bold.nii.gz); echo "$ds:"; nibls $f $t12 $bold; done
zsh: correct 'nibls' to 'nib-ls' [nyae]? y
ds000001:
ds000001/sub-01/anat/sub-01_inplaneT2.nii.gz                              int16 [128, 128,  33]      1.56x1.56x4.00
ds000001/sub-01/anat/sub-01_T1w.nii.gz                                    int16 [160, 192, 192]      1.00x1.33x1.33
ds000001/sub-01/func/sub-01_task-balloonanalogrisktask_run-01_bold.nii.gz int16 [ 64,  64,  33, 300] 3.12x3.12x4.00x2.00

ds000002:
ds000002/sub-01/anat/sub-01_inplaneT2.nii.gz                                    int16 [128, 128,  25]      1.56x1.56x5.00        sform
ds000002/sub-01/anat/sub-01_T1w.nii.gz                                          int16 [160, 192, 192]      1.00x1.33x1.33
ds000002/sub-01/func/sub-01_task-deterministicclassification_run-01_bold.nii.gz int16 [ 64,  64,  25, 180] 3.12x3.12x5.00x2.00   sform

ds000003:
ds000003/sub-01/anat/sub-01_inplaneT2.nii.gz               int16 [128, 128,  33]      1.56x1.56x4.00
ds000003/sub-01/anat/sub-01_T1w.nii.gz                     int16 [160, 192, 192]      1.00x1.33x1.33
ds000003/sub-01/func/sub-01_task-rhymejudgment_bold.nii.gz int16 [ 64,  64,  33, 160] 3.12x3.12x4.00x2.00
... (more hits, didn't check)

# not always resolution is multiple:
ds001984:
ds001984/sub-0011/ses-01/anat/sub-0011_ses-01_run-01_inplaneT1.nii.gz       int16  [256, 256,  60]      0.86x0.86x2.00        sform
ds001984/sub-0011/ses-01/func/sub-0011_ses-01_task-cont_run-01_bold.nii.gz float32 [110, 110,  60, 122] 2.00x2.00x2.00x2.00   sform

we can see that number of slices in the inplane match bold and resolution is multiple of bold.

But if there is such a dependency between "inplane" of which we could have multiple for different bolds (imagine subject taken out and repositioned, so we need different inplane for different runs of bold) -- how would someone annotate what that inplane was created for?

IntendedFor sounds like a sensible approach but ATM it is only for fieldmaps AFAIK: https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetic-resonance-imaging-data.html#using-intendedfor-metadata

edit: note that if they were used quite often in the past, recently their use reduced according to openneuro datasets:
(git)smaug:/mnt/btrfs/datasets/datalad/crawl/openneuro[master]git
$> function gimme() {find "$1" -iname "*$2" | head -n 1;}; for ds in ds*; do f=$(gimme $ds _inplane*.nii.gz); [ -z "$f" ] && continue; t12=$(gimme $ds _T[12]w.nii.gz); bold=$(gimme $ds _bold.nii.gz); echo "$ds: $f $t12 $bold"; done

ds000001: ds000001/sub-01/anat/sub-01_inplaneT2.nii.gz ds000001/sub-01/anat/sub-01_T1w.nii.gz ds000001/sub-01/func/sub-01_task-balloonanalogrisktask_run-01_bold.nii.gz
ds000002: ds000002/sub-01/anat/sub-01_inplaneT2.nii.gz ds000002/sub-01/anat/sub-01_T1w.nii.gz ds000002/sub-01/func/sub-01_task-deterministicclassification_run-01_bold.nii.gz
ds000003: ds000003/sub-01/anat/sub-01_inplaneT2.nii.gz ds000003/sub-01/anat/sub-01_T1w.nii.gz ds000003/sub-01/func/sub-01_task-rhymejudgment_bold.nii.gz
ds000005: ds000005/sub-01/anat/sub-01_inplaneT2.nii.gz ds000005/sub-01/anat/sub-01_T1w.nii.gz ds000005/sub-01/func/sub-01_task-mixedgamblestask_run-01_bold.nii.gz
ds000006: ds000006/sub-01/ses-retest/anat/sub-01_ses-retest_inplaneT2.nii.gz ds000006/sub-01/ses-retest/anat/sub-01_ses-retest_T1w.nii.gz ds000006/sub-01/ses-retest/func/sub-01_ses-retest_task-livingnonlivingdecisionwithplainormirrorreversedtext_run-01_bold.nii.gz
ds000007: ds000007/sub-01/anat/sub-01_inplaneT2.nii.gz ds000007/sub-01/anat/sub-01_T1w.nii.gz ds000007/sub-01/func/sub-01_task-stopmanual_run-1_bold.nii.gz
ds000008: ds000008/sub-01/anat/sub-01_inplaneT2.nii.gz ds000008/sub-01/anat/sub-01_T1w.nii.gz ds000008/sub-01/func/sub-01_task-conditionalstopsignal_run-01_bold.nii.gz
ds000009: ds000009/sub-01/anat/sub-01_inplaneT2.nii.gz ds000009/sub-01/anat/sub-01_T1w.nii.gz ds000009/sub-01/func/sub-01_task-balloonanalogrisktask_bold.nii.gz
ds000011: ds000011/sub-01/anat/sub-01_inplaneT2.nii.gz ds000011/sub-01/anat/sub-01_T1w.nii.gz ds000011/sub-01/func/sub-01_task-Classificationprobewithoutfeedback_bold.nii.gz
ds000017: ds000017/sub-1/ses-timepoint1/anat/sub-1_ses-timepoint1_inplaneT2.nii.gz ds000017/sub-1/ses-timepoint1/anat/sub-1_ses-timepoint1_run-0_T1w.nii.gz ds000017/sub-1/ses-timepoint1/func/sub-1_ses-timepoint1_task-probabilisticclassification_run-01_bold.nii.gz
ds000051: ds000051/sub-01/anat/sub-01_run-01_inplaneT2.nii.gz ds000051/sub-01/anat/sub-01_run-01_T1w.nii.gz ds000051/sub-01/func/sub-01_task-abstractconcretejudgment_run-01_bold.nii.gz
ds000052: ds000052/sub-01/anat/sub-01_inplaneT2.nii.gz ds000052/sub-01/anat/sub-01_run-1_T1w.nii.gz ds000052/sub-01/func/sub-01_task-reversalweatherprediction_run-1_bold.nii.gz
ds000110: ds000110/sub-01/anat/sub-01_inplaneT2.nii.gz ds000110/sub-01/anat/sub-01_T1w.nii.gz ds000110/sub-01/func/sub-01_task-IncidentalencodingtaskusingPosnercueingparadigmwithobjectvgreeblejudgment_run-01_bold.nii.gz
ds000116: ds000116/sub-01/anat/sub-01_inplaneT2.nii.gz ds000116/sub-01/anat/sub-01_T1w.nii.gz ds000116/sub-01/func/sub-01_task-auditoryoddballwithbuttonresponsetotargetstimuli_run-01_bold.nii.gz
ds000122: ds000122/sub-01/anat/sub-01_inplaneT2.nii.gz  ds000122/sub-01/func/sub-01_task-visualattentiontask_run-01_bold.nii.gz
ds000217: ds000217/sub-Exp1s01/anat/sub-Exp1s01_inplaneT1.nii.gz ds000217/sub-Exp1s01/anat/sub-Exp1s01_T1w.nii.gz ds000217/sub-Exp1s01/func/sub-Exp1s01_task-localizer_bold.nii.gz
ds000255: ds000255/sub-01/ses-01/anat/sub-01_ses-01_inplaneT2.nii.gz ds000255/sub-01/ses-anat/anat/sub-01_ses-anat_T1w.nii.gz ds000255/sub-01/ses-01/func/sub-01_ses-01_task-viewFigure_run-03_bold.nii.gz
ds001246: ds001246/sub-01/ses-imageryTest01/anat/sub-01_ses-imageryTest01_inplaneT2.nii.gz ds001246/sub-01/ses-anatomy/anat/sub-01_ses-anatomy_T1w.nii.gz ds001246/sub-01/ses-imageryTest01/func/sub-01_ses-imageryTest01_task-imagery_run-01_bold.nii.gz
ds001506: ds001506/sub-01/ses-imagery01/anat/sub-01_ses-imagery01_inplaneT2.nii.gz ds001506/sub-01/ses-anatomy/anat/sub-01_ses-anatomy_T1w.nii.gz ds001506/sub-01/ses-imagery01/func/sub-01_ses-imagery01_task-imagery_run-01_bold.nii.gz
ds001972: ds001972/sub-0008/ses-01/anat/sub-0008_ses-01_run-01_inplaneT1.nii.gz ds001972/sub-0008/ses-01/anat/sub-0008_ses-01_run-01_T1w.nii.gz
ds001978: ds001978/sub-0011/ses-01/anat/sub-0011_ses-01_run-01_inplaneT1.nii.gz ds001978/sub-0045/ses-01/anat/sub-0045_ses-01_run-01_T1w.nii.gz ds001978/sub-0011/ses-01/func/sub-0011_ses-01_task-dispAtt_run-01_bold.nii.gz
ds001984: ds001984/sub-0011/ses-01/anat/sub-0011_ses-01_run-01_inplaneT1.nii.gz  ds001984/sub-0011/ses-01/func/sub-0011_ses-01_task-cont_run-01_bold.nii.gz
ds003430: ds003430/sub-01/ses-attention01/anat/sub-01_ses-attention01_inplaneT2.nii.gz ds003430/sub-01/ses-anatomy/anat/sub-01_ses-anatomy_T1w.nii.gz ds003430/sub-01/ses-attention01/func/sub-01_ses-attention01_task-attentionNaturalTestImage_run-01_bold.nii.gz
ds003661: ds003661/sub-01/ses-testCategory01/anat/sub-01_ses-testCategory01_inplaneT2.nii.gz ds003661/sub-01/ses-anatomy/anat/sub-01_ses-anatomy_T1w.nii.gz ds003661/sub-01/ses-testCategory01/func/sub-01_ses-testCategory01_task-testCategory_run-01_bold.nii.gz
ds003993: ds003993/sub-04/ses-perceptionArtificialImage01/anat/sub-04_ses-perceptionArtificialImage01_inplaneT2.nii.gz  ds003993/sub-04/ses-perceptionArtificialImage01/func/sub-04_ses-perceptionArtificialImage01_task-perceptionArtificialImage_run-01_bold.nii.gz
ds004670: ds004670/sub-S1/ses-FMD01/anat/sub-S1_ses-FMD01_inplaneT2.nii.gz ds004670/sub-S1/ses-anatomy/anat/sub-S1_ses-anatomy_T1w.nii.gz ds004670/sub-S1/ses-FMD01/func/sub-S1_ses-FMD01_task-FMD_run-01_bold.nii.gz
ds005012: ds005012/sub-02/ses-1/anat/sub-02_ses-1_inplaneT1.nii.gz ds005012/derivatives/fmriprep_v23.1.4/sub-02/anat/sub-02_desc-preproc_T1w.nii.gz ds005012/derivatives/fmriprep_v23.1.4/sub-02/ses-1/func/sub-02_ses-1_task-mid_run-01_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz
@Lestropie
Copy link
Collaborator

Commenting due to reference from bids-standard/bids-2-devel#53.

I've not noticed these suffices myself either. A natural extension of the logic of this comment in bids-standard/bids-2-devel#53 is that these suffices shouldn't exist. The fundamental contrast content in the images---which is what the suffix should ideally capture---is T1w / T2w; their difference to more common isotropic anatomical images is 1. voxel anisotropy and 2. intent of application. But jamming such information into the suffix may not be ideal. I'm also cognizant of the prospect of a BIDS App that takes a conventional high-resolution anatomical image, and computes a high-resolution in-plane thick-slice version of that image that aligns with the pre-processed fMRI series following registration; assigning a different suffix to such an image just because it's been re-gridded differently strikes me personally as unusual. This is all BIDS 2.0 though.

For BIDS 1, it occurs to me that what this suffix is doing is something akin to the space entity. The "spatial reference to which a file has been aligned" is here a radiological alignment rather than a pre-processing one, and the voxel grid correspondence is not exact (same # slices & slice thickness, different in-plane resolution), but it almost fits the bill. Question is whether including the space entity for such a file would be considered an adequately robust link to the corresponding fMRI series, or whether a full filesystem path, potentially via extending the scope of "IntendedFor", would be better. I'd be supportive of the latter, even if I'd prefer that such relationships be encoded altogether differently in BIDS2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants