OK, I'm really stumped... The only place in the code where that error message could have come from is in accessing the image for an MRtrix format (.mif) file. The "mrinfo" commands that you ran also will have run through those sections of code, but neither of them crashed... The actual headers for both images look fine to me. Guess we're going to have to dig deeper...<div>
<br></div><div>By the way, I doubt that the extra 34th volume is the issue, although you might need to deal with that separately - more on that later.</div><div><br></div><div>For now, let's try this. Copy these commands into a terminal (and amend as required), and then copy/paste the entire terminal session and post it back here:</div>
<div><br></div><div># build debug version of code:</div><div>$ cd <MRtrix source folder></div><div>$ ./build clean</div><div>$ ./build -debug<br></div><div>$ export PATH=`pwd`/bin:$PATH</div><div>$ export LD_LIBRARY_PATH=`pwd`/lib</div>
<div><br></div><div># check that you're running the freshly built version (build date should be today):</div><div>$ mrinfo --version</div><div><br></div><div># first cut:</div><div>$ cd <your data folder></div><div>
$ estimate_response dwi.mif sf.mif response.txt -debug</div><div><br></div><div># debugger output:</div><div>$ gdb --args dwi.mif sf.mif response.txt -debug</div><div>(gdb) run</div><div>(gdb) bt full</div><div><br></div>
<div>If after all this, I still can't figure it out, you might want to send me the data so I can have a look at it...</div><div><br></div><div><br></div><div>Back to the extra 34th dataset issue: it shouldn't affect the CSD and tracking processes directly, but it will affect the DT calculations. That will affect the estimate_response stage, since it uses the highest FA voxels as 'single-fibre' voxels, and uses the primary eigenvector as the primary orientation. So you'll need to take care of that manually. Here's how:</div>
<div><br></div><div># extract the DW scheme from the DWI:</div><div>$ mrinfo dwi.mif -grad encoding.b</div><div><br></div><div># remove the last volume from the DWI:</div><div>$ mrconvert dwi.mif -coord 3 0:32 dwi2.mif</div>
<div><br></div><div># remove the last line from the encoding file:</div><div>$ head -n 33 encoding.b > encoding2.b</div><div><br></div><div># use the amended DWI and encoding files whenever requried, e.g.:<br>$ dwi2tensor dwi2.mif -grad encoding2.b dti.mif</div>
<div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">OK, that should do for now...</div><div class="gmail_quote">Cheers,</div><div class="gmail_quote"><br></div><div class="gmail_quote">
Donald.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On 5 June 2010 01:50, Philip G Batchelor <span dir="ltr"><<a href="mailto:philip.batchelor@kcl.ac.uk">philip.batchelor@kcl.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi<br>
<br>
thanks, output is attached, I see it has recognised the data as being
DTI which is good. On the other hand, it's a 32 directions scan with
one b=0, and I see<br>
dim: 112,112,60<b>,34</b><br>
<br>
could it be that it has fallen foul of the cheeky 34th dataset which
Philips add, an isotropic DW image? caused issues with quite a few of
our codes, ppl always forget about it.<br>
<br>
Ph<div><div></div><div class="h5"><br>
<br>
On 04/06/10 05:54, Donald Tournier wrote:
<blockquote type="cite">Hi Philip,
<div><br>
</div>
<div>Sounds a bit odd. To narrow things down a bit, could you post
the output of the following:</div>
<div><br>
</div>
<div>$ mrinfo dwi.mif</div>
<div>$ mrinfo sf.mif</div>
<div>
<div>$ awk '{ if ($0=="END") exit 0; print $0 }' dwi.mif</div>
</div>
<div>$ awk '{ if ($0=="END") exit 0; print $0 }' sf.mif</div>
<div>$ ls -l dwi.mif sf.mif</div>
<div><br>
</div>
<div>That should give me a bit more info...</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Donald.</div>
<div>
<div><br>
</div>
<br>
<div class="gmail_quote">On 3 June 2010 01:49, Philip G Batchelor <span dir="ltr"><<a href="mailto:philip.batchelor@kcl.ac.uk" target="_blank">philip.batchelor@kcl.ac.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">On 12/03/10 00:38, Donald
Tournier wrote:
<blockquote type="cite">
<div>This message has been archived. <a href="https://kclev.kcl.ac.uk/EnterpriseVault/ViewMessage.asp?VaultId=1CFCE6957FBD5654F8CCD18F833B7A6301110000kcl-evsite01&SavesetId=730000000000000%7E201003120038120000%7E0%7EE7E2A350A97B45AD91183E4EEB3B887" target="_blank">View
the original item </a></div>
<div>
<div>Hi Philip, Sorry, there is currently
no documentation on that file format... It is quite simple, though. It
consists of a text header, followed by binary data. The first line of
the text header</div>
</div>
<div>Attachments:</div>
<table border="0" cellpadding="2" cellspacing="1" width="97%" align="center">
<tbody>
<tr>
<td width="80%"><a href="https://kclev.kcl.ac.uk/EnterpriseVault/ViewMessage.asp?VaultId=1CFCE6957FBD5654F8CCD18F833B7A6301110000kcl-evsite01&SavesetId=730000000000000%7E201003120038120000%7E0%7EE7E2A350A97B45AD91183E4EEB3B887&AttachmentId=1" target="_blank">read_mrtrix_tracks.m </a></td>
<td>(2 KB)</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
<br>
Hi<br>
<br>
am trying to process some of the Philips DICOM we acquired, in order to
perform CSD. At the estimate_response stage it crashes, something went
wrong with 'axes specification' but nore sure what. Here is the
sequence of operation I go though:<br>
<br>
$ mrconvert -info DICOM/ ./mrtrix-data/dwi.mif<br>
[...]<br>
<br>
$ mrconvert dwi.mif -coord 3 0 - | threshold - - | median3D - - |
median3D - mask.mif<br>
[...]<br>
<br>
$ dwi2tensor dwi.mif dti.mif<br>
[...]<br>
<br>
$ tensor2FA dti.mif - | mrmult - mask.mif fa.mif<br>
$ erode mask.mif - | erode - - | mrmult fa.mif - - | threshold -
-abs 0.6 sf.mif <br>
$ estimate_response dwi.mif sf.mif response.txt<br>
<br>
estimate_response: incorrect number of axes in axes specification
"-0,-1,+2,+3"<br>
*** glibc detected *** estimate_response: free(): invalid next
size (fast): 0x000000000194c420 ***<br>
======= Backtrace: =========<br>
/lib/libc.so.6(+0x775b6)[0x7f4f4d5065b6]<br>
/lib/libc.so.6(cfree+0x73)[0x7f4f4d50ce53]<br>
etc...<br>
<br>
Am trying to diagnose if I'm doing some basic error, or if there's a
problem with the way the axes are read from the DICOMS?<br>
Any suggestion?<br>
<br>
Ph<br>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Jacques-Donald Tournier (PhD)<br>
Brain Research Institute, Melbourne, Australia<br>
Tel: +61 (0)3 9496 4078<br>
</div>
</blockquote>
<br>
</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 9496 4078<br>
</div>