nipreps / nibabies

fMRIPrep-Infants - A robust, transparent workflow tailored for neonate and infant MRI
https://nibabies.readthedocs.io/en/latest
Apache License 2.0
23 stars 10 forks source link

Verify default value for CIFTI subcortical volume smoothing #89

Open mgxd opened 3 years ago

mgxd commented 3 years ago

https://github.com/nipreps/nibabies/blob/8bcf2d7a7df8d8806722353000453cad2af7547b/nibabies/workflows/bold/alignment.py#L8

Original implementation

${SmoothingFWHM} / ( 2 ( sqrt ( 2 l ( 2 ) ) ) )

mgxd commented 3 years ago

pinging @ericfeczko

ericfeczko commented 2 years ago

Neither?

I wouldn't set the sigma directly, because the calculation for FWHM on a 2D surface involves a natural log. From a usability stand point it is also simpler without loss of generality -- one less parameter to control for and one less parameter for the user to consider. I'd use a volumetric parameter and have the object linked to a transform function that can warp between the two. Ours and freesurfer use two different conversions here.

Ours is the above, albeit written for unix's bc: FWHM/2 * 1/(sqrt(2(ln(2)) or 0.84932180028.

Alternatively, freesurfer used (might still use?) FWHM/2.36 as the conversion (2*sqrt(2(ln(2)))=2.354, they round up for some reason), which is a bit simpler -- this would give 0.84745762711

Hope this helps.

mgxd commented 2 years ago

what is the default Smoothing FWHM used in the dcan pipeline? 2?

ericfeczko commented 2 years ago

Good question. Spatial blurring is a pandora's box, its kind of a legacy so keep that in mind ;) See here: https://pubmed.ncbi.nlm.nih.gov/11707101/

and here: http://www.tina-vision.net/docs/memos/2003-011.pdf

I love citing TINA because TINA Is No Acronym :P

Typically, WashU and the groups I learned under at MGH recommended as little blurring as possible -- so I've always restricted it to the length of the voxel in question.

The default is 2, but that was set due to the resampled resolution of the bold data (2 mm isotropic) for ABCD/HCP.

Might be more scalable to just link it to the final voxel resolution for whatever is getting smoothed, but I'll defer to all 'yall on the decision.

Hope this helps :) this is an issue I've probably read far too much about.