Skip to content
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

MRG, ENH: Add flatmap #8082

Merged
merged 9 commits into from
Aug 10, 2020
Merged

MRG, ENH: Add flatmap #8082

merged 9 commits into from
Aug 10, 2020

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Aug 3, 2020

plot_visualize_stc.py on my system with this:

Screenshot from 2020-08-03 11-41-55

  • Reading function, plotting works
  • Interaction works
  • Wait for MRG, ENH: Volume rendering #8064 to be merged and rebase
  • Add checks that isn't used with vector or volume
  • Add some simple tests for brain
  • Add doc about how to get flat maps
  • Fix window-sizing bug

Closes #8081

@larsoner larsoner added this to the 0.21 milestone Aug 3, 2020
@larsoner
Copy link
Member Author

larsoner commented Aug 3, 2020

cc @johnsam7 this should help prepare us to visualize cortex + cerebellum flatmaps

@agramfort
Copy link
Member

we should document or point to external doc on how to compute the flatmaps. Last time I tried It required manual work.

@larsoner
Copy link
Member Author

larsoner commented Aug 3, 2020

I have no idea how actually. I just know fsaverage has them. For now maybe it's enough just to tell people to morph?

@agramfort
Copy link
Member

agramfort commented Aug 3, 2020 via email

@larsoner
Copy link
Member Author

larsoner commented Aug 3, 2020

There are tutorials here:

I'll add a note that it's available for fsaverage and otherwise you need to do something like the above while adding tests soon

@agramfort
Copy link
Member

agramfort commented Aug 5, 2020 via email

@larsoner larsoner changed the title WIP: Add flatmap MRG, ENH: Add flatmap Aug 5, 2020
@larsoner
Copy link
Member Author

larsoner commented Aug 5, 2020

Ready for review/merge from my end

@larsoner
Copy link
Member Author

larsoner commented Aug 7, 2020

@GuillaumeFavelier do you want to take a look?

@larsoner
Copy link
Member Author

larsoner commented Aug 8, 2020

CircleCI failure is just the one fixed by #8109

Copy link
Contributor

@GuillaumeFavelier GuillaumeFavelier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @larsoner. This is all good to me :)

@@ -409,6 +418,9 @@ def add_data(self, array, fmin=None, fmid=None, fmax=None,
clim : dict
Original clim arguments.
%(src_volume_options_layout)s
colorbar_kwargs : dict | None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a plan with colorbar_kwargs? I don't see it used in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I don't use it in this example, locally I use it to set the tick and title sizes. Do you think I should update an example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be great to have it used once at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larsoner larsoner merged commit 64e3dd0 into mne-tools:master Aug 10, 2020
@larsoner larsoner deleted the flatmap branch August 10, 2020 16:02
@agramfort
Copy link
Member

agramfort commented Aug 12, 2020 via email

@larsoner
Copy link
Member Author

It would require writing a new VTK interactor, so no not really. We should probably add a keyboard command to _Brain that resets to the original views

@agramfort
Copy link
Member

agramfort commented Aug 12, 2020 via email

@larsoner
Copy link
Member Author

Sure, I would say it should reset the time index and views -- basically get everything back to how it was when the viz was opened

@agramfort
Copy link
Member

agramfort commented Aug 12, 2020 via email

@larsoner
Copy link
Member Author

Added it as an item in #7162

GuillaumeFavelier added a commit to GuillaumeFavelier/mne-python that referenced this pull request Jan 20, 2021
agramfort added a commit that referenced this pull request Jan 21, 2021
* Add screenshot button

* Ensure valid filename

* Make the name shorter

* Use Brain screenshot

* Click on all buttons

* Count the buttons too

* Add a tool bar to the standard _Renderer

* Improve testing of standard _Renderer

* DRY a little bit

* Use concatenate_images

* Make it shorter and more complicated

* Fix style

* Add centered parameter

* Comment slicing

* make it work on mac

* Remove cruft

* Update comments

* Remove more comments

* Generate screenshot filename

* Start over and test

* Test both qt and notebook

* The pragmatic approach

* Improve testing

* Fix test

* ENH: Faster test

* BUG: More explicit height

* Fix dangling objects issue

* Change order

* Try #8082

* FIX: Fix sizing

* FIX: Use concatenate_images

* FIX: dtype

* MAINT: Notebook test

* FIX: Flake

* Speed up test.ipynb

* FIX: Bad Qt/VTK combo

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Flatmaps for cortex
3 participants