# MouseWheelForwardEvent does not work with vtkResliceImageViewer

**URL:** https://discourse.vtk.org/t/mousewheelforwardevent-does-not-work-with-vtkresliceimageviewer/684
**Category:** Support
**Created:** [April 4, 2019, 11:20am UTC](https://discourse.vtk.org/t/mousewheelforwardevent-does-not-work-with-vtkresliceimageviewer/684 "2019-04-04T11:20:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zandarina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/4af34b/32.png) [@zandarina](https://discourse.vtk.org/u/zandarina)
#### Post date: [April 4, 2019, 11:20am UTC](https://discourse.vtk.org/t/mousewheelforwardevent-does-not-work-with-vtkresliceimageviewer/684/1 "2019-04-04T11:20:49Z")

</div>

Dear all

I want to add an observer of mousewheelforward but it does not work. If i change it for another one like InteractionEvent it works but not with the wheel. I even tried to get the event when there is a mouse interaction but nothing. It is like it does not get the wheel information at all. I use vtkResliceImageViewer. I have used many ways, interator style, and others as you can see it commented. They work but without the wheel of the mouse.

Thanks in advance

My code is the following:  
¨

```
	image_viewer_->SetRenderWindow(renderWindow);
	image_viewer_->SetupInteractor(renderWindow->GetInteractor());

	vtkSmartPointer<vtkImageData> image_data = vtkImageData::SafeDownCast(
		scene.get_volume()->GetMapper()->GetInputDataObject(0, 0));

	image_viewer_->SetInputData(image_data);
	image_viewer_->SetSliceOrientationToXY();
	image_viewer_->SetSlice(261);
	image_viewer_->SetResliceModeToAxisAligned();

	/*vtkSmartPointer<vtkCallbackCommand> MyEventCallbackCommand = vtkSmartPointer<vtkCallbackCommand>::New();
	MyEventCallbackCommand->SetCallback(KeypressCallbackFunction);
	renderWindow->GetInteractor()->AddObserver(vtkCommand::MouseWheelForwardEvent,
		MyEventCallbackCommand);*/

	

	vtkNew<vtkAxialInteractionCallback> callback;
	renderWindow->GetInteractor()->AddObserver(vtkCommand::MouseWheelForwardEvent, callback);

}

vtkNew<vtkResliceImageViewer> image_viewer_;

```

};

---

<div class="post-metadata">

### Author: ![Wilhelm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/w/ce7236/32.png) [@Wilhelm](https://discourse.vtk.org/u/Wilhelm)
#### Post date: [September 27, 2023, 5:53am UTC](https://discourse.vtk.org/t/mousewheelforwardevent-does-not-work-with-vtkresliceimageviewer/684/2 "2023-09-27T05:53:51Z")

</div>

You have to image\_viewer\_-\>SetSliceScrollOnMouseWheel(false);
