Skip to content

Commit

Permalink
Set axis names correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Oct 2, 2015
1 parent b563846 commit 34aed98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vispy_volume/options_widget.py
Expand Up @@ -108,9 +108,12 @@ def __init__(self, parent=None, vispy_widget=None):
def set_valid_components(self, components):
self.ui.component.clear()
for component in components:
print(component)
self.ui.component.addItem(component, component)

def set_axis_names(self, names):
for idx in range(3):
self.axis_labels[idx].setText(names[idx])

def _reset_view(self):
"""
Reset the sliders, colormap, view mode, and camera
Expand Down
1 change: 1 addition & 0 deletions vispy_volume/vol_vispy_widget.py
Expand Up @@ -70,6 +70,7 @@ def data(self, data):
first_data.shape[2] ** 2)
self.ori_distance = self.cube_diagonal / (np.tan(np.radians(60)))
self.options_widget.set_valid_components([c.label for c in data.component_ids()])
self.options_widget.set_axis_names([data.coords.axis_label(idx) for idx in range(3)][::-1])
self._refresh()

@property
Expand Down

0 comments on commit 34aed98

Please sign in to comment.