NBCLab / power-replication

A replication and extension of Power et al. (2018)
https://www.overleaf.com/read/swgjxcjqytxg
Apache License 2.0
2 stars 0 forks source link

Transformed BOLD-space/resolution masks look bad #12

Closed tsalo closed 2 years ago

tsalo commented 3 years ago

Obviously moving to BOLD resolution is going to decrease the quality of masks, but this is beyond what I was expecting! 😨

The ASEG file

image

The GM mask

image

The code

Here's the transform application code:

xfm = nit.linear.load(
    "sub-04570_task-rest_from-T1w_to-scanner_mode-image_xfm.txt", 
    fmt="itk",
)
boldspace_aseg_img = xfm.apply(
    spatialimage="sub-04570_desc-aseg_dseg.nii.gz", 
    reference="sub-04570_task-rest_echo-1_space-scanner_desc-partialPreproc_bold.nii.gz", 
    order=0,
    mode="nearest",
    prefilter=False,
)
boldspace_gm_probseg_img = xfm.apply(
    spatialimage="sub-04570_label-GM_probseg.nii.gz", 
    reference="sub-04570_task-rest_echo-1_space-scanner_desc-partialPreproc_bold.nii.gz", 
    order=0,
    mode="nearest",
)
tsalo commented 3 years ago

It looks like downsampling before applying the transform works best (instead of doing both at once), based on the test below where I applied the transform to the T1w-space, T1w-resolution ASEG image vs. the T1w-space, BOLD-resolution one.

image

I'm just not sure how best to downsample the T1w-resolution images, since nilearn.image.resample_img requires the target affine, which I'm not sure how to calculate.

tsalo commented 2 years ago

3dresample allows you to feed in target voxel sizes without figuring out the affine or anything, so I think I will try that next.

tsalo commented 2 years ago

I tried out six different cortical ribbon segmentation workflows on five CamCAN participants to see which one performs best. To be honest, the results look equivalent for all of the T1w-resolution-based approaches and all of the BOLD-resolution-based approaches. The BOLD-resolution-based ones look better overall, though sub-CC722216 doesn't look good. I'm thinking that my initial test just caught a bad subject... although I'm still concerned about the WM and CSF masks, which the methods say are done in T1w-resolution and then downsampled.

sub-CC722216

sub-CC722216

sub-CC520673

sub-CC520673

sub-CC520552

sub-CC520552

sub-CC420226

sub-CC420226

sub-CC220284

sub-CC220284

tsalo commented 2 years ago

I plotted the calculated T1w-space analysis segmentations for five random CamCAN subjects. They look good, so I think I will just move forward with the masks as-is.

image