kitchell / app-wmMask

This application will create a mask nifti file of the white matter of the T1 image using Freesurfer's aparc+aseg.mgz parcellation.
0 stars 1 forks source link

Register the mask to anatomy? #1

Open soichih opened 6 years ago

soichih commented 6 years ago

This App currently outputs mask registered to the freesurfer space (256x256x256). I believe most of Brianlife App that receives "mask" are expecting it to be in anatomy (t1/dwi) space instead. I've added "freesurfer" datatype tag for this App so that user can distinguish, but right now, I believe all "mask" datasets should be in the anatomy(t1/dwi)? space to be consistent across all Apps.

The ensembletracking App generates an output mask by doing the following ..

https://github.com/brain-life/app-ensembletracking/blob/master/convertfiles.sh#L18 mri_label2vol --seg $fsurfer/mri/aparc+aseg.mgz --temp $input_nii_gz --regheader $fsurfer/mri/aparc+aseg.mgz --o aparc+aseg_anat.nii.gz

Could/should this App be updated to do something similar? I am really not sure on what to do with mask when it comes to registration.. If you have any suggestions, or enlighten me with something basic that I am missing, please let me know.

kitchell commented 6 years ago

What you linked to is not a white matter mask, these are the wm masks: https://github.com/brain-life/app-ensembletracking/blob/master/convertfiles.sh#L26-L31

This code is the old code we used for ensemble tracking, so we can definitely update it. probably just use the lines linked above. I think the ones with _anat at the end are aligned to the t1, but brent will need to confirm.

soichih commented 6 years ago

I've talked to Brent, and he said that _anat is actually aligned to dwi for ensemble tracking, but since ensemble tracking uses dtiinit aligned dwi which is then aligned to the t1 - anatomy.

I am assuming that, most of our Apps (including dipy) that takes "neuro/mask" input datasets are expecting them to be in the dwi/t1 space - not freesurfer space. So I believe adding "freesurfer" datatype tags to masks that are in the freesurfer space is the correct way to make sure user won't accidentally use masks that are in the completely different space..

But this is an issue with most of our datatypes that we have; we need to make sure that input datasets are in the correct datatype as well as in correct coordinate space.. right?

kitchell commented 6 years ago

Sure, the freesurfer tag is fine, or we can change it to be aligned with the t1, or output both. I made this as an extra utility app, im not sure if any other app even uses the output, so I think we are free to do what makes the most sense.