Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:04
    skoudoro edited #2312
  • 03:04
    skoudoro edited #2312
  • Jan 26 21:55
    pep8speaks commented #2304
  • Jan 26 21:55
    arokem synchronize #2304
  • Jan 26 17:16
    pep8speaks commented #2304
  • Jan 26 17:16
    arokem synchronize #2304
  • Jan 26 13:27
    skoudoro commented #2314
  • Jan 26 13:26
    skoudoro labeled #2314
  • Jan 26 13:26
    skoudoro labeled #2314
  • Jan 26 13:17
    dulietina opened #2314
  • Jan 25 03:00
    wjy73 opened #2313
  • Jan 20 22:13
    skoudoro commented #2312
  • Jan 20 16:32
    Garyfallidis edited #2312
  • Jan 20 16:32
    Garyfallidis edited #2312
  • Jan 20 16:30
    Garyfallidis edited #2312
  • Jan 20 16:27
    Garyfallidis edited #2312
  • Jan 20 12:40
    jsjol commented #1826
  • Jan 20 12:37
    pep8speaks commented #1826
  • Jan 20 12:36
    jsjol synchronize #1826
  • Jan 20 11:27
    pep8speaks commented #1826
Serge Koudoro
@skoudoro
Last precision: It is working correctly with the function. The small bug is only with the command line interface.
Strivathsavashwin
@Strivathsavashwin
Hi all,
I have a query. Let us say that we have a dMRI image with b = 1000 and 32 different acquisitions. Is there any way we can plot the principal eigen value in a voxel level individually for an acquisitions. I believe that the above task could help me understand how the diffusion signal changes with different values of b vectors
Ariel Rokem
@arokem
@Strivathsavashwin : see "Getting started" on this page: https://dipy.org/documentation/1.3.0./index/
JuddHe
@vsmallerx
Hi @skoudoro, Thank you for your help!
Strivathsavashwin
@Strivathsavashwin
Hello @arokem thanks for the suggestions. Do you have any suggestions on how to obtain a white matter mask for a diffusion MRI .nii file?
Ariel Rokem
@arokem
@Strivathsavashwin Depending on you data you can either: 1. Use an FA threshold, or 2. Use the trick we do here: https://dipy.org/documentation/1.3.0./examples_built/reconst_mcsd/#example-reconst-mcsd, to generate an anistropic power map and then feed that into TissueClassifierHMRF
Strivathsavashwin
@Strivathsavashwin
Hi @arokem thanks for the suggestion. I have been working on to implement it. Also I have downloaded with a diffusion MRI dataset with 33 acquisitions for different directions. I am interested to visualize each of the acquisition individually. When I used the shape attribute on the dMRI data I got (90, 108, 90, 33). So my guess is that there are around 33 volumes with varying bvecs and each volume has the dimension (90, 108, 90). Is my guess based on the shape correct and is there any way to visualize it each volume individually with the fiber bundles overlaid on each volume?
Bramsh Q Chandio
@BramshQamar

Hello everyone,
I am presenting Bundle Analytics (BUAN), a computational framework for investigating the shapes and profiles of brain pathways across populations paper recently published in Nature Scientific Reports on 18th-Nov-2020 at 12:00 pm EST. There will be a demo of the BUAN framework in DIPY too. You can attend the DIPY meeting (dipy/dipy#2229) for the talk.
Read the paper here: https://www.nature.com/articles/s41598-020-74054-4
Thank You,
Bramsh

Hello,

Thank you all for joining the DIPY open meeting for the BUAN talk.

In case you missed it, here's the link to the recorded BUAN presentation: https://youtu.be/9Ay1rhRTaKU

Best,
Bramsh

Uzair Hussain
@uhussai7
In dipy version 1.2.0 there is no dipy.tracking.eudx and LocalTracking from dipy.tracking.local_tracking does not have an "ang_thr" option. Is there any way that "ang_thr" can be set -- just how it is in dipy.tracking.eudx?
1 reply
Strivathsavashwin
@Strivathsavashwin
Hi all,
I have a .trk file individually for the fiber bundles like CC.trk, CA.trk and so on. Is it possible to extract the streamlines separately and display the length of the streamlines side by side. For eg, CA bundle has 431 streamlines. I would like to display each of the 431 streamlines with length
Eleftherios Garyfallidis
@Garyfallidis
@Strivathsavashwin how do you want to see the lengt? In the 3D scene or the terminal? Can you clarify? Both possible with a tiny bit of code. But please clarify.
Strivathsavashwin
@Strivathsavashwin
Hi @Garyfallidis. I am interested to see how the shape varies within the fibers in a bundle to have an idea whether there is a change in shape. I tried to display it in 3D used 3Dscatterplot but I was not able to get a feel of the shape. If possible I would like to avail two options you have suggested.
Strivathsavashwin
@Strivathsavashwin
Hi @BramshQamar . I have a question. I have around 25 .trk files like CA. trk, CC.trk, CST. Can I apply your framework to obtain some features associated with the 25 bundles I have?
Bramsh Q Chandio
@BramshQamar
Hi @Strivathsavashwin, Yes, you can use your atlas with any number of bundles (25 in your case) and run BUAN on it.
Let me know if you have any questions on how to run BUAN
Bramsh Q Chandio
@BramshQamar
@Strivathsavashwin you can visualize each streamline with a different color to see how they vary in length

from dipy.viz import window, actor

scene = window.Scene()
scene.SetBackground(1, 1, 1)

colors = [np.random.rand(3) for streamline in bundle1]

stream_actor = actor.line(bundle1, colors, linewidth=0.5)

scene.add(stream_actor)

window.show(scene)

where bundle1 will have your streamlines
Screen Shot 2020-12-06 at 3.34.07 PM.png
Bramsh Q Chandio
@BramshQamar
here's a detailed code:
``

`
from dipy.viz import window, actor
import numpy as np
from dipy.io.streamline import load_trk, save_trk

load your .trk file

bundle1 = load_trk("yourfile.trk", reference="yourfile.trk", bbox_valid_check=False).streamlines

or load data from dipy for this example

from dipy.data import two_cingulum_bundles

bundle1, _ = two_cingulum_bundles()

visualize the data

scene = window.Scene()
scene.SetBackground(1, 1, 1)

create random colores for sreamlines (one color for each streamline)

colors = [np.random.rand(3) for streamline in bundle1]

stream_actor = actor.line(bundle1, colors, linewidth=0.5)

scene.add(stream_actor)

Visualize it

window.show(scene)

`

`# Hitogram plot for the length of streamlines in a bundle/tractogram

import matplotlib.pyplot as plt
from dipy.tracking.streamline import length

lengths = [length(s) for s in bundle1] #Euclidean length of streamlines

lengths = [len(s) for s in bundle1] #this is for number of points per streamline

plt.hist(lengths, bins='auto')
plt.xlabel('Length')
plt.ylabel('count')
plt.show()`

`# Hitogram plot for the length of streamlines in a bundle/tractogram

import matplotlib.pyplot as plt
from dipy.tracking.streamline import length

lengths = [length(s) for s in bundle1] #Euclidean length of streamlines

plt.hist(lengths, bins='auto')
plt.xlabel('Length')
plt.ylabel('count')
plt.show()`

Bramsh Q Chandio
@BramshQamar
# You can give color to streamlines based on their lengths
scene = window.Scene()
scene.SetBackground(1, 1, 1)

#create random colors for streamlines 

colors = [np.random.rand(3) for sl in range(int(max(lengths)))]

all_colors = []

for i in range(len(bundle1)):

    all_colors.append(colors[int(lengths[i])-1]) #assign color to streamlines based on their length

#streamlines with same color have same length
stream_actor = actor.line(bundle1, all_colors, linewidth=1)

scene.add(stream_actor)

#Visualize it
window.show(scene)
Strivathsavashwin
@Strivathsavashwin
Hi @BramshQamar thanks for the information. I also have a question. So could we extract any set of features which could help us distinguish the 25 bundles like shape or anything using BUAN?
Bramsh Q Chandio
@BramshQamar

Hi @Strivathsavashwin

What kind of features do you want to extract from bundles?

Strivathsavashwin
@Strivathsavashwin
Hi @BramshQamar. In my mind I have shape and maybe energy based on change in diffusion values along the fiber tracts from dMRI but I am not sure about it. What I want to do is to extract some features which could help me differentiate the streamlines among 25 fiber bundles
Eleftherios Garyfallidis
@Garyfallidis
@Strivathsavashwin that is easy with DIPY have you looked into the QuickBundles tutorials? You can cluster by shape or length.
Strivathsavashwin
@Strivathsavashwin
Hi @Garyfallidis. I have been looking into QtBundles. I came across arc length feature. I tried to input the CA bundle and I used the arc length feature. I got an array called clusters. I am not able to figure out what exactly is the arc length and how is it different from the streamline length.
Strivathsavashwin
@Strivathsavashwin
Hi all,
What does this function get_sphere('repulsion724') do? In the documentation it has been mentioned the above function provided triangulated spheres. I am not able to understand fully what it means. Is it that it takes any unit sphere and obtains 724 points ? And also are the 724 points obtained by the principle of electrostatic repulsion and the points are obtained in such a way to have less electrostatic repulsion
Paul Jacobs
@PeePeeJay_gitlab
Hi all,
There's a problem in the https://dipy.org/documentation/0.16.0./examples_built/bundle_extraction/ tutorial, with loading the tractogram. The load_trk() method requires the positional argument 'reference'. Giving the keyword 'same' like suggested in the Dipy 1.3 documentation doesn't fix it and produces a non valid bounding box. Any ideas how to fix that? Thanks in advance
Paul Jacobs
@PeePeeJay_gitlab
edit: fixed it by setting bbox_valid_check=False
Ariel Rokem
@arokem
@PeePeeJay_gitlab : for what it's worth, if you are using DIPY 1.3, you might want to look at this tutorial here: https://dipy.org/documentation/1.3.0./examples_built/bundle_extraction/#example-bundle-extraction instead
Paul Jacobs
@PeePeeJay_gitlab
@arokem Thanks a lot for the answer. Actually I just managed to "upgrade" the tutorial to the latest version by my self. ;)
By the way just wanted to say how much I appreciate your work and of all contributors. This is actually the best documented library with great tutorials and referencing of papers I've ever saw. This really helps developing and broaden one's horizon. Thank you for that.
Ariel Rokem
@arokem
Thanks! :tada: :christmas_tree: :star:
Rajikha Raja
@rajikha
Hi Dipy team, I am trying to do tractogram registration using whole_brain_slr function. The atlas trk is the one from HCP 842 as given in DIPY recobundles examples. The target whole brain trk is generated using DSI studio QSDR reconstruction. Both the tractograms are in different orientations, atlas in RAS and target in LPS. whole_brain_slr is failing without any error messages. Could you please suggest me on the correct way of using whole_brain_slr?
barıs asdf
@aksbaris_twitter
hi everyone. can i use dipy IVIM fitting for sacroiliac diffusion MRI ?
Strivathsavashwin
@Strivathsavashwin
Hi everyone, is it possible to overlay the .trk files on top of dMRI .nii file?
Shreyas Fadnavis
@ShreyasFadnavis
Hi @aksbaris_twitter ! I think you can. What type of acquisition scheme do you have? IVIM typically requires smaller b-values. I could help you out if you have any more concerns!
Strivathsavashwin
@Strivathsavashwin
Hi all, I have a question. I have the set of 3D coordinates from .trk files. Is it possible to highlight the corresponding 3D coordinates in the dMRI file of size (90,108,90,33) ?
Eleftherios Garyfallidis
@Garyfallidis
@rajikha apologies for delaying to answer you. You need to have the two datasets in the same coordinate system. For example try to move the LPS file to be RAS. The best way to do this is to load the LPS dataset and use the stateful tractogram to save it again with an RAS reference (for example the MNI 2009c atlas). I think this will correct your problem. If you still have have issue be happy to share your tractogram so we can try to identify the issue ourselves. What is interesting is that when nibabel is loading the tractogram it should in RAS space anyway.
7 replies
@Strivathsavashwin please use dipy_horizon (command line) or dipy.viz.app.horizon (python script) to see the images and streamlines together.
Uzair Hussain
@uhussai7
If I have bvals, bvecs, data.nii.gz, and nodif_brain_mask.nii.gz, how can I find the spherical harmonic expansion of each shell? I know of "from dipy.reconst.shm import sf_to_sh" but how would one create the spherical signal (sf) from the bvecs. Sorry if this is too obvious.
venkatbits
@venkatbits
Hello everyone, I am new to Python and dipy can someone tell where I can find info, tutorials on how to perform batch processing for all my dataset
venkatbits
@venkatbits
Hello everyone, I am new to Python and dipy can someone tell where I can find info, tutorials on how to perform batch processing for all my dataset