# Setup Mouse Controls- 2D Viewer window

**URL:** <https://discourse.vtk.org/t/setup-mouse-controls-2d-viewer-window/14353>\
**Category:** Development\
**Created:** [August 5, 2024, 7:27am UTC](https://discourse.vtk.org/t/setup-mouse-controls-2d-viewer-window/14353 "2024-08-05T07:27:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![christeen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@christeen](https://discourse.vtk.org/u/christeen)\
**Post date:** [August 5, 2024, 7:27am UTC](https://discourse.vtk.org/t/setup-mouse-controls-2d-viewer-window/14353/1 "2024-08-05T07:27:19Z")

</div>

In my application, I just want to introduce the 5 button mouse for the interaction. I searched the respective class to setup interaction with respective to the 5 button mouse.

I don’t know setup all these for resliceimageviewer

The following ones are my requirements:

- The application software shall enable the user to browse images of the series by scrolling the vertical mouse wheel.
- The application software shall enable the user to mark a point on the image by single-clicking the left mouse button.
- The application software shall enable the user to adjust the image window (brightness and contrast) by pressing the left and right mouse buttons together and moving the mouse.
- The application software shall enable the user to zoom the image (with the current mouse cursor position as a point of focus) in or out by pressing the middle mouse button and moving the mouse up and down.
- The application software shall enable the user to pan the image by pressing the right mouse button and moving the mouse.
- The application software shall enable the user to measure the length by pressing the front (4th) mouse button and moving the mouse.
- The application software shall enable the user to measure the angle by pressing the front (5th) mouse button and moving the mouse.
- The application software shall enable the user to toggle full-screen mode by double-clicking the left mouse button on the image.
