Skip to content

Commit

Permalink
Edit attribute for h text in the viewer (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanicaSTFC authored Oct 10, 2024
1 parent 3713eb2 commit ebf0515
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Dependencies:
Backend:
* Create files graphs_widgets, save_widgets #359

Enhancements:
* edit h text in viewer2D #354

## v24.0.1
Bug fixes:
* Use RawInputDialog from the viewer package #314
Expand Down
24 changes: 22 additions & 2 deletions src/idvc/ui/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def getViewerType(self):
return self.viewer

def createEmptyFrame(self):
#print("empty")
self.frame = QCILViewerWidget(self.parent, self.viewer, shape=(600,600), interactorStyle=self.interactorStyle,
enableSliderWidget=self.enableSliderWidget)
self.setCentralWidget(self.frame)
self.image_file = [""]


def displayImageData(self):
self.createEmptyFrame()
Expand All @@ -74,7 +74,27 @@ def displayImageData(self):
if self.parent.settings.value("volume_mapper") == "cpu":
self.frame.viewer.volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper()
self.frame.viewer.volume.SetMapper(self.frame.viewer.volume_mapper)
else:
elif self.viewer == viewer2D:
self.frame.viewer.style.htext = """
Mouse Interactions:
- Slice: Mouse Scroll
- Quick Slice: Shift + Mouse Scroll
- Zoom: Shift + Right Mouse + Move Up/Down
- Pan: Ctrl + Right Mouse + Move
- Adjust Window: Alt+ Right Mouse + Move Up/Down
- Adjust Level: Alt + Right Mouse + Move Left/Right
Keyboard Interactions:
h: This help
x: YZ Plane
y: XZ Plane
z: XY Plane
a: Whole image Auto Window/Level
w: Region around cursor Auto Window/Level
l: Line Profile at cursor
s: Save Current Image
i: Toggle interpolation of slice
"""
self.frame.viewer.setVisualisationDownsampling(self.parent.resample_rate)
self.frame.viewer.setDisplayUnsampledCoordinates(True)

Expand Down

0 comments on commit ebf0515

Please sign in to comment.