Folks:
I'd appreciate if someone could explain the brainmask.auto.mgz, and brainmask.mgz logic?
Somewhat alarming is that in a brainmask volume, I'm seeing some full-brightness (255) values on the edge of the mask (border of brain and nothing), which are certainly not in the input volume T1.mgz volume.
Question 0: Is the detailed image data in brainmask.mgz ever used, or is it simply a zero/not-zero mask? Ie: is the meaning "masked brain", or "mask using non-zero values to show where brain is".
Question 1: Is there a rationale for 255 values?
That led me to look at the brainmask.auto volume, and the "bad" values are not there either.
The recon-all script is a bit puzzling and convoluted in this area --
Question 2: It appears that the Skull Stripping section of the script uses a "-keep" flag on mri_watershed. This isn't explained on the wiki doc page -- what does it do? (And why does mri_watershed get BMA and two BM's?)
Question 3: In the normal case, does brainmask.auto.mgz just get copied to brainmask.mgz? If so it's a puzzle to me how these wind up different (in the cases I looked at the mgz files are not the same size).
<more scratching of head>
Thanks,
Graham
Hi Graham,
I'd appreciate if someone could explain the brainmask.auto.mgz, and brainmask.mgz logic?
This is a feature that we use to track the edits that you make to the brainmask.mgz volume and allow recon-all to run while maintaining your edits by default. There are a few different scenarios - I'll try and outline them here:
*When you run recon-all for the first time on a new set of data: the '-skullstrip' step will generate a brainmask.auto.mgz, and since there is no brainmask.mgz created yet it will copy the brainmask.auto.mgz to brainmask.mgz - they should be the same at this point.
*If you run recon-all again on this set of data: the '-skullstrip' step will generate a new brainmask.auto.mgz, overwriting the old one. Then, because there is a brainmask.mgz present it will compare this file to the brainmask.auto.mgz and if there is a difference it will use the brainmask.mgz in subsequent steps. (the difference being something that you edited and wanted to be in there that wasn't done automatically in the '-skullstrip' step.)
*If you are running the latest version of recon-all on OLD legacy data (using the '-legacy' flag): your old brain.mgz volume will be copied to brainmask.mgz. the '-skullstrip' step will generate a new brainmask.auto.mgz, overwriting the old one. Then, because there is a brainmask.mgz present it will compare this file to the brainmask.auto.mgz and if there is a difference it will use the brainmask.mgz in subsequent steps. (the difference being edits you made toyour legacy data that you wanted to be in there).
Somewhat alarming is that in a brainmask volume, I'm seeing some full-brightness (255) values on the edge of the mask (border of brain and nothing), which are certainly not in the input volume T1.mgz volume.
Question 0: Is the detailed image data in brainmask.mgz ever used, or is it simply a zero/not-zero mask? Ie: is the meaning "masked brain", or "mask using non-zero values to show where brain is".
I'll leave this one for someone else. If no one else answers it (because I've left an unanswered question in the middle of my reply and they didnt notice) then please post it again!!!
Question 1: Is there a rationale for 255 values?
I'm not sure where these are coming from in your volume - I assume you havent done any editting on this one. If they are also not in the brainmask.auto.mgz you could try running: recon-all -skullstrip -clean-bm
And hopefully they'll go away. The '-clean-bm' flag will tell it to trash any edits you've done to the brainmask.mgz volume, making brainmask.auto.mgz and brainmask.mgz the same. But, as I said, I'm not sure where these extra voxels came from.
That led me to look at the brainmask.auto volume, and the "bad" values are not there either.
The recon-all script is a bit puzzling and convoluted in this area --
Question 2: It appears that the Skull Stripping section of the script uses a "-keep" flag on mri_watershed. This isn't explained on the wiki doc page -- what does it do? (And why does mri_watershed get BMA and two BM's?)
I got this from the mri_watershed help message: -keep PreEditVol PostEditVol NewWithEditsVol : keep edits as indicated by the differences between pre and post volumes.Note: this does not change output, just create NewW ithEditsVol
Question 3: In the normal case, does brainmask.auto.mgz just get copied to brainmask.mgz? If so it's a puzzle to me how these wind up different (in the cases I looked at the mgz files are not the same size).
Hopefully my description above has answered this one.
freesurfer@nmr.mgh.harvard.edu