Dear FS friends

I need to do skull stripping of MRI images, and for this purpose I have used FS. 
For reading the data from "brainmask.mgz", I converted it to "brainmask.nii".
Can you please tell me how can I read the data from "brainmask.nii" is MATLAB?
Do you know other way of reading the data from brainmask.mgz?

I am looking forward to hear from you.
Thanks in advance

--

Best Regards
---------------------------------------------------
Nooshin N. Zadeh
Graduate Assistant

Departments of Electrical Engineering and Neurology
University of Miami