-
Notifications
You must be signed in to change notification settings - Fork 429
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
Applying image-based deformations to streamlines example #2400
Comments
Hi Bramsh,
Fair question. It's a bit of a strange pattern: the example you are trying
to run depends on running this other example first:
https://github.com/dipy/dipy/blob/541b5b2992e786b5f51d05649a398cb331903456/doc/examples/streamline_tools.py
That's the thing it's trying to import. That also explains where the
already-initialized variable is coming from. But it also means that the
example will only work if it is run in the context of our source tree. This
is not a free-standing example that runs on its own. Maybe we should
document this better?
…On Thu, May 20, 2021 at 9:14 AM Bramsh Q Chandio ***@***.***> wrote:
Description
In this example on applying image-based deformations to streamlines
doc/examples/streamline_registration.py <http://url>,
I don't understand what this part is doing
https://github.com/dipy/dipy/blob/541b5b2992e786b5f51d05649a398cb331903456/doc/examples/streamline_registration.py#L32-L34
Also gives me an error when I run it:
ModuleNotFoundError: No module named 'streamline_tools'
And why are we accessing hardi_img variable before it is initialized?
https://github.com/dipy/dipy/blob/541b5b2992e786b5f51d05649a398cb331903456/doc/examples/streamline_registration.py#L34
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2400>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA46NUI2QMOJ5C37OHI6PTTOUYNLANCNFSM45HLIFOA>
.
|
Hi @arokem Thank you for the explanation. Running this tutorial https://github.com/dipy/dipy/blob/541b5b2992e786b5f51d05649a398cb331903456/doc/examples/streamline_tools.py solved the issues. However, I found out that the output generated by https://dipy.org/documentation/1.4.1./examples_built/streamline_registration/#example-streamline-registration is very strange looking. Here green is the original bundle and pink after registration. |
Might be worth viewing in the context of the MNI template. It might have moved to the right place with respect to the template? |
Yeah - that's no good. |
I think the issue is that moving bundle and image are not in the same space to begin with So when static and moving images are aligned and that transformation is applied to the bundle it generates spurious output as that bundle was not in the same space as the moving image. It is assumed that moving image and bundle are in the same space, probably coming from the same subject which doesn't seem to be true in this case. |
Here's the issue, density map, and the streamlines saved from this example https://github.com/dipy/dipy/blob/541b5b2992e786b5f51d05649a398cb331903456/doc/examples/streamline_tools.py are not in the same space. |
Thank you for pointing that out. it would be good to:
|
Maybe we should make a fetcher for these trk files, just so we can make this example freestanding? |
Description
In this example on applying image-based deformations to streamlines doc/examples/streamline_registration.py,
I don't understand what this part is doing
dipy/doc/examples/streamline_registration.py
Lines 32 to 34 in 541b5b2
Also gives me an error when I run it:
ModuleNotFoundError: No module named 'streamline_tools'
And why are we accessing hardi_img variable before it is initialized?
dipy/doc/examples/streamline_registration.py
Line 34 in 541b5b2
The text was updated successfully, but these errors were encountered: