DiffusionFdtNotes - MRC CBU Imaging Wiki

Revision 1 as of 2007-04-30 10:33:45

Clear message
location: DiffusionFdtNotes

Fdt diffusion analysis

For CBU data.

These are just notes of work in progress by MatthewBrett.

Extracting the bvals, bvecs values from Siemens data

See: http://wiki.na-mic.org/Wiki/index.php/NAMIC_Wiki:DTI:DICOM_for_DWI_and_DTI

Note that the B gradient=0 has no direction information.

So, for the example dataset I have been playing with, you can fetch the diffusion directions from the DICOM headers, by getting the DICOM file names from a diffusion dataset into the matlab string matrix input_files, and doing something like:

hdr = spm_dicom_headers(input_files);
n = length(hdr);
bvals = zeros(n, 1);
bvecs = zeros(n, 3);

for i = 1:n
  H = hdr{i};
  bvals(i) = str2num(H.CSAImageHeaderInfo(7).item(1).val);
  if bvals(i) == 0 % no gradient
    continue
  end
  d_info = H.CSAImageHeaderInfo(22).item;
  for D = 1:3
    bvecs(i,D)= str2num(d_info(D).val);
  end
end