Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 18 16:45
    skoudoro closed #2679
  • Nov 18 16:45
    skoudoro commented #2679
  • Nov 18 16:01
    ggomezji opened #2679
  • Nov 16 20:17
    drombas commented #2425
  • Nov 16 13:56
    iPsych commented #2425
  • Nov 14 12:37
    samuelstjean commented #2666
  • Nov 14 12:26
    samcoveney commented #2666
  • Nov 14 12:23
    samcoveney commented #2666
  • Nov 14 12:21
    samcoveney commented #2666
  • Nov 10 15:49
    skoudoro closed #2676
  • Nov 10 15:49
    skoudoro locked #2676
  • Nov 10 15:49
    skoudoro commented #2676
  • Nov 10 14:10
    DelinteNicolas opened #2676
  • Nov 09 06:15
    pjsjongsung commented #2626
  • Nov 09 06:10
    codecov[bot] commented #2626
  • Nov 09 06:10
    codecov[bot] commented #2626
  • Nov 09 06:10
    pjsjongsung synchronize #2626
  • Nov 09 06:09
    codecov[bot] commented #2626
  • Nov 09 06:09
    codecov[bot] commented #2626
  • Nov 09 06:08
    pjsjongsung synchronize #2626
Shreyas Fadnavis
@ShreyasFadnavis
FetchFlow
nis02002
@nis02002
@ShreyasFadnavis than you, I will check the details. Looks like the datasets are from stanford lib/HCP and NTU?
nis02002
@nis02002
Anyone knows how to find dMRI dataset with subject has Alzheimer’s disease?
Brian
@bhsilverstein
Hey everybody, question about spatial transformations. I'm trying to migrate my analysis from MRtrix to dipy and encountering some challenges. Right now, I'm trying to align some streamlines with spherical ROIs. They definitely aligned in MRtrix (I used the coordinates drawn from the T1 and transformed to b0 space to generate seed/target ROIs), but after loading the streamlines with load_tractogram using the b0 image as a reference and plotting them with spherical ROIs using sphere_actor and stream_actor, the two are in very different spaces. It looks like the origin is shifted and the spatial scaling is different. Is there some transformation happening under the hood in load_tractogram somewhere? If so, I'm guessing applying the same transformation to my coordinates will solve the issue.
nis02002
@nis02002
Hi everyone, does DIPY fetch HCP datasets?
Ariel Rokem
@arokem
@nis02002: DIPY does not fetch HCP datasets, because we don't have a way to verify that you have agreed to the HCP terms and conditions
That said, we wrote a fetcher to get these data from AWS here: https://github.com/yeatmanlab/pyAFQ/blob/master/AFQ/data.py. It uses the DIPY fetcher infrastructure and extends it via boto3 to fetch data from the HCP open access bucket on AWS. It will require that you get your own HCP credentials. See instructions here: https://wiki.humanconnectome.org/display/PublicData/How+To+Connect+to+Connectome+Data+via+AWS
nis02002
@nis02002
@arokem thanks a lot, I will check it out, it will get HCP image file and b files?
Serge Koudoro
@skoudoro
Hi @ThomasTT_gitlab, I would replace the feature : IdentityFeature instead of VectorOfEndpointsFeature() and then I will remove shape1[0] == 1 on your function are_compatible. You do not need vector in your case for MAM. Let me know if it works, otherwise create an issue on DIPY, it will be easier to help you
Serge Koudoro
@skoudoro
If you want to improve your performance, you can use bundles_distances_mam function from dipy.tracking.distances in your dist function. But I recommend that you check first your version and then compare
Eleftherios Garyfallidis
@Garyfallidis
Hi @bhsilverstein , you have to either transform the streamlines or the ROIs to be in the same space. Are you using latest release version of DIPY?
If yes, then the output of load_tractogram is offering methods to do such transform.
Brian
@bhsilverstein
Thanks, @Garyfallidis . I'm using the latest release. I use Space.RASMM to load the tracks and I've tried using the to_xxxx methods after loading, but without success. They shift the tracks, but not into the space my ROI coordinates are in.
Tho I'm seeing that the affines in the streamline and b0 headers are the same. Perhaps something's off about my ROI coordinates...
Thomas
@ThomasTT_gitlab
Hi @skoudoro thanks for help. It works !
nis02002
@nis02002
Hi everyone, I download the dataset .nii file from ANDI webiste (AD pateints), however, it doesn't have b.value/b.vector, is there any I do DTI analysis?
Rob Reid
@captainnova
Hi, I followed the AFQ tract profile tutorial, https://dipy.org/documentation/1.0.0./examples_built/afq_tract_profiles/#example-afq-tract-profiles , and my final figure does not fully match the one on the page. My AF plot matches, but my CST plot has FA staying between 0.4 and 0.1 until it drops to 0 at node 100. The CST plot on the tutorial page is 0 in most places, which does not seem reasonable. Maybe it needs updating? I am using dipy 1.0.0. Thanks!
Ariel Rokem
@arokem
@captainnova : thanks for the heads up. I agree with you that something's wrong with the results presented on that webpage!
@captainnova : see nipy/dipy#1985
Rob Reid
@captainnova
@arokem : thanks for checking and starting #1985. I've updated it with my result.
nis02002
@nis02002
hi everyone, how can extra the x-y location of water from freewater DTI model? We can plot the data as image, but I also want to check the exact value of locations
AlexBadea
@portokalh

I would be grateful for your thoughts on what could be wrong when feeding labels in utils.connectivity.matrix: M, grouping = utils.connectivitymatrix(streamlines, labels.astype(int), affine_labels,
return_mapping=False,
mapping_as_streamlines=False)

File "/Users/alex/py3/lib/python3.7/site-packages/dipy/tracking/utils.py", line 157, in connectivity_matrix
raise ValueError("label_volume must be a 3d integer array with labelvolume must be a 3d integer array withnon-negative label values
labels
.shape= (200, 400, 200) when labels.max() = 332 and labels.min() = 0. Thanks much!

tried adding 1 to the labels, no difference!
Serge Koudoro
@skoudoro
Hi @portokalh, can you give us the results of labels.ndim ? labells.dtype.kind?
Futhermore, it seems there is an inversion between affine_labels and labels in your function arguments. To make sure that is correct, be explicit on your function: utils.connectivitymatrix(streamlines, label_volume=labels.astype(int), affine=affine_labels, return_mapping=False, mapping_as_streamlines=False)
AlexBadea
@portokalh
Thanks @skoudoro : labels.dtype.kind='i'; labels.ndim=3; running what you suggested takes me to ile "/Users/alex/py3/lib/python3.7/site-packages/dipy/tracking/utils.py", line 164, in <listcomp>
endpoints = [sl[0::len(sl)-1] for sl in streamlines]
ValueError: slice step cannot be zero
2 replies
nis02002
@nis02002
hi everyone , in order to use water free DTI, do we have to get at least three different b-vales/b-vectors?
Ariel Rokem
@arokem
@nis02002 : at least two non-zero b-values, if you intend to use the method implemented here: https://github.com/nipy/dipy/blob/master/dipy/reconst/fwdti.py
There are new developments in the pipeline to remove this constraint, but these methods are not quite ready for general use yet
Hopefully in an upcoming release
zlf123-marker
@zlf123-marker
Excuse me, I want to know how to display t1 data and TRK files with dipy library?
Ariel Rokem
@arokem
@zlf123-marker : you should take a look at the examples on the website: https://dipy.org/tutorials/
zlf123-marker
@zlf123-marker
I have a look, but I want to display my TRK file and t1 data, I don't know what to change?Can you help me @arokem
robertl1996
@robertl1996
Does anybody know where the source code for this denoise library can be found: https://dipy.org/documentation/1.0.0./reference/dipy.denoise/. Particularly the nl means filters
Brian
@bhsilverstein
Hey folks - newbie question here: is there a simple way to concatenate data from two or more stateful tractograms into a single tractogram? I could just pull the streamlines and concatenate them, but I'd like all the metadata to come along with the streamlines.
Jon Haitz Legarreta Gorroño
@jhlegarreta

@robertl1996

Does anybody know where the source code for this denoise library can be found: https://dipy.org/documentation/1.0.0./reference/dipy.denoise/. Particularly the nl means filters

The source code is found here: https://github.com/nipy/dipy/blob/master/dipy/denoise/

Jon Haitz Legarreta Gorroño
@jhlegarreta

@zlf123-marker

I have a look, but I want to display my TRK file and t1 data, I don't know what to change?Can you help me @arokem

DIPY examples/tutorials use data that is fetched directly from a few sites that host the data of interest. If you want to adapt the examples to use your own data, then, instead of using the fetch_* and read_ * commands, you will need to read your local files.

In order to read your t1, you will need to use NiBabel as in
https://nipy.org/nibabel/nibabel_images.html

something like

import nibabel as nib

t1_img =  nib.load(your_t1_filename)
t1 = t1_img.get_data()
fig = plt.figure()
plt.imshow(t1, cmap="gray")

Similarly, to show your TRK file, you can do something similar to this

from dipy.io.streamline import load_tractogram
from fury import window, actor

tractogram = load_tractogram(your_trk_filename, your_t1_filename)
streamlines = tractogram.streamlines
renderer = window.Renderer()
stream_actor = actor.line(streamlines)
renderer.add(stream_actor)
window.record(renderer)

If you want to display your streamlines and your T1 at the same time, you will need to add both actors to the same scene, adding to the above something like

t1_actor = actor.slicer(t1)
renderer.add(t1_actor)
Jakob Wasserthal
@wasserth
Hi, is there a function in dipy to resample streamlines to make all points have a specific distance (in mm) from each other? So longer streamlines would have more points than shorter streamlines.
Wade Weber
@wadeatUT
Hi all. When I convert my Freesurfer apar+aseg back to native space to use as my WM label file in DIPY, it won't let me reslice it. I used Freesurfer's recomendations to go from Tal back to native space and to convert to NIFTI. When I load that file into DIPY and use DIPY's reslice command (from 0.8mm to 2mm), it looks like it's processing, but the shape and zooms haven't changed. Is there something special that I have to do with data converted from Freesurfer? Thanks!
zlf123-marker
@zlf123-marker
@jhlegarreta Thank you very much
Shreyas Fadnavis
@ShreyasFadnavis
Hi @wadeatUT, Can you share the piece of code where you are reslicing the data.. I don't think anything special is needed.. it would be helpful to see what the exact issue is!
Wade Weber
@wadeatUT
@ShreyasFadnavis Thanks for the help. Here's a screenshot of my Jupyter Notebook:
reslice.png
@ShreyasFadnavis Also, if I change "new_zooms" to (3., 3., 3.), the new vox size comes out as (1.2, 1.2, 1.2) instead of 3mm iso? Weird.
Shreyas Fadnavis
@ShreyasFadnavis
@wadeatUT I guess this line is missing: zooms = orig_t1FS_img.header.get_zooms()[:3] and should solve the issue!
Shreyas Fadnavis
@ShreyasFadnavis
dipy_workshop.png
Hi everyone! The DIPY Workshop 2020 Early Bird registration ends in 3 days! To all those interested, visit: https://workshop.dipy.org/ | for any questions mail us: dipy@python.org and for updates, follow us on Twitter: @dipymri !! Looking forward to see you in March at Indiana University Bloomington!
Eleftherios Garyfallidis
@Garyfallidis
:star2: :star: :rocket: :rocket: :rocket: :rocket: :rocket: :rocket: :star: :star2:
Eleftherios Garyfallidis
@Garyfallidis
Thank you for sharing @ShreyasFadnavis
Serge Koudoro
@skoudoro
:+1: :+1: :+1:
zlf123-marker
@zlf123-marker
image.png