Skip to content

Templates mean_reg2mean.nii.gz and facemask.nii.gz not actually in MNI space? #74

@yehman

Description

@yehman

I was running pydeface on a dataset, and had a few subjects with imperfect defacing. I tracked down the problem to the subjects' lower image quality causing bad registration to the standard mean_reg2mean.nii.gz, no matter which cost function I use. Therefore, I manually ran registration of the structural to standard MNI 1mm brain provided in $FSLDIR/data/standard, and applied the inverse transform to get standard -> subject matrix. However, the facemask still was not aligned properly. Long story short, I pulled up the mean_reg2mean.nii.gz provided by pydeface and overlaid the standard MNI152_T1_1mm.nii.gz, and found out they do not appear aligned! I tried a few viewers including fsleyes, mricron, and overlaid a bunch of different MNI standard images, and got the same result. I finally re-ran the registration using skull-stripped versions of the structural and mean_reg2mean.nii.gz, and got a good mask. Thought I would check in to make sure I am not missing anything obvious. Image attached.

Image

I understand this may seem like a minor issue, since pydeface runs registration via flirt anyways. However, having the facemask.nii.gz in actual standard space would allow the --template option to use any MNI standard space image, and automatically have facemask.nii.gz work, without the user needing to supply a custom facemask. A small fix for a lot of benefit, I would say.

P.S., would also be nice to be able to load transform matrices and skip registration altogether if the user has a working transform matrix, saving a lot of time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions