<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=NAMIC-Dartmouth-DWI-to-NRRD-Format</id>
	<title>NAMIC-Dartmouth-DWI-to-NRRD-Format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.na-mic.org/w/index.php?action=history&amp;feed=atom&amp;title=NAMIC-Dartmouth-DWI-to-NRRD-Format"/>
	<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=NAMIC-Dartmouth-DWI-to-NRRD-Format&amp;action=history"/>
	<updated>2026-04-20T01:05:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.na-mic.org/w/index.php?title=NAMIC-Dartmouth-DWI-to-NRRD-Format&amp;diff=4586&amp;oldid=prev</id>
		<title>Andy: Update from Wiki</title>
		<link rel="alternate" type="text/html" href="https://www.na-mic.org/w/index.php?title=NAMIC-Dartmouth-DWI-to-NRRD-Format&amp;diff=4586&amp;oldid=prev"/>
		<updated>2006-12-18T19:21:40Z</updated>

		<summary type="html">&lt;p&gt;Update from Wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Note: please also see [[NAMIC-Dartmouth-DWI|this page about NRRD headers which refer to the original image files]], without the need for any additional data reading with MATLAB.&lt;br /&gt;
&lt;br /&gt;
The following MATLAB script converts the Dartmouth DWIs into a single file in which the volumes (2 baselines and 12 diffusion weighted images) are in the appropriate space. The resulting raw image, together with [[NAMIC-Dartmouth-nrrdheader|a nrrd header]], are used by Slicer to do DTI analysis.&lt;br /&gt;
&lt;br /&gt;
 fpout = fopen('nrrdraw.raw', 'w');&lt;br /&gt;
   for k = 1:14;&lt;br /&gt;
     % for subject 1,2,4,5 the slice order is Superior-Inferior, need to&lt;br /&gt;
     % reverse order&lt;br /&gt;
     % for m = 36:-1:1&lt;br /&gt;
     % for subject 3, 6, the slice order is Inferior-superior&lt;br /&gt;
     for m = 1:36&lt;br /&gt;
       n = (k-1)*36+m;&lt;br /&gt;
       % use appropriate dicom prefix&lt;br /&gt;
       name = sprintf('S8.%03d', n);&lt;br /&gt;
       fp = fopen(name);&lt;br /&gt;
       fseek(fp, -65536*2, 'eof');&lt;br /&gt;
       A = fread(fp, [256 256], 'short');&lt;br /&gt;
       fclose(fp);&lt;br /&gt;
       fwrite(fpout, A, 'short');&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  fclose(fpout);&lt;/div&gt;</summary>
		<author><name>Andy</name></author>
		
	</entry>
</feed>