[Neuroimaging] [DIPY] Question about whole tracks *.trk registration using SLR

Perea Camargo, Rodrigo Dennis RPEREACAMARGO at mgh.harvard.edu
Tue Oct 17 21:14:19 EDT 2017


Hey Eleftherios,
I tried the code and it works! 😊
(Time to digest/adapt some some python code now… ).
Since I just started poking some python code (and for other new users in case needed), I had to install the vtk package (‘conda install -c clinicalgraphics vtk’)  within python 3 (anaconda dist).

Also, as suggested I `pip --upgrade nibabel` and ` pip --upgrade dipy`

Thank you!
Rodrigo

From: Neuroimaging [mailto:neuroimaging-bounces+rpereacamargo=mgh.harvard.edu at python.org] On Behalf Of Eleftherios Garyfallidis
Sent: Sunday, October 15, 2017 10:28 PM
To: Neuroimaging analysis in Python <neuroimaging at python.org>
Subject: Re: [Neuroimaging] [DIPY] Question about whole tracks *.trk registration using SLR

Hi Rodrigo,

Apologies for the delay. But hey I got a solution for you! I hope you are excited :)
Look at this gist
https://gist.github.com/Garyfallidis/51e34aab47de99eafa887b2b818384ea

This code shows how to do step by step whole brain SLR and I made it work with the
specific datasets that you gave me.

The specific datasets don't need exactly a whole brain SLR because the one brain has much
fewer structures than the other brain but still SLR is robust to incomplete datasets such as these.

Give it a go and give us feedback! :)

All the best,
Eleftherios

p.s. Notice that to load the streamlines I used a more recent API than what you originally used. Make sure you have a recent version of dipy and nibabel.

On Mon, Sep 25, 2017 at 9:50 AM Perea Camargo, Rodrigo Dennis <RPEREACAMARGO at mgh.harvard.edu<mailto:RPEREACAMARGO at mgh.harvard.edu>> wrote:
Hi Eleftherios,
I am included both *.trk files in here: http://www.nmr.mgh.harvard.edu/~rdp20/drop/trk_slf/
IIT2mean.trk was a template TRK downloaded from the tract_querier example (http://tract-querier.readthedocs.io/en/latest/ ) and ADRC_TMP_wholeBrain.trk.gz was generated using dsi_studio (http://dsi-studio.labsolver.org/)

Thanks again,

Rodrigo



On Sep 21, 2017, at 3:46 PM, Eleftherios Garyfallidis <elef at indiana.edu<mailto:elef at indiana.edu>> wrote:

Hi Rodrigo,

Whole brain SLR is a great idea! Thank you for your question.  :)

Have in mind that nibabel.trackvis is the old API. Use nibabel.streamlines.load instead.

Can you please share with me (off the list) your trk files so that I can correct your
script?

A wild guess is that you are not loading the streamlines correctly.

Did you use DIPY to create those trks or another software?

Also, another suggestion is to run QuickBundles first to reduce the size of your
datasets. I mean before starting the SLR.

Here is a sample script (in one of my branches).
https://github.com/Garyfallidis/dipy/blob/recobundles/dipy/workflows/align.py

We are working on making something similar available asap in master.

Best,
Eleftherios



On Thu, Sep 21, 2017 at 1:36 AM Perea Camargo, Rodrigo Dennis <RPEREACAMARGO at mgh.harvard.edu<mailto:RPEREACAMARGO at mgh.harvard.edu>> wrote:
Hi Eleftherios & DIPY community,
I am trying to register two whole brain tracts as shown in your recent publication using the streamline-based linear registration. I am diving into Dipy now and I might have some problems loading the files or registering them.
Following your example ( http://nipy.org/dipy/examples_built/bundle_registration.html#example-bundle-registration), there are 2 issues that may arise when I try it.

1) How to load *.trk files is not shown in your example (it looks like you added to cingulum bundles from your dataset using the dipy.data value…) So I follow this tutorial (http://nipy.org/dipy/examples_built/streamline_formats.html ) to load the streamline and hdr but I am not sure if this is the format SLF() wants it in.

2) So then I try using the srr.optimize( ) function but I get the following problems (check below).

I hope you can help me.
Rodrigo


Here is my Jupyter notebook with the errors I found (any help will be greatly appreciate it):







The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
_______________________________________________
Neuroimaging mailing list
Neuroimaging at python.org<mailto:Neuroimaging at python.org>
https://mail.python.org/mailman/listinfo/neuroimaging
<PastedGraphic-1.png><PastedGraphic-1.png>_______________________________________________

Neuroimaging mailing list
Neuroimaging at python.org<mailto:Neuroimaging at python.org>
https://mail.python.org/mailman/listinfo/neuroimaging
_______________________________________________
Neuroimaging mailing list
Neuroimaging at python.org<mailto: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/20171018/cb0b9ccb/attachment.html>


More information about the Neuroimaging mailing list