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

Support for new Baker et al. color scheme, and plotting flow on a particular axis #78

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

aviziskind
Copy link

Updates for plotting voxelmorph flow fields with the neurite.plot.flow(...) function. Some notes on the changes:

  • Use the argument cmaps='Baker' to use the newer Baker et al colorwheel.
  • Use the argument mode='transformer' or mode='t' to automatically set a few parameters optimized for plotting flow-fields from transformers.
  • Use the argument yaxis_invert=True to invert the y-axis instead of flipping the data (img_indexing=True).
  • Use the argument reduce=n to downsample a particularly large flow field by a factor of 'n' (should be an integer)
  • The neurite.plot.flow(...) creates a grid of flow fields. But sometimes you may want to plot a single flow field within a larger set of other (non-flow-field) plots. So I put the code that generates a single flow field on a particular axis in the function neurite.plot.flow_ax(ax=...). The neurite.plot.flow then calls this sub-routine when creating a grid of flow fields, preserving backwards compatibility for those who still want to create a grid of flow fields with flow(...), but still allowing you to plot a single flow field on a specific axis (using flow_ax(...)), and without duplicating code.

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.

None yet

1 participant