Fuzzy voxel labeling of magnetic resonance images by global optimization