ENH: Added extension to the bids.json to get the 'extension' entity#405
ENH: Added extension to the bids.json to get the 'extension' entity#405yarikoptic wants to merge 1 commit intobids-standard:masterfrom
Conversation
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}.nii.gz", | ||
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}][_mod-{modality}]_{suffix<defacemask>}.nii.gz", | ||
| "sub-{subject}[/ses-{session}]/func/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_rec-{reconstruction}][_run-{run}][_echo-{echo}]_{suffix<bold>}.nii.gz", | ||
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}.{extension<nii.gz>}", |
There was a problem hiding this comment.
Problem is now you have to provide the extension. What if you did:
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}.{extension<nii.gz>}", | |
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}.nii.gz", | |
| "sub-{subject}[/ses-{session}]/anat/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{contrast}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}.{extension<nii|nii.gz>}", |
| }, | ||
| { | ||
| "name": "extension", | ||
| "pattern": "\\.((?:[^_/\\\\]+)+\\.?)$" |
There was a problem hiding this comment.
I think the only "second" extension we permit is .gz, and all extensions are alphabetical, at least for now. I'm not sure if things like surf.gii will be considered extensions, or just gii
| "pattern": "\\.((?:[^_/\\\\]+)+\\.?)$" | |
| "pattern": "\\.((?:[:Alpha:]+)(?:\\.gz)?)$" |
Haven't tested this regex thoroughly...
|
Probably best to hold off on this—I've got a branch going rewriting everything to use a DB. I'll probably rework the extension handling as I go through with that, but let's leave this open in case I forget. |
|
@yarikoptic the 0.9 branch drops |
|
Thank you Tal! |
|
@yarikoptic I'm not sure if this has been made redundant by 0.9.x, or if there are still changes in here that you'd like to see merged. Needs a merge/rebase if so. |
|
I think everything proposed here was added via 0.9 or other PRs, so I think we're good to close. But @yarikoptic can confirm. |
|
I can no longer tell ;) let's just close it and the issue will raise from the ashes if I sense that smth like this is still needed ;-) |
ATM just a proof of concept to fix #404
TODOs:
extensionsarg where applicable (e.g.get)