bids-apps / HCPPipelines

A BIDS App for minimal preprocessing using the HCP Pipelines
33 stars 30 forks source link

Limiting the images used for anatomical processing #43

Open pvelasco opened 5 years ago

pvelasco commented 5 years ago

From what I can see in the code, it looks like the HCPPipelines get all _T1w and _T2w images and feed them into the anatomical pipeline. However, it could be the case that a dataset has some _T1w or _T2w images that are not meant to be used in freesurfer.

For example, we have a user who collects T1-weighted fast spin-echoes (FSE) with high in-plane resolution and thick slices for anatomical ROI delineation. These only cover a small slab of the brain. Since they are anatomical images, I extract them in the anat/ folder and, since they are T1 weighted, I add the _T1w modality, so they are labeled sub-01_acq-fse_run-01_T1w.

When I run the pipelines, all the T1w images present in the anat/ folder are passed onto the pipelines, which tries to average all of them. The way they are averaged is by using the field of view that is common to all of them, and that is only the small slab covered in the FSE run, instead of using the whole brain covered by the MPRAGE (which is labeled sub-01_acq-highres_run-01_T1w).

Therefore, I think there should be a way of limiting which anatomical images are used by the pipelines.

This could be done by using only those images matching either a string in the filename or a label in the .json file (like the "IntendedFor" in the field maps). (Maybe this should be addressed by modifying the bids-specification?)

rhancockn commented 5 years ago

I think making use of the existing acq- and rec- labels provided in the BIDS spec is the way to go, and seems to be the intended purpose of these keys

For example this should be used when a study includes two T1w images - one full brain low resolution and and one restricted field of view but high resolution. In such case two files could have the following names: sub-01_acq-highres_T1w.nii.gz and sub-01_acq-lowres_T1w.nii.gz, however the user is free to choose any other label than highres and lowres as long as they are consistent across subjects and sessions

Perhaps a set of arguments to filter datasets would be useful: