sina-mansour / UKB-connectomics

This repository will host scripts used to map structural and functional brain connectivity matrices for the UK biobank dataset.
https://www.biorxiv.org/content/10.1101/2023.03.10.532036v1
62 stars 7 forks source link

Mask dilation before running CSD #4

Closed sina-mansour closed 2 years ago

sina-mansour commented 2 years ago

Following on the suggestion by @Lestropie (this commit):

RS: Personally I often here dilate the mask prior to running CSD. DWI brain masks are often imperfect. If the mask is a little too generous, then you may perform CSD for a voxel that never gets utilised, in which case you are simply wasting CUP cycles. However if you fail to perform CSD for a voxel where you do in fact need the ODF(s), that's a bigger problem. The voxels for which you "need" CSD to be run is principally based on the 5TT segmentation. A problem arises if you have a location where the 5TT image suggests that tracking should be permitted, but no ODF was computed. It's worth checking a few exemplar subjects to see the likelihood of this being a problem. A common problematic area is the anterior MCP, which can be erroneously omitted from the DWI brain mask. Personally I often dilate the brain mask a couple of times for running CSD. (Though the problem would need to be sufficiently prevalent & severe to motivate deviating away from the simpler approach of simply using the provided brain mask as-is)

sina-mansour commented 2 years ago

Hi Rob,

It seems to be a good tradeoff of wasting a few CUP cycles at the cost of ensuring that ODF is computed for all regions where tracking is permitted. I'll update the script to first create a dilated brain mask prior to running CSD.

Thanks for your suggestion.

sina-mansour commented 2 years ago

Added a dilation using maskfilter command (here)

Upon visual inspection, the dilated mask does a better job at ensuring all cortical regions (especially close to the pial surface):

original mask: image

dilated: image

@Lestropie judging from the attached images, do you reckon 2 iterations are enough, or should we do more?

Lestropie commented 2 years ago

I've historically used three, but certainly didn't do an exhaustive optimisation.

In reality you don't need to exhaustively get all parenchyma: since ACT will terminate streamlines as soon as they cross the GM-WM interface, you only need to make sure that that is encapsulated, even missing a bit of cortex won't matter.

But this is part of why the anterior edge of the MCP is critical here in my experience. That's a WM-CSF interface, and if your mask misses some WM voxels you end up bisecting that bundle. And this can occur often due to susceptibility distortions. SO make sure to check that bundle on a few exemplar subjects.