Kitware / itk-vtk-viewer

2D / 3D web image, mesh, and point set viewer using itk-wasm and vtk.js
https://kitware.github.io/itk-vtk-viewer/
BSD 3-Clause "New" or "Revised" License
210 stars 64 forks source link

Is there a way to limit the zoom level? #672

Closed LeviEyal closed 1 year ago

LeviEyal commented 1 year ago

Hey there! I was wonder if there a way to limit the amount of zoom level that we can zoom in or out some viewer?

PaulHax commented 1 year ago

Hello!

Nothing build in, but you can modify the camera parameters to do this: https://github.com/Kitware/itk-vtk-viewer/blob/master/src/Rendering/VTKJS/vtk/ItkVtkViewProxy.js#L128-L137