Hi Felix,<div><br></div><div>Thanks for sending through the sample data, I now know what the issue is: I'd left out one tiny little change from the patch. I've attached a new version of that same patch including the required change (basically changes lib/file/dicom/csa_entry.h:78 to report a warning about the SV10 issue rather than throw an exception). The issue with your data is that it looks like the Siemens private CSA fields have been completely blanked out - they are entirely zero-valued. Obviously MRtrix expects data to be contained in these fields. The fix is to simply report the problem but carry on regardless...</div>
<div><br></div><div>This new version of the patch now works fine on your data:</div><div><br></div><b style="font-family:'courier new',monospace;font-size:x-small">$Â mrinfo sample</b><br><span style="font-family:'courier new',monospace;font-size:x-small">mrinfo: scanning DICOM folder "sample" Â - ok</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">mrinfo: reading DICOM series "AXIAL SE T1"... 100%</span><br><span style="font-family:'courier new',monospace;font-size:x-small">mrinfo: WARNING: slice gap detected</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">************************************************</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Image: Â Â Â Â Â Â Â "Patient #4 Â [MR] AXIAL SE T1"</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">************************************************</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Format: Â Â Â Â Â Â DICOM</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Dimensions: Â Â Â Â 208 x 256 x 20</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Voxel size: Â Â Â Â 0.859375 x 0.859375 x 7.20001</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Dimension labels: Â 0. left->right (mm)</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â 1. posterior->anterior (mm)</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â 2. inferior->superior (mm)</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Data type: Â Â Â Â unsigned 16 bit integer (little endian)</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Data layout: Â Â Â [ -0 -1 +2 ]</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Data scaling: Â Â Â offset = 0, multiplier = 1</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Comments: Â Â Â Â Â Patient #4 Â [MR] AXIAL SE T1</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â study: IRM tete</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â DOB: 00/00/0000</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â DOS: 00/00/0000 00:00:00</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Transform: Â Â Â Â Â Â Â 0.9999 Â 2.225e-10 Â Â -0.01303 Â Â Â -86.54</span><br><span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â Â -0.001631 Â Â Â 0.9921 Â Â -0.1252 Â Â Â -86.87</span><br>
<span style="font-family:'courier new',monospace;font-size:x-small">Â Â Â Â Â Â Â Â Â Â Â Â Â 0.01293 Â Â Â 0.1252 Â Â Â 0.9921 Â Â Â -98.26</span><br><div><font size="1" face="courier new, monospace">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0 Â Â Â Â Â 0 Â Â Â Â Â 0 Â Â Â Â Â 1</font></div>
<div><br></div><div><br></div><div>The other thing is that the instructions I sent through may not necessarily force a rebuild, leaving the executables unchanged. Use these instructions instead:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><i>$ cd mrtrix</i></div></div><div><div><i>$ tar xvfj mrtrix-0.2.10_DICOM_multiframe_patch.tar.bz2Â </i></div></div><div><div><i><b>$ ./build clean</b></i></div></div><div><div><i>$ ./build</i></div></div><div><div>
<i>$ sudo ./build install</i></div></div></blockquote><div><div><br></div></div><div>Let me know how you go with that.</div><div>Cheers,</div><div><br></div><div>Donald.</div><div><br></div><div><br></div><div><br><div class="gmail_quote">
On 24 October 2012 01:17, Félix C. Morency <span dir="ltr"><<a href="mailto:felix.morency@gmail.com" target="_blank">felix.morency@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Donald,<br>
<br>
Thank you for your answer. I tried the patched version of mrtrix but I<br>
obtains the same error. The data seems to come from a Siemens scanner.<br>
You will find in [1] a sample of the data I'm trying to convert. Maybe<br>
I'm doing something wrong. I asked a colleague of mine to test it and<br>
he has the same error. Can you tell me if it works on your side?<br>
<br>
 [1]: <a href="http://dl.dropbox.com/u/2543037/sample.tar.gz" target="_blank">http://dl.dropbox.com/u/2543037/sample.tar.gz</a><br>
<br>
Regards,<br>
-F<br>
<div><div class="h5"><br>
On Mon, Oct 22, 2012 at 8:34 PM, Donald Tournier<br>
<<a href="mailto:d.tournier@brain.org.au">d.tournier@brain.org.au</a>> wrote:<br>
> Hi Felix,<br>
><br>
> Not entirely sure why this would happen, but I'm guessing these are Siemens<br>
> data? SV10 refers to the format they use to store their CSA data within the<br>
> DICOM stream. The only time I've had that particular error is when trying to<br>
> read images stored using the newer DICOM multi-frame format. My suggestion<br>
> would be to install the patch that I released a few weeks ago implementing<br>
> support for multi-frame, which might also sort out a few other issues. You<br>
> can get the patch here:<br>
> <a href="http://www.nitrc.org/pipermail/mrtrix-discussion/2012-September/000528.html" target="_blank">http://www.nitrc.org/pipermail/mrtrix-discussion/2012-September/000528.html</a>.<br>
><br>
> For some reason, the NITRC mailing list backend seems to have removed all<br>
> the text from that message and left only the attachment. Here's the original<br>
> text with the installation instructions:<br>
><br>
> Dear MRtrix users,<br>
><br>
> I've had a few requests recently about DICOM multi-frame support, so I've<br>
> finally done something about it. Attached is a patch implementing this,<br>
> which should apply cleanly against the current 0.2.10 source download. I'm<br>
> releasing it now as a patch since it required a fairly extensive rewrite of<br>
> the DICOM backend in MRtrix, and the chances are there will be a few bugs<br>
> that remain to be sorted out. That said, I've tried it out on a few datasets<br>
> from a range of manufacturers, and so far it seems to work OK for both<br>
> multi-frame and "traditional" DICOM data. It might also solve a few issues<br>
> others have reported recently when trying to extract the diffusion<br>
> information.<br>
><br>
> So I'd be grateful if people could give this a go, both for standard and<br>
> multi-frame DICOM data, and send me feedback about what works and what<br>
> doesn't (hopefully not much). Once I'm happy everything works OK, I'll put<br>
> out a new proper release.<br>
><br>
> To install the patch, dump it in your MRtrix source folder, and issue the<br>
> following commands (as per usual, amend as necessary):<br>
><br>
> $ cd mrtrix<br>
> $ tar xvfj mrtrix-0.2.10_DICOM_multiframe_patch.tar.bz2<br>
> $ ./build<br>
> $ sudo ./build install<br>
><br>
> Cheers,<br>
><br>
> Donald.<br>
><br>
><br>
><br>
> Let me whether or not this fixes the problem.<br>
> Cheers,<br>
><br>
> Donald.<br>
><br>
><br>
><br>
> On 23 October 2012 08:10, Félix C. Morency <<a href="mailto:felix.morency@gmail.com">felix.morency@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I am trying to convert some DICOM files using mrconvert but have the<br>
>> following error:<br>
>><br>
>> Â mrconvert [DEBUG]: file "./IM000008" mapped at 0x7f3177e0f000, size<br>
>> 155050 (read-only)<br>
>> Â mrconvert: CSA data is not in SV10 format<br>
>> Â mrconvert [DEBUG]: unmapping file "./IM000008"<br>
>> Â mrconvert: error reading series 3 of DICOM image "Patient #4 Â [MR]<br>
>> AXIAL SE T1"<br>
>> Â mrconvert: error opening image "."<br>
>> Â mrconvert [INFO]: closing image "."...<br>
>><br>
>> I'm using MRtrix 0.2.10, glib 2.32.3, GSL 1.15<br>
>><br>
>> Does anyone knows why this happens?<br>
>><br>
>> Regards,<br>
>> --<br>
>> Félix C. Morency, M.Sc.<br>
>> Plateforme d’analyse et de visualisation d’images<br>
>> Centre Hospitalier Universitaire de Sherbrooke<br>
>> Centre de recherche clinique Étienne-Le Bel<br>
>> Local Z5-3031 | 819.346.1110 ext 16634<br>
>> _______________________________________________<br>
>> Mrtrix-discussion mailing list<br>
>> <a href="mailto:Mrtrix-discussion@www.nitrc.org">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>
><br>
><br>
><br>
> --<br>
> Dr Jacques-Donald Tournier<br>
> Research Fellow<br>
><br>
> The Florey Institute of Neuroscience and Mental Health<br>
> Melbourne Brain Centre - Austin Campus<br>
> 245 Burgundy Street<br>
> Heidelberg  Vic  3084<br>
> Ph: Â +61 3 9035 7033<br>
> Fax: Â +61 3 9035 7307<br>
> <a href="http://www.florey.edu.au" target="_blank">www.florey.edu.au</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div class="HOEnZb"><div class="h5">--<br>
Félix C. Morency, M.Sc.<br>
Plateforme d’analyse et de visualisation d’images<br>
Centre Hospitalier Universitaire de Sherbrooke<br>
Centre de recherche clinique Étienne-Le Bel<br>
Local Z5-3031 | 819.346.1110 ext 16634<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#ff6600" size="1"><b>Dr Jacques-Donald Tournier<br></b></font><div><font color="#ff6600" size="1">Research Fellow</font></div><div><font size="1"><br>
</font></div><div><font size="1">The Florey Institute of Neuroscience and Mental Health</font></div><div><font size="1">Melbourne Brain Centre - Austin Campus</font></div><div><font size="1">245 Burgundy Street</font></div>
<div><font size="1">Heidelberg  Vic  3084</font></div><div><font size="1">Ph:  +61 3 9035 7033</font></div><div><font size="1">Fax:  +61 3 9035 7307</font></div><div><font size="1"><a href="http://www.florey.edu.au" target="_blank">www.florey.edu.au</a></font></div>
<br><br>
</div>