Print

Print


Hi,

Saad is clearly travelling in the future at the moment since the latest release of FSL in the present is 4.1.9.
In the meantime you can fix the problem in read_avw.m by deleting the following lines from $FSLDIR/etc/matlab/read_avw.m

[PATHSTR,NAME1,EXT,VERSN] = fileparts(fname);

if(strcmp(EXT,'.gz'))
    [PATHSTR,NAME2,EXT,VERSN] = fileparts([PATHSTR filesep NAME1]);
    if(strcmp(EXT,'.img') | strcmp(EXT,'.nii') | strcmp(EXT,'.hdr'))
        NAME1 = NAME2;
    end
elseif(~strcmp(EXT,'.nii')&~strcmp(EXT,'.hdr')&~strcmp(EXT,'.img'))
    NAME1 = [PATHSTR filesep NAME1 EXT];
end


Once you have deleted these lines everything should work fine.

All the best,
	Mark



On 10 Jul 2012, at 11:45, Saad Jbabdi wrote:

> Hi
> The latest release (FSL 4.1.10) has fixed the read_avw.m problem.
> 
> Cheers
> Saad
> 
> 
> On 10 Jul 2012, at 01:07, Soyoung Park wrote:
> 
>> Hi Saad,
>> 
>> Thank you very much for your help. Although I can't quite seem to get fslmeants --showall to work (the resulting .txt file just contains an ordered sequence of numbers, repeated many times (0 1 2 3 4 5 ... 179 0 1 2 3 4 5 ...  and so on)), the read_avw command works beautifully on the 2009b version of MATLAB. However, I installed the 2012a version of MATLAB today and the command does not run properly on it, giving the following error message instead: 
>> 
>> "Error using fileparts
>> Too many output arguments.
>> 
>> Error in read_avw (line 18)
>> [PATHSTR,NAME1,EXT,VERSN] = fileparts(fname);"
>> 
>> Do you happen to know why this could be happening?
>> 
>> Thanks!
>> 
>> Best,
>> Soyoung
>> 
>> 2012/7/4 Saad Jbabdi <[log in to unmask]>
>> Hi
>> You can either use " fslmeants --showall " to get data into a text file that you can then load in matlab.
>> Alternatively, you can use the "read_avw" method in matlab (addpath /usr/local/fsl/etc/matlab) and read the fdt_paths file directly in matlab.
>> 
>> Cheers
>> Saad
>> 
>> On 3 Jul 2012, at 23:58, Soyoung Park wrote:
>> 
>> > Hi,
>> >
>> > I would like to statistically compare tractography results from different areas of the same diffusion image, and am wondering if there's a way to export the coordinate and intensity value of each voxel in the tractography data (fdt_paths) to MATLAB, so that I can easily access and manipulate them. Also, if there is a good, alternative method of tract comparison that I'm not aware of, I'd really appreciate suggestions.
>> >
>> > Thanks in advance!
>> >
>> > -Soyoung
>> 
>> --
>> Saad Jbabdi
>> University of Oxford, FMRIB Centre
>> 
>> JR Hospital, Headington, OX3 9DU, UK
>> (+44)1865-222466  (fax 717)
>> www.fmrib.ox.ac.uk/~saad
>> 
>> 
> 
> --
> Saad Jbabdi
> University of Oxford, FMRIB Centre
> 
> JR Hospital, Headington, OX3 9DU, UK
> (+44)1865-222466  (fax 717)
> www.fmrib.ox.ac.uk/~saad
> 
> 
> 
> 
> 
> 
> 
> 
> 
>