raamana / graynet

Subject-wise networks from structural MRI, both vertex- and voxel-wise features (thickness, GM density, curvature, gyrification)
https://raamana.github.io/graynet/
MIT License
35 stars 7 forks source link

Error for volumetric stream: Mismatch in Voxel-Wise Correspondence #62

Closed dpiccolomd closed 5 months ago

dpiccolomd commented 1 year ago

Dear Pradeep, I'm encountering an issue while processing a volumetric stream using graynet after CAT12. The specific problem arises when trying to run the following command:

graynet -s subjects_ids.txt -f spm_cat_gmdensity -i ./CAT -w manhattan -a cat_lpba40 -o ./graynet -c 6

I have a list of patients correctly processed via CAT12 for cobra, lpba40, neuromorphometrics, suit, thalamic_nuclei, and thalamus atlases

I receive the following error message:

ValueError: Subject features and membership (group labels) differ in length or shape! This may happen if volumes for atlas and subject differ in size/dimensions. Ensure all the subjects have voxel-wise correspondence with the atlas

Upon investigation, I noticed that my mwp1$subj.nii files have dimensions 113x137x113 and voxel size 1.500x1.500x1.500, which do not match the dimensions 121x145x121 of the cat_lpba40 atlas.

Version: graynet 0.5.6 CAT12.8.2 (r2159) from 2022-12-07

Is there a way to correct this discrepancy in voxel-wise correspondence?

Thank you for your time.

raamana commented 1 year ago

Hi Daniele, graynet itself doesn't offer a way to correct this, as it is beyond its scope, and also because there may be choices to be made and questions to be answered when resampling the data. This is best taken care of by the user itself, depending on their specific goals and the type of features they are processing.

if there is nothing too complicated about the data, you can simply use FSL or CAT or another image processing to resample the atlas or the subject images to matching sizes, and then rerun graynet. Does that help?