[Mrtrix-discussion] csdeconv peaks

Robert Smith r.smith at brain.org.au
Sat Oct 20 18:22:55 PDT 2012


Peter

MRtrix is extremely flexible with regards to how the image data are aligned
in memory; if you run the mrinfo command on your image and check the 'data
layout' field, you'll most likely see that the ordering of the data in
memory in those axes is reversed (i.e. has a '-' sign).
Unfortunately FSL doesn't always interpret this in the same way as MRtrix
does. There is also some ambiguity in the Nifti file format regarding how
the image transform should be stored/interpreted.
In my experience, when using MRtrix and FSL in conjunction, the safest
option is to run the mrconvert command on your image, with the following
option: '-layout +0,+1,+2'. This makes the data layout as unambiguous as
possible.
In your case with a 4D image, I would try '-layout +1,+2,+3,+0'; this makes
the 4th dimension (the fibre orientations) contiguous in memory, so reading
the image data for a single voxel is as fast as possible.

Hope this fixes your problem; if not let me know.
Rob

--

Robert Smith
PhD Candidate

The Florey Institute of Neuroscience and Mental Health
Melbourne Brain Centre - Austin Campus
245 Burgundy Street
Heidelberg Vic 3084
Ph: +61 3 9035 7128
Fax: +61 3 9035 7301
www.florey.edu.au



On Fri, Oct 19, 2012 at 9:42 PM, Peter Neher <p.neher at dkfz-heidelberg.de>wrote:

>  One more problem. If i apply the peak extraction to my image file the
> output nifti peaks seem to have two inverted dimensions. Do you internally
> change the image geometry somehow? My image has a left-posterior-superior
> orientation.
>
> Best
> Peter
>
>
> On 10/18/2012 10:22 PM, Luis Concha wrote:
>
> Once you get your peaks image, you can use fslroi to extract each set of
> peaks. For example, if you found tree peaks per voxel, the 4th dimension of
> your file should have 9 elements (3 peaks, each with xyz components). So,
> to get the first peak, you would invoke:
>
> fslroi my_peaks.nii first_peak 0 3
>
> and to get the second largest peak:
> fslroi my_peaks.nii second_peak 2 3
>
> and finally the third:
> fslroi my_peaks.nii third_peak 6 3
>
> (I am sure you can substitute fslroi for mrcat for similar operations)
>
> You can visualize them as lines in fslview.
>
> Luis
>
>
>
> On Thu, Oct 18, 2012 at 3:11 PM, David Raffelt <d.raffelt at brain.org.au>wrote:
>
>> Hi Peter,
>> I would suggest using more directions than SH coefficients in your FOD
>> image. Check out the find_SH_peaks help for more information on how the
>> peaks are saved. What it does not mention though is that the output peaks
>> are ordered by size (largest first). Sorry I'm not familiar with the FSL
>> peak file format, however I'm sure it would be fairly trial to code
>> a conversion tool up. A good place to start would be dir2amp, since this
>> code reads in the directions file and loops over each peak.
>> Cheers,
>> Dave
>>
>>
>> On 19 October 2012 00:43, Peter Neher <p.neher at dkfz-heidelberg.de> wrote:
>>
>>>  Hi Dave,
>>>
>>> seems to work fine. Do you have any recommendation how many directions
>>> to generate using gendir? And can you give me the exact specification of
>>> the find_SH_peaks output image so that I can read it somehow using my own
>>> code? Or is there a conversion to the FSL peak file format?
>>>
>>> Best,
>>> Peter
>>>
>>>
>>>
>>> On 10/18/2012 11:37 AM, David Raffelt wrote:
>>>
>>> Hi Peter,
>>> You can use the find_SH_peaks command. Note that you also have to supply
>>> a set of directions as input, which are used as seeds for the peak finding.
>>> You can generate these using the gendir command.
>>>
>>>  Note that dir2amp can be used to convert these directions to peak
>>> amplitudes.
>>> Cheers,
>>> Dave
>>>
>>>
>>>
>>>
>>> On 18 October 2012 19:06, Peter Neher <p.neher at dkfz-heidelberg.de>wrote:
>>>
>>>> Hi all, I wondered if it is possible to directly output the fiber
>>>> directions and not only the SH representation of the ODFs. If this is not
>>>> possible, can anyone tell me how the SH file looks like so that I can read
>>>> it and extract the peaks myself?
>>>>
>>>> Best
>>>> Peter
>>>> _______________________________________________
>>>> Mrtrix-discussion mailing list
>>>> Mrtrix-discussion at www.nitrc.org
>>>> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>>>>
>>>
>>>
>>>
>>>  --
>>> *Dr David Raffelt*
>>> Post Doctoral Fellow
>>>
>>>  The Florey Institute of Neuroscience and Mental Health
>>> Melbourne Brain Centre - Austin Campus
>>> 245 Burgundy Street
>>> Heidelberg Vic 3084
>>> Ph: +61 3 9035 7024
>>>  www.florey.edu.au
>>>
>>>
>>>   --
>>> Dipl.-Inform. Peter Neher
>>> German Cancer Research Center
>>> (DKFZ, Deutsches Krebsforschungszentrum in der Helmholtz-Gemeinschaft, Stiftung des öffentlichen Rechts)
>>> Division of Medical and Biological Informatics
>>> Im Neuenheimer Feld 280, D-69120 Heidelberg
>>>
>>> Phone: 49-(0)6221-42-3552, Fax: 49-(0)6221-42-2345
>>> E-Mail: p.neher at dkfz-heidelberg.de, Web: www.dkfz.de
>>>
>>> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
>>>
>>>
>>
>>
>>  --
>> *Dr David Raffelt*
>> Post Doctoral Fellow
>>
>>  The Florey Institute of Neuroscience and Mental Health
>> Melbourne Brain Centre - Austin Campus
>> 245 Burgundy Street
>> Heidelberg Vic 3084
>> Ph: +61 3 9035 7024
>>  www.florey.edu.au
>>
>>
>> _______________________________________________
>> Mrtrix-discussion mailing list
>> Mrtrix-discussion at www.nitrc.org
>> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>>
>>
>
> --
> Dipl.-Inform. Peter Neher
> German Cancer Research Center
> (DKFZ, Deutsches Krebsforschungszentrum in der Helmholtz-Gemeinschaft, Stiftung des öffentlichen Rechts)
> Division of Medical and Biological Informatics
> Im Neuenheimer Feld 280, D-69120 Heidelberg
>
> Phone: 49-(0)6221-42-3552, Fax: 49-(0)6221-42-2345
> E-Mail: p.neher at dkfz-heidelberg.de, Web: www.dkfz.de
>
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
>
>
> _______________________________________________
> Mrtrix-discussion mailing list
> Mrtrix-discussion at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20121021/a95fd96a/attachment.html


More information about the Mrtrix-discussion mailing list