Or if FSL is properly installed you can use this:
addpath([getenv('FSLDIR') '/etc/matlab'])
then read with
vol=read_avw('myvolume.nii.gz');
and write with
save_avw(...)
Cheers,
Saad.
On 2 Nov 2010, at 17:17, R. Matthew Hutchison wrote:
> There is a great matlab toolbox here:
> http://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image
>
> I am not sure if this is the one you are referring to.
>
> Unfortunately it doesn't read the compressed nifti files (.nii.gz) but
> you can simply uncompress the files to .nii and run them.
>
> -Matt
>
>
>
> On Tue, Nov 2, 2010 at 1:13 PM, Pallavi Karnayana
> <[log in to unmask]> wrote:
>> How can nii.gz files be read in matab?
>> I tried downloading Analyze MRI toolbox and also MRIcro tool.
>>
>> It is not working still. I want to read a bunch of nii.gz files in matlab.
>> Can anyone guide regarding the same?
>>
>
>
>
> --
> R. Matthew Hutchison, PhD. Candidate
> Centre for Functional and Metabolic Mapping
> Robarts Research Institute
> Cuddy Wing - 9.4T Suite
> P.O. Box 5015, 100 Perth Drive
> London, Ontario, Canada N6A 5K8
>
--
Saad Jbabdi
University of Oxford, FMRIB Centre
JR Hospital, Headington, OX3 9DU, UK
(+44)1865-222466 (fax 717)
www.fmrib.ox.ac.uk/~saad
|