Print

Print


Below is a simple matlab script that extracts the b=0 and b=1000 bvals and
bvecs. The script merges b=0 and b=1000 bvals/bvecs at the end and saves
them as bvals_b1000 and bvecs_b1000, and I use fslmerge to merge the b=0
and b=1000 volumes so that all of the files correspond.

Joe

%hcp_b1000_bvecs_bvals.m

workdir='/work/ics/data/projects/banichlab/studies/hcp/dti';
cd(workdir)
[status,list]=system('ls */T1w/Diffusion/bvals | cut -d ''/'' -f1')
subjs=str2num(list);
for i=1:size(subjs,1)
    cd([workdir '/' num2str(subjs(i)) '/T1w/Diffusion'])
    % Read bvals and bvecs text files
    num2str(subjs(i))
    bvecs = load('bvecs'); % should be 3xN
    bvals = load('bvals'); % should be 1xN
    bvals_b1000=[];
    bvecs_b1000=[];
    bvals_b0=[];
    bvecs_b0=[];
    % get b=1000 bvals and bvecs
    for j=1:size(bvals,2);
        if bvals(1,j)<1500 && bvals(1,j)>500
            j-1
            bvals_b1000=[bvals_b1000 bvals(:,j)];
            bvecs_b1000=[bvecs_b1000 bvecs(:,j)];
        end
    end
    % get b=0 bvals and bvecs
    for j=1:size(bvals,2);
        if bvals(1,j)<500
            %j-1
            bvals_b0=[bvals_b0 bvals(:,j)];
            bvecs_b0=[bvecs_b0 bvecs(:,j)];
        end
    end
    bvals_b1000=[bvals_b0 bvals_b1000];
    bvecs_b1000=[bvecs_b0 bvecs_b1000];
    dlmwrite('bvals_b1000',bvals_b1000,' ')
    dlmwrite('bvecs_b1000',bvecs_b1000,' ')
end






On Thu, Oct 8, 2015 at 11:55 AM, Mark Pinsk <[log in to unmask]> wrote:

> Hi fsl,
>
> Thanks so much for 5.0.9, lots of useful improvements!  I have a few
> questions/requests...
>
> bedpostx has a new model (model=3) instead of using a stick kernel to
> represent a fibre compartment, a “zeppelin” axially symmetric tensor can be
> used.
> Can anyone recommend a good reference to read up on this zeppelin model
> and how it performs compared to the stick model?
>
> select_dwi_vols allows quick extraction of a certain b-shell from DWI data-
> This is great! Could a future release also output a new bvecs file?  When
> shells are interleaved, it's annoying to create a new bvecs file of just a
> single shell.
>
> eddy will generate a rotated bvecs file.
> Awesome, thanks Jesper !!
>
> best,
> Mark
>