rpomponio / neuroHarmonize

Harmonization tools for multi-site neuroimaging analysis. Implemented as a python package. Harmonization of MRI, sMRI, dMRI, fMRI variables with support for NIFTI images. Complements the work in Neuroimage by Pomponio et al. (2019).
https://pypi.org/project/neuroHarmonize/
MIT License
77 stars 27 forks source link

Rounding after applyModelNIFTIs #51

Open zyeapp opened 3 weeks ago

zyeapp commented 3 weeks ago

Hi there,

is there a reason why there is a line of code that rounds the nifti outputs to integers?

nifti_out = nib.Nifti1Image(np.round(nifti_out).astype(np.int16), affine, header) #fix scaling issue

Because I'm working with images that are pretty low in intensity, and I'm afraid of losing small fluctuations that cannot be attributed to noise. I'm not sure what scaling issue this would fix.

Thanks!

rpomponio commented 3 weeks ago

Good question. I'm not sure the original reason behind rounding intensities. I'll have to dig deeper.

Thanks for raising this issue.