New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: QuickBundlesX #1380

Closed
wants to merge 79 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@Garyfallidis
Member

Garyfallidis commented Nov 22, 2017

Hi all,

This is the Hierarchical version of QuickBundles.

I still need to update the tests in this PR. But getting closer and closer.
This PR needs #1358 to be merged first. Please look into it.

More asap!

Garyfallidis added some commits Aug 5, 2017

@MarcCote

I made a quick pass. I'll have to look at the code more carefully. There's clearly some refactoring to be done.

@Garyfallidis I'm thinking that QB is a specialized version of QBx (where there is only one layer). We could only keep the QBx's code. Am I missing something obvious?

max_nb_clusters=np.iinfo('i4').max, bvh=False):
self.threshold = threshold
self.max_nb_clusters = max_nb_clusters
self.bvh = bvh

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

I don't remember what bvhmeans?

This comment has been minimized.

@Garyfallidis

Garyfallidis Jan 18, 2018

Member

bounding volume hierarchy

class QuickBundlesOnline(Clustering):
r""" Clusters streamlines using QuickBundles [Garyfallidis12]_.

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

This docstring needs to be updated to reflect the "online" aspect of that algorithm.

return self._clusters
def cluster(self, streamline, idx=None):
""" Clusters `streamlines` into bundles.

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

This method clusters one streamline at the time because this is the online version of QB.

_traverse(child, level+1)
_traverse(self.root)
return clusters

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

Missing newline

def quickbundlesX(streamlines, Metric metric, thresholds, ordering=None):
""" Clusters streamlines using QuickBundles.

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

QB->QBx

# Build AABB
aabb_creation(self.root.centroid, self.root.aabb)
print "Done"

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

Remove debug prints

self.metric.feature.c_extract(datum, self.features)
self.metric.feature.c_extract(datum[::-1], self.features_flip)
# Important: because the CentroidNode structure contains an uninitialized memview,

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

CentroidNode -> StreamlineInfos

return self._build_clustermap()
def evaluate_aabbb_checks():

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

Is this used somewhere? If so, there's a typo in the name -> evaluate_aabbb_checks

def test_show_qbx_tree():
filename = "/home/marc/research/dat/streamlines/MPI_Camille/myBrain.trk"

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

Need to fix the tests

#test_with_simulated_bundles2()
#test_show_qbx_tree()
#test_show_qbx()
test_3D_segments()

This comment has been minimized.

@MarcCote

MarcCote Dec 21, 2017

Contributor

newline

@Garyfallidis Garyfallidis force-pushed the Garyfallidis:rb_qbx branch from c334c47 to 714531e Jan 19, 2018

@Garyfallidis Garyfallidis referenced this pull request Feb 16, 2018

Merged

QuickBundlesX #1434

@Garyfallidis

This comment has been minimized.

Member

Garyfallidis commented Feb 16, 2018

Closed PR in favor of #1434

@skoudoro skoudoro removed this from WIP in Dipy 0.14.0 Mar 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment