Hi Rick,
I think, this won't resolve the issue as in the AFNI generated mask, pixel values lying in brain portion decided by the AFNI people. How can I be sure that a particular pixel with a particular associated value is the brain pixel or the non-brain pixel. As, Gang told to take it as 0 and 1 but this way I'm able to obtain only the boundary of brain. I need the inside values as well.
For an example, lets say in the binary mask all pixel >=6 are brain else non-brain.
I hope I explained properly.