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

Online tutorial of quickbundles does not work for released version on macosx #665

Closed
Garyfallidis opened this Issue Jun 15, 2015 · 9 comments

Comments

Projects
None yet
4 participants
@Garyfallidis
Member

Garyfallidis commented Jun 15, 2015

Possible cause is that the api has changed between the development and the released version.

@MarcCote

This comment has been minimized.

Contributor

MarcCote commented Jun 16, 2015

What kind of errors do you get?

@jmollink

This comment has been minimized.

jmollink commented Jul 28, 2015

Is there any workaround for this issue?

@arokem

This comment has been minimized.

Member

arokem commented Jul 28, 2015

The version online is from the bleeding edge of our github repo. Try using an older version of the tutorial: https://github.com/nipy/dipy/blob/0.8.0/doc/examples/segment_quickbundles.py

@MarcCote

This comment has been minimized.

Contributor

MarcCote commented Jul 29, 2015

Dipy 0.8 is quite old. In Dipy 0.9 the new QuickBundles (faster) uses the new clustering framework.
@jmollink can you paste the error it gives you?

@jmollink

This comment has been minimized.

jmollink commented Jul 29, 2015

@MarcCote in the online quickbundles tutorial (http://nipy.org/dipy/examples_built/segment_quickbundles.html), the line:

clusters = qb.cluster(streamlines)

Gave the following error:

Traceback (most recent call last):
File "", line 1, in
File "/Users/jmollink/anaconda/lib/python2.7/site-packages/dipy/segment/clustering.py", line 459, in cluster
ordering=ordering)
File "dipy/segment/clustering_algorithms.pyx", line 110, in dipy.segment.clustering_algorithms.quickbundles (dipy/segment/clustering_algorithms.c:3293)
File "dipy/segment/clusteringspeed.pyx", line 277, in dipy.segment.clusteringspeed.QuickBundles.assignment_step (dipy/segment/clusteringspeed.c:3970)
ValueError: All features do not have the same shape! QuickBundles requires this to compute centroids!

I'm not a python expert, so wasn't sure whether this had anything to do with my own lack of skills until I saw this thread. Using the older version of the tutorial as suggest by @arokem worked fine for me.

Thanks,
Jeroen

@MarcCote

This comment has been minimized.

Contributor

MarcCote commented Jul 29, 2015

@jmollink ok yes, I confirmed that you must have dipy 0.9 (which is the latest stable release). So you should use this tutorial Dipy 0.9 - Segment streamlines with QuickBundles.

In that tutorial, notice the following line:
streamlines = set_number_of_points(streamlines, nb_points=18)

All streamlines will be modified to have the same number of points (which is required by QuickBundles algorithm)! If needed, you can keep a copy of the streamlines like this:
resampled_streamlines = set_number_of_points(streamlines, nb_points=18)

And use resampled_streamlines when doing the clustering:
clusters = qb.cluster(resampled_streamlines).

@Garyfallidis @arokem how is that the tutorials on http://dipy.org do not reflect the latest stable Dipy release?

@arokem

This comment has been minimized.

Member

arokem commented Jul 29, 2015

On Wed, Jul 29, 2015 at 6:31 AM, Marc-Alexandre Côté <
notifications@github.com> wrote:

@jmollink https://github.com/jmollink ok yes, I confirmed that you must
have dipy 0.9 (which is the latest stable release). So you should use this
tutorial Dipy 0.9 - Segment streamlines with QuickBundles
https://github.com/nipy/dipy/blob/maint/0.9.x/doc/examples/segment_quickbundles.py
.

In that tutorial, notice the following line:
streamlines = set_number_of_points(streamlines, nb_points=18)

All streamlines will be modified to have the same number of points (which
is required by QuickBundles algorithm)! If needed, you can keep a copy of
the streamlines like this:
resampled_streamlines = set_number_of_points(streamlines, nb_points=18)

And use resampled_streamlines when doing the clustering:
clusters = qb.cluster(resampled_streamlines).

@Garyfallidis https://github.com/Garyfallidis @arokem
https://github.com/arokem how is that the tutorials on http://dipy.org
do not reflect the latest stable Dipy release?

We occasionally update the content on the website independently of the
release cycle. For example, when we want to advertise that we will be at a
conference. At that point, the current state of the docs on master gets
rendered into the examples, which means that we end up with these kinds of
discrepancies. Hopefully this situation will be remedied once we're done
with the GSoC work and have another release cycle (mid-September?)


Reply to this email directly or view it on GitHub
#665 (comment).

@MarcCote

This comment has been minimized.

Contributor

MarcCote commented Oct 9, 2015

This issue should be fixed by the incoming release (Dipy 0.10).

@arokem

This comment has been minimized.

Member

arokem commented Jan 27, 2016

0.10 is now out. Presumably resolved. Closing

@arokem arokem closed this Jan 27, 2016

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