<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Donald,<br>
I am able to convert the DICOM's to nifti format. I was able to get it to work by using the nifti file and specifying the encoding.b gradient file? However, I am not sure if I have the DW scheme correct as I just used the bvecs and bvals without inverting any
of the gradient orientation components? Is there a way to tell what reference frame a Siemens Verio scanner uses and which component I have to invert (if any) so that it matches the mrtrix co-ordinate system?<br>
Thanks again<br>
Todd <br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF848112"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Donald Tournier [d.tournier@brain.org.au]<br>
<b>Sent:</b> Thursday, 14 July 2011 3:42 PM<br>
<b>To:</b> Todd Jolly<br>
<b>Cc:</b> mrtrix-discussion@www.nitrc.org<br>
<b>Subject:</b> Re: [Mrtrix-discussion] Problem converting DICOMS with mrconvert<br>
</font><br>
</div>
<div></div>
<div>Hi Todd,
<div><br>
</div>
<div>Yes, this is pretty strange. I thought I had Siemens mosaic format figured out, but maybe I don't... In any case, there doesn't seem to be any information in the CSA headers about how to handle a case where the mosaic is not a multiple of the acquired
matrix. Since you say the other derived images are all 128x128, I have to assume that it must divide out the mosaic evenly into as many chunks as will fit in, but that really is just a guess. I can propose a fix, which is my best guess as to how to handle
this case, but it really is just a guess - worth a shot though. If this works, I'm guessing the top or bottom row of the derived images will be padded with zeros - maybe you can check this?</div>
<div><br>
</div>
<div>In any case, the fix is to modify a few lines of code in lib/file/dicom/mapper.cpp at line 249 from:</div>
<div><br>
</div>
<div>
<div> if (image.dim[0] % image.acq_dim[0] || image.dim[1] % image.acq_dim[1]) </div>
<div> throw Exception ("acquisition matrix [ " + str (image.acq_dim[0]) + " " + str (image.acq_dim[1]) </div>
<div> + " ] does not fit into DICOM mosaic [ " + str (image.dim[0]) + " " + str (image.dim[1]) </div>
<div> + " ] in image \"" + H.name + "\"");</div>
<div><br>
</div>
<div>to:</div>
<div><br>
</div>
<div>
<div> if (image.dim[0] % image.acq_dim[0] || image.dim[1] % image.acq_dim[1]) {</div>
<div> error ("WARNING: acquisition matrix [ " + str (image.acq_dim[0]) + " " + str (image.acq_dim[1])</div>
<div> + " ] does not fit into DICOM mosaic [ " + str (image.dim[0]) + " " + str (image.dim[1]) </div>
<div> + " ] in image \"" + H.name + "\" - adjusting matrix size to suit");</div>
<div> image.acq_dim[0] = image.dim[0] / guint (float(image.dim[0]) / float(image.acq_dim[0]));</div>
<div> image.acq_dim[1] = image.dim[1] / guint (float(image.dim[1]) / float(image.acq_dim[1]));</div>
<div> }</div>
</div>
<div><br>
</div>
<div>Obviously, you'll need to ./build and install again after the change.</div>
<div>Let us know how that works out...</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Donald.</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On 14 July 2011 14:55, Todd Jolly <span dir="ltr"><<a href="mailto:todd.jolly@uon.edu.au" target="_blank">todd.jolly@uon.edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">
Hi Donald,<br>
Yes we are using a Siemens Verio 3T. After running 'read_dicom -all -csa' it does show that the acquisition matrix is 127p*128... However it does also say that there are 1024 rows x 1024 columns?
<br>
Further, if I open up the header on all of the other diffusion DICOM's (e.g. ADC, EXP, FA etc) the acquisition matrix is 128x128?<br>
<br>
I have attached the information from the header after running 'read_dicom'.<br>
Many thanks<br>
Todd<br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr>
<div style="direction: ltr;"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Donald Tournier [<a href="mailto:d.tournier@brain.org.au" target="_blank">d.tournier@brain.org.au</a>]<br>
<b>Sent:</b> Thursday, 14 July 2011 11:04 AM<br>
<b>To:</b> Todd Jolly<br>
<b>Cc:</b> <a href="mailto:mrtrix-discussion@www.nitrc.org" target="_blank">mrtrix-discussion@www.nitrc.org</a><br>
<b>Subject:</b> Re: [Mrtrix-discussion] Problem converting DICOMS with mrconvert<br>
</font><br>
</div>
<div>
<div></div>
<div class="h5">
<div></div>
<div>Hi Todd,
<div><br>
</div>
<div>That's an odd problem, I've never come across that before. Not sure where the problem is, but maybe we can figure it out with a bit more info. Judging from the sequence names, this is using the Siemens product sequence? Can you confirm that the acquisition
matrix was indeed 128x127 on the scanner? Sounds like an odd (as in strange :) number to me. One other thing you could do is run 'read_dicom -all -csa FILE' on an individual DICOM file from the relevant series. I appreciate this not always easy to do, since
the DICOM standard pretty much states that filenames should be meaningless... If you're struggling with that, this little command might help:</div>
<div><br>
</div>
<div>$ find /home/todd/CF002dicom/ -type f -print -exec dicom_filename -q {} \;</div>
<div><br>
</div>
<div>This will print the name of every file in the folder hierarchy, followed by a more readily interpreted filename suggestion if it is DICOM. That should allow you find at least one relevant file to run 'read_dicom' on, and post the results (make sure you
remove all patient-specific information first though).</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Donald.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div class="gmail_quote">On 13 July 2011 16:26, Todd Jolly <span dir="ltr"><<a href="mailto:todd.jolly@uon.edu.au" target="_blank">todd.jolly@uon.edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">
Hi all,<br>
I have been having trouble converting my DICOM files to .mif format using mrconvert. Once the DICOM series has been read, an error comes up saying that the acquisition matrix [ 128 127 ] does not fit into the DICOM mosaic. I was wondering if anyone else has
come across this problem and if there is a way around it? The error is shown below.<br>
Thank you in advance<br>
Todd<br>
<br>
todd-Precision-T1500:~> mrconvert /home/todd/CF002dicom/ dwi.mif<br>
mrconvert: scanning DICOM folder "/home/todd/CF002dicom/" - ok<br>
Select series ('q' to abort):<br>
0 - 3 MR images 10:25:25 localizer (fl2d1) [1]<br>
1 - 176 MR images 10:29:54 T1_Sag_iso_ASRB (tfl3d1_ns) [2]<br>
2 - 65 MR images 10:46:33 ep2d_diff_mddw_55 slice_64 directions (ep_b3000#34) [11]<br>
3 - 55 MR images 10:58:21 ep2d_diff_mddw_55 slice_64 directions_ADC (ep_b0_3000) [12]<br>
4 - 55 MR images 10:58:22 ep2d_diff_mddw_55 slice_64 directions_TRACEW (ep_b3000t) [13]<br>
5 - 55 MR images 10:58:22 ep2d_diff_mddw_55 slice_64 directions_EXP (ep_b3000) [14]<br>
6 - 55 MR images 10:58:22 ep2d_diff_mddw_55 slice_64 directions_FA (ep_b0_3000) [15]<br>
7 - 55 MR images 10:58:22 ep2d_diff_mddw_55 slice_64 directions_ColFA (?) [16]<br>
? 2<br>
mrconvert: reading DICOM series "ep2d_diff_mddw_55 slice_64 directions"... 100%<br>
mrconvert: acquisition matrix [ 128 127 ] does not fit into DICOM mosaic [ 1024 1024 ] in image "CF002 (CF002) [MR] ep2d_diff_mddw_55 slice_64 directions"<br>
mrconvert: error opening image "/home/todd/CF002dicom/"<br>
<br>
</div>
</div>
<br>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org" target="_blank">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Jacques-Donald Tournier (PhD)<br>
Brain Research Institute, Melbourne, Australia<br>
Tel: +61 (0)3 9035 7033<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Jacques-Donald Tournier (PhD)<br>
Brain Research Institute, Melbourne, Australia<br>
Tel: +61 (0)3 9035 7033<br>
</div>
</div>
</div>
</div>
</body>
</html>