Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:02
    arokem commented #2369
  • 03:49
    skoudoro commented #2369
  • 03:35
    skoudoro commented #2625
  • Sep 23 15:20
    drombas commented #2625
  • Sep 23 15:05
    codecov[bot] commented #2553
  • Sep 23 14:26
    codecov[bot] commented #2553
  • Sep 23 14:26
    codecov[bot] commented #2553
  • Sep 23 14:25
    drombas synchronize #2553
  • Sep 22 15:50
    skoudoro labeled #2648
  • Sep 22 15:50
    skoudoro commented #2648
  • Sep 22 03:47
    pjsjongsung opened #2648
  • Sep 20 21:21
    skoudoro commented #2626
  • Sep 20 21:01
    pjsjongsung commented #2626
  • Sep 20 20:24
    skoudoro commented #2626
  • Sep 20 18:37
    pjsjongsung synchronize #2626
  • Sep 20 14:50
    skoudoro edited #2625
  • Sep 20 14:50
    skoudoro edited #2625
  • Sep 19 07:53
    skoudoro edited #2369
  • Sep 18 23:35
    codecov[bot] commented #2369
  • Sep 18 22:47
    codecov[bot] commented #2369
Kerolss
@Kerolss
Hello,
Can anyone help me?
I have got the following issue while running the below command
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Issue: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
N. B) The installation has not done due to the PC shut down, and while I run the command again I have got the mentioned issue
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
kimberlylray
@kimberlylray
@Garyfallidis Im interested in the 2020 DIPY course, could you explain the difference between the 3 and 5 day course registration options? Is it as simple as 3 day includes days 1-3 and 5 day is days 1-5?
Eleftherios Garyfallidis
@Garyfallidis
Yes, that is correct @kimberlylray
Rajikha Raja
@rajikha
Hi DIPY team, I am interested in trying out the various reconstruction models for estimating diffusion using DIPY. May I know , what are the models which can be used for reconstruction in case of single shell DWI and is there any constraints to have higher b-values such as b=2000 for using any specific model? Thank you
Ariel Rokem
@arokem
Hey @rajikha : that is the topic of this long-languishing PR: nipy/dipy#1919
So there's some information there
Rajikha Raja
@rajikha
@arokem Thank you
kimberlylray
@kimberlylray
@Garyfallidis great, thank you!
Thomas
@ThomasTT_gitlab
Hi :) I want to use another metric - MAM. Can anyone help me how to substitute this measure into QuickBundles in Python?
Serge Koudoro
@skoudoro
Hi @ThomasTT_gitlab, you can look at this blog post https://medium.com/isiway-tech/gps-trajectories-clustering-in-python-2f5874204a53 or this tutorial: https://dipy.org/documentation/1.0.0./examples_built/segment_extending_clustering_framework/#example-segment-extending-clustering-framework. Do not hesitate to send us a link of your code. We can see your mistake and it will be easier to help you.
Thomas
@ThomasTT_gitlab
@skoudoro THX a lot :)
Luke Bloy
@bloyl
Hi all, quick question.
I have a registration deformation field (from ITK or something similar) that I would like to apply to an image. it seems like differomorphic map like in this test (https://github.com/nipy/dipy/blob/05c2a75581525ccf2f32d418ebf57fb0c70d9f86/dipy/align/tests/test_imwarp.py#L569-L575) would do it,but i have two questions.
1) I only have a vector field mapping the fixed space to the moving. Where should i attach it as mapping.forward ormapping.backward.
2) Do i need to attach something to the other one
nis02002
@nis02002
Does any one where are the MRI database? both MRI image and b-vectors?
Thomas
@ThomasTT_gitlab
Hi :) As I wrote, I want to use another metric - MAM in QB.I already the distance function but something is not working :( What is wrong? I paste the code below:

class mam(Metric):
""" Computes the mam distance between two streamlines. """
def init(self):

    # For simplicity, features will be the vector between endpoints of a streamline.
    super(mam, self).__init__(feature=VectorOfEndpointsFeature())

def are_compatible(self, shape1, shape2):
    """ Checks if two features are vectors of same dimension.

    Basically this method exists so we don't have to do this check
    inside the `dist` method (speedup).
    """
    return shape1 == shape2 and shape1[0] == 1

def dist(self, v1, v2):

    track1 = np.ascontiguousarray(v1, dtype=np.float32)
    t1_len = track1.shape[0]
    track2 = np.ascontiguousarray(v2, dtype=np.float32)
    t2_len = track2.shape[0]
    # preallocate buffer array for track distance calculations

    #distances_buffer = np.zeros((t1_len ,), dtype=np.float32)
    min_t2t1 = np.zeros((t2_len ,), dtype=np.float32)
    min_t1t2 = np.zeros((t1_len ,), dtype=np.float32) 

    for t2_pi in range(0,t2_len):
        min_t2t1[t2_pi] = np.inf
    for t1_pi in range(0,t1_len):
        min_t1t2[t1_pi] = np.inf
    # pointer to current point in track 1
    t1_pt = track1
    t2_pt = track2
    # calculate min squared distance between each point in the two
    # lines.  Squared distance to delay doing the sqrt until after this
    # speed-critical loop
    for t1_pi in range(0,t1_len):
        # pointer to current point in track 2
        for t2_pi in range(0,t2_len):
            d0 = t1_pt[t1_pi][0] - t2_pt[t2_pi][0]
            d1 = t1_pt[t1_pi][1] - t2_pt[t2_pi][1]
            delta2 = d0*d0 + d1*d1 #+ d2*d2
            if delta2 < min_t1t2[t1_pi]:
                min_t1t2[t1_pi]=delta2

    for t2_pi in range(0,t2_len):
        # pointer to current point in track 2
        for t1_pi in range(0,t1_len):
            d0 = t1_pt[t1_pi][0] - t2_pt[t2_pi][0]
            d1 = t1_pt[t1_pi][1] - t2_pt[t2_pi][1]
            delta2 = d0*d0 + d1*d1 #+ d2*d2
            if delta2 < min_t2t1[t2_pi]:
                min_t2t1[t2_pi]=delta2

    # sqrt to get Euclidean distance from squared distance
    for t1_pi in range(0,t1_len):
        min_t1t2[t1_pi]=math.sqrt(min_t1t2[t1_pi])
    for t2_pi in range(0,t2_len):
        min_t2t1[t2_pi]=math.sqrt(min_t2t1[t2_pi])

    mean_t2t1 = 0
    mean_t1t2 = 0

    for t1_pi in range(0, t1_len):
        mean_t1t2+=min_t1t2[t1_pi]
    mean_t1t2=mean_t1t2 / t1_len
    for t2_pi in range(0, t2_len):
        mean_t2t1+=min_t2t1[t2_pi]
    mean_t2t1=mean_t2t1 / t2_len
    return np.min((mean_t2t1,mean_t1t2))

metric = mam()
qb2 = QuickBundles(threshold=0.15, metric=metric)
clus = qb2.cluster(streamlines)

I will be grateful for help :)
nis02002
@nis02002
how can I check the stanford database?
nis02002
@nis02002
where can I find the database before/after the operation?
Eleftherios Garyfallidis
@Garyfallidis
@nis02002 not sure iif I understand your question. But in your home folder there should be a folder called .dipy inside that folder are all the datasets that are fetched with dipy.
nis02002
@nis02002
@Garyfallidis thanks for the information, I wonder how to check the data information before fetch ( I did have folder for the fetched data, but I don't know the detail information, for example the health/age, or if the patients has certain operation before. Is the any database so that I can go all different kind of dataset?
or I wonder that is there any documents for all the datasets DIPY can fetch?
Shreyas Fadnavis
@ShreyasFadnavis
@nis02002 you might want to take a look at https://github.com/nipy/dipy/blob/master/dipy/data/fetcher.py for all the relevant information of the data. We also have a command line workflow to fetch all the datasets:
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