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

add axis labels to display() #1682

Merged
merged 4 commits into from
Dec 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions starfish/core/_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Viewer = None


NAPARI_VERSION = "0.2.0" # when changing this, update docs in display
NAPARI_VERSION = "0.2.6" # when changing this, update docs in display
INTERACTIVE = not hasattr(__main__, "__file__")


Expand Down Expand Up @@ -226,7 +226,15 @@ def display(
from qtpy.QtWidgets import QApplication
app = QApplication.instance() or QApplication([])

viewer = Viewer()
viewer = Viewer(
axis_labels=[
Axes.ROUND.value,
Axes.CH.value,
Axes.ZPLANE.value,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would grab these three from starfish/core/imagestack/dataorder.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ttung , it looks like AXES_DATA contains names and orders for round, channel, and z, but not x and y. Should I just assume (y, 3) and (x, 4)? Or is the axis ordering for y and x stored elsewhere?

Copy link
Collaborator Author

@kevinyamauchi kevinyamauchi Dec 2, 2019

Choose a reason for hiding this comment

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

(you can rotate views in napari, so the y and x axis names may get displayed)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, Y and X are not stored anywhere. It has always been assumed Y then X.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ttung, I changed it such that the axis order comes from starfish.core.imagestack.dataorder.

Axes.Y.value,
Axes.X.value
]
)
new_viewer = True
elif isinstance(viewer, Viewer):
new_viewer = False
Expand Down