Open JiaBob opened 2 years ago
Hi @JiaBob , it seems there there were no responses for a long time. But, my 2 cents on the issue is that prrobably the registration algorithm is failing. This can happen for many reasons and it is hard to debug or give instructions without seeing your nifti files. However, one guess could be that maybe the nifti headers are incorrectly set in your input or template files.
Hi @ofgulban , I wish to add to this issue in order to not create a similar one, but I think I have the same issue.
I'm using pydeface 2.0.0, on child MRI data (T1w, T2w). With the default templates (facemask.nii.gz and mean_reg2mean.nii.gz) it gives me cropped brain on the frontal part. I assumed that the template data was from adult scans, so I used child templates provided by NIST : https://nist.mni.mcgill.ca/pediatric-atlases-4-5-18-5y/ . But instead of a facemask, they give a brainmask, which still crops a little because the mask is smaller.
Unable to find a child facemask yet, I wanted to use yours, but with a T1w child template from NIST. If i open data on the BrainVISA Anatomist tool (https://brainvisa.info/web/) , i seem to get proper origin registration:
Here's the NIST T1w template fused with your facemask :
No brain part is cropped.
Here's my data fused with your facemask (as the NIST brainmask still crops) :
Still alright.
But when I run the pydeface with the NIST T1w template and your facemask on my data, I get this :
I assume that the registration is not properly done, and the fused Anatomist image is misleading.
Do you have an idea on how to perform a proper registration (SPM ?) beforehand, in order to properly set the origin of the images ?
I checked the https://github.com/nipy/quickshear tool in order to expand a bit the threshold, but it failed directly because images didn't have the same shape and something else (I guess that tool was really basic without registration)
Thanks Robin
I use this command to run defacing:
pydeface [my data] --template pydeface/data/mean_reg2mean.nii.gz --facemask pydeface/data/facemask.nii.gz
It runs a long time and I got the output below. It seems that the registration was wrong. Do you know how can I solve this? Which template and mask should I use? Thank you!![image](https://user-images.githubusercontent.com/18398440/183037339-dbe31f8c-e617-4097-b6dc-6f79d0d0dcce.png)