Hello PF users, This is my first time on these forums. I'm not sure this is exactly the right place for this question, but as I couldn't find an image processing sub forum I'm posting it here in the hopes someone can help me! 1. The problem statement, all variables and given/known data I have a binary image (see below) derived from a grayscale MRI image by thresholding. The contrast I'm using is supposed be good for differentiating WM/GM. The problem is that it also picks up a lot of skull and noise (you can see it on the edge of the brain) which are lumped together with WM. I want to get rid of this non-brain tissue and create a WM-only mask. 2. Relevant equations N/A 3. The attempt at a solution What I've done before is to use ImageJ to manually remove the obviously non-brain voxels. This is very traumatizing and depressing. How would you solve this problem?