Skip to content

Commit

Permalink
Update corner annotation with axis label (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanicaSTFC authored Aug 27, 2024
1 parent 4241540 commit 1bcf7a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v24.0.2

Enhancements:
- Update corner annotation with axis label #433
- Add title to ViewerCoordsDockWidget #422
- Adds methods to CILviewer and CILviewer2D #425

Expand Down
3 changes: 2 additions & 1 deletion Wrappers/Python/ccpi/viewer/CILViewer2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,8 @@ def createAnnotationText(self, display_type, data):
slice_coord = self.style.image2world(slice_coord)[self.getSliceOrientation()]
axis_length = self.style.image2world(axis_length)[self.getSliceOrientation()] - 1
data = (round(slice_coord), round(axis_length))
text = "Slice %d/%d" % data
axis_label = self.axisLabelsText[self.getSliceOrientation()]
text = "%s %d/%d" % (axis_label, data[0], data[1])

else:
# In all other cases, we have coordinates, and then we have an extra value
Expand Down

0 comments on commit 1bcf7a3

Please sign in to comment.