Skip to content

Commit

Permalink
BUG: Fix QuickBundles instantiation
Browse files Browse the repository at this point in the history
Fix `QuickBundles` instantiation.

`dipy.segment.quickbundles. QuickBundles` was deprecated in favor of
``dipy.segment.clustering.QuickBundles` by DIPY commit
dipy/dipy@a809bb5

which as merged in DIPY 0.9.2 PR
dipy/dipy#568

And it was removed in DIPY 1.0.0 PR
dipy/dipy#1827
  • Loading branch information
jhlegarreta committed Oct 16, 2019
1 parent fb85f08 commit 41e92be
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions challenge_scoring/metrics/invalid_connections.py
Expand Up @@ -8,7 +8,7 @@
import os
import random

import dipy.segment.quickbundles as qb
from dipy.segment.clustering import QuickBundles
import numpy as np
from scipy.spatial.distance import cdist

Expand Down Expand Up @@ -114,10 +114,8 @@ def group_and_assign_ibs(candidate_streamlines, ROIs,
random.shuffle(candidate_streamlines)

# TODO threshold on distance as arg for other datasets
out_data = qb.QuickBundles(candidate_streamlines,
dist_thr=20.,
pts=12)
clusters = out_data.clusters()
qb = QuickBundles(threshold=20., metric="MDF_12points")
clusters = qb.cluster(candidate_streamlines)

logging.debug("Found {} potential IB clusters".format(len(clusters)))

Expand Down

0 comments on commit 41e92be

Please sign in to comment.