<div dir="ltr">Hi,<div><br></div><div>The "failed to find SH peak!" error is not entirely uncommon, especially if the input mask contains some non-brain voxels.<br><div><br></div><div>It's a little hidden, but the problem lies here:</div><div><font face="courier new, monospace"><span style="font-size:13px">dwi2response [INFO]: Initial response function is </span>[331.3299255<span style="font-size:13px"> -81.32884216]</span></font><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">This indicates that the algorithm is using lmax = 2: this makes it impossible to identify voxels with crossing fibres and remove them from the single-fibre mask, so the algorithm will take much longer (normally dwi2response runs CSD only on the single-fibre voxels from the previous iteration, so each subsequent iteration takes less time).</span></div></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I would take a close look at your gradient table (presumably already stored as a bvecs/bvals pair or external MRtrix format text file, given you are using compressed niftis). It's possible that the table is either corrupt, or is being erroneously split into two b-value shells when in reality only one is present:</span></div><div><span style="font-size:13px"><font face="courier new, monospace">dwi2response [INFO]: Diffusion gradient encoding data clustered into 2 shells</font></span><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">It also appears to not include any b=0 volumes (not that that should matter, the command won't use the b=0's, it's just slightly unusual to not have any).</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">If the problem's not immediately obvious, feel free to copy & paste the file contents here. I'll also add some extra debugging outputs / sanity checks to the code to hopefully give more interpretable feedback in such circumstances.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Cheers</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Rob</span></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><br>--<br><br><span style="color:rgb(255,102,0)"><b>Robert Smith, Ph.D</b><br>Research Officer, Imaging Division</span><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 7128<br>Fax: +61 3 9035 7301<br><a href="http://www.florey.edu.au/" target="_blank">www.florey.edu.au</a><br></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 25, 2014 at 2:11 AM, Rafa X <span dir="ltr"><<a href="mailto:rromero3000@gmail.com" target="_blank">rromero3000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">
<div>Hi Mrtrix expert,</div>
<div>I'm new on mrtrix and I'm trying to run dwi2response (using -grad) but it has been days in a loop that said "failed to find SH peak!". Below you can see the output provided by "-info -debug".</div>
<div><br>
</div>
<div><br>
</div>
<div>dwi2response [INFO]: opening image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz"...</div>
<div>dwi2response [DEBUG]: sanitising image information...</div>
<div>dwi2response [DEBUG]: voxel accessor for image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz" initialised with start = 95, strides = [ -1 96 9216 ]</div>
<div>dwi2response [INFO]: opening image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz"...</div>
<div>dwi2response [DEBUG]: sanitising image information...</div>
<div>dwi2response [DEBUG]: loading image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz"...</div>
<div>dwi2response: uncompressing image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz"... 100%</div>
<div>dwi2response [DEBUG]: image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz" loaded</div>
<div>dwi2response [DEBUG]: voxel accessor for image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz" initialised with start = 95, strides = [ -1 96 9216 ]</div>
<div>dwi2response [DEBUG]: image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec_brain_mask.nii.gz" unloaded</div>
<div>dwi2response [DEBUG]: searching for suitable gradient encoding...</div>
<div>dwi2response [INFO]: found 69x4 diffusion-weighted encoding</div>
<div>dwi2response [INFO]: Diffusion gradient encoding data clustered into 2 shells</div>
<div>dwi2response [DEBUG]: loading image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz"...</div>
<div>dwi2response: uncompressing image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz"... 100%</div>
<div>dwi2response [DEBUG]: image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz" loaded</div>
<div>dwi2response [DEBUG]: voxel accessor for image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz" initialised with start = 95, strides = [ -1 96 9216 645120 ]</div>
<div>dwi2response: initialising response function... Â 100%</div>
<div>dwi2response [INFO]: Initial response function is <a href="tel:%5B331.3299255" value="+13313299255" target="_blank">[331.3299255</a> -81.32884216]</div>
<div>dwi2response: optimising response function.. Â . Â Â dwi2response [DEBUG]: voxel accessor for image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz" initialised with start = 95, strides = [ -1 96 9216 645120 ]</div>
<div>dwi2response [DEBUG]: voxel accessor for image "/home/rr480/Code/KirstieDTI/SUB_DATA/22566/DTI/MRI0/dti_ec.nii.gz" initialised with start = 95, strides = [ -1 96 9216 ]</div>
<div>dwi2response [DEBUG]: initialising threads...</div>
<div>dwi2response [DEBUG]: launching 1 thread "run thread"...</div>
<div>dwi2response [DEBUG]: launched thread "run thread" [ID 140638269503232]</div>
<div>dwi2response [DEBUG]: waiting for completion of thread "run thread" [ID 140638269503232]...</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
<div>dwi2response [DEBUG]: failed to find SH peak!</div>
</div>
</div>
</blockquote></div><br></div>