Wednesday, February 26, 2020

when making QC (or most any) images, don't mask the brain ...

Some preprocessing pipelines/programs mask out the space around the brain, while others don't. Masking makes the files a bit smaller and a lot neater looking, but also makes it harder to spot artifacts or other errors, as was highlighted for me just now when comparing results across pipelines.

These two images are from button-pressing (positive control; should have a hot "blob" of left hand motor-ish activity) GLMs for the same person, two different tasks (Axcpt and Cuedts), three different sessions (B, P, R). All tasks are performed within each session, but each session is collected on a different day - the two B from the same day, the two P, etc. These two sets of images are the same, but from two different pipelines:


Spot the error? There was a coil error on the day the P ("proactive") session was acquired, which is much easier to spot in the second (non-masked fmriprep) output. Those were GLM results; here's how it looks in the standard deviation images (standard deviation of each voxel over all the frames in each run), from each pipeline, for the (problematic) proactive session:



It's clear in both versions that something went wrong, but MUCH easier to see the artifact when the brain has not been masked.

For completeness, here's the surface version of the standard deviation from fmriprep preprocessing; I don't have the HCP pipeline version handy at the moment but expect it to look similar. Brain masking is of course not optional for surfaces so we can't look "around" the brain, but the "striping" pattern is abnormal in this image (reflecting the artifact instead of the brain structure).


I've often recommended against masking the brain in working files to make artifacts and oddities easier to spot, but the difference masking makes in this case is especially striking. (And this session will not be included in any real analyses!)

2 comments:

  1. In the HCP, we spent a fair amount of effort on the collection side, regularly running phantoms and coil checks ("almost daily", https://doi.org/10.1016/j.neuroimage.2013.05.077), quick rating of structurals to decide whether to rescan, and much of our QC is done before processing (long before task modeling), and not included in the processing pipeline code itself (and given the number of subjects and data resolution, we also needed to conserve space). Unfortunately, I don't know how much of our QC process is publicly available code, and yes, improvements could be made for handling less-curated data.

    ReplyDelete
    Replies
    1. This post isn't intended as a criticism of the HCP but as a more general warning: some artifacts/errors are MUCH easier to catch without brain masking, so if you have unavoidably masked data and/or surfaces, be extra careful to look for patterns like the striping in these examples.

      Delete