[Neuroimaging] Tractography normalization

Ben Cipollini ben.cipollini at gmail.com
Thu Aug 13 02:36:51 CEST 2015


Maybe pass a list of matrices, rather than recursive calls?
On Aug 12, 2015 5:31 PM, "Ariel Rokem" <arokem at gmail.com> wrote:

> What do you think about the following:
>
> On Wed, Aug 12, 2015 at 4:33 PM, Eleftherios Garyfallidis <
> garyfallidis at gmail.com> wrote:
>
>> Hi Ariel,
>>
>> Very good point.
>>
>> We don't have such a transform method that can take both streamlines and
>> images.
>>
>> Certainly Omar had a similar function in some previous version of his PR
>> where you could apply the transformations into points/streamlines.
>>
>> I am sure he will be happy to put those back (if they are not already).
>> They can be useful for many things.
>>
>> I am not sure it is necessary to have the same transform method operating
>> both with images and streamlines at the same time for now.
>>
>> As a first step I would make a function and put it in
>> dipy.tracking.streamline where if you have a diffeomorphic map you can apply
>> that to the streamlines. It could be an extension of
>> transform_streamlines which works with an affine matrix.
>>
>
>
> How about refactoring this function so that if it gets a matrix, it does
> what it currently does, and if it gets a (x,y,z,3) array, it uses this as a
> warp field on the points? We can implement an `apply_warp_field` function
> that does that part of the function.
>
> We'd have to assume that the streamlines are already in register with the
> warp field, so we might end up sometimes doing something like:
>
> transform_streamlines(transform_streamlines(transform_streamlines(sl,
> affine), warp_field), np.linalg.inv(affine))
>
> :-)
>
>
>
>> After we test this one then we can try to include it to the transform
>> method of the Diffeomorphic Map.
>>
>> But we need both versions. Because some times people register the images
>> first and then much later they want to apply the fields to the
>> streamlines.
>>
>> Having such an easy API to do these things that were so messy before is
>> SO EXCITING! :D
>>
>> So yeah it should be trivial with the current API. If Omar is busy with
>> his PhD thesis we can go ahead and do it ourselves.
>>
>> Cheers,
>> Eleftherios
>>
>>
>> On Wed, Aug 12, 2015 at 7:10 PM, Ariel Rokem <arokem at gmail.com> wrote:
>>
>>> Hi Eleftherios,
>>>
>>> Just considered this one today:
>>>
>>> On Tue, Aug 4, 2015 at 6:25 PM, Eleftherios Garyfallidis <
>>> garyfallidis at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> On Tue, Aug 4, 2015 at 7:21 PM, Jorge Rudas <jrudascas at gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks for your answer Eleftherios
>>>>>
>>>>> One questions more...
>>>>>
>>>>> Be happy to ask as many questions as you need until everything is
>>>> clear. I am sure you will need
>>>> feedback from us to perform such an analysis. That is because although
>>>> we are currently working on making
>>>> easy workflows, right  now you will need write your own scripts
>>>> combining different DIPY tutorials of the
>>>> development version.
>>>>
>>>> Of course I am more than happy to help you with this.
>>>>
>>>>
>>>>> When you say "then apply the deformation fields to the tractographies",
>>>>> what exactly does this mean ?
>>>>>
>>>>> You will generate streamlines and FA maps in the native space of every
>>>> subject. Then you can for example register
>>>> the FAs to an FA template. After you have performed this registrations
>>>> you will also have saved the deformation fields
>>>> which were applied to the FAs so that they can be registered to the FA
>>>> template. Because the tractographies were
>>>> in the same space (native) as the FAs the same deformation fields can
>>>> be used to warp them to the FA template space
>>>> and in that way your tractographies will also be normalized.
>>>>
>>>
>>> Do we have an implementation of functions that take a non-linear
>>> transform and streamlines and warp the streamlines through this transform?
>>> Or should we implement something like this? As it is now, the
>>> DiffeomorphicMapping.transform method (and the functions that get called
>>> under the hood there) take a 3D or 2D image as input, but it should be
>>> fairly straightforward also enable these functions to take lists of
>>> streamlines and operate on these instead. Is this something that already
>>> works?
>>>
>>> Cheers,
>>>
>>> Ariel
>>>
>>>
>>> _______________________________________________
>>> Neuroimaging mailing list
>>> Neuroimaging at python.org
>>> https://mail.python.org/mailman/listinfo/neuroimaging
>>>
>>>
>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
>>
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150812/0963793a/attachment.html>


More information about the Neuroimaging mailing list