Efficient automatic correction and segmentation based 3D visualization of magnetic resonance images