-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Volume Source Estimate Visualization #672
Conversation
you mean because of : In [6]: img.get_affine().astype(int) ? |
@agramfort yes, exactly. We could use the transform matrix to reshape the image, s.t., the dimensions are the way pynax assumes they should be. Or, pynax could accept a transform matrix which enables it to know how to interpret the data. The latter would be the cleaner/more efficient solution IMO. |
I guess there is a bit of work ... |
@mluessi Applying a transform matrix is definitely something I would like to do. However, this is not possible in Pynax for the moment. Without going too much in the details, Pynax is a very low level API that gives you easy efficient interactive plotting, that's it. It is very low level, you have lots of freedom but you won't go beyond displaying simple numpy arrays. Applying a transform matrix is a very good candidate for a layer that would go above the current Pynax implementation. Now, you may want to fix your problem quickly. Here are the solutions:
|
@AlexandreAbraham Thanks for the explanation. For the example, we can leave the index array hard coded such that it works with the example dataset. But if we add a plot function, we will have to format the index list based on the transform matrix (shouldn't be very difficult). |
+1 for taking care of this in stc.plot |
Wooot! Looks very promising. Let us know when to review. |
@mluessi 0.7 or 0.8? |
yes. reopen if you need |
First experiment with visualizing
VolSourceEstimates
using pynax (https://github.com/AlexandreAbraham/pynax).One problem seems to be that the T1.mgz dimensions doesn't correspond to the anatomical directions that pynax assumes. @AlexandreAbraham, it seems to me that pynax should use the header info to do this, or is there an other better/easier way to re-orient the data before supplying them to pynax?