Skip to content

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.

1 participant