how to use mouse scroll to zoom in/out when using imtool?

3 visualizaciones (últimos 30 días)
Sandy Woo
Sandy Woo el 16 de Sept. de 2020
Editada: Sandy Woo el 25 de Sept. de 2020
I notice that when I'm using the imshow function, I could scroll to zoom in/out, and hold the left mouse button to move the image.
However, I cannot do this when I'm using the imtool function, which provides a quite unfriendly interaction experience. So could I add any codes to achieve this interactive function when I call imtool? e.g. if there are some build-in functions conflict with the drag and drop of the mouse, I could type in these codes and then hold the left ctrl botton and scroll to zoom in/out.
Many thanks!

Respuestas (1)

Image Analyst
Image Analyst el 16 de Sept. de 2020
I don't think you can, unfortunately. You have to either:
  1. Use the + and - magnifying glass icons above the image at the upper right, or
  2. Use control + or control - on the numeric keypad (just like Photoshop if you're familiar with that).
  5 comentarios
Image Analyst
Image Analyst el 25 de Sept. de 2020
The attached demo might help you. That's all I have left to offer.
Sandy Woo
Sandy Woo el 25 de Sept. de 2020
Editada: Sandy Woo el 25 de Sept. de 2020
Hi, thanks a lot for your effort!
I noticed that in the code, Jeff have left a message to explain the origin of the imshow and imtool, so thanks so much for his patience!
Cheers
P.S. for Jeff:
I have tried the code which is a combine of the imshow and the imscroll panels. I noticed that the interaction method is still different from the origin imshow. The fundamental usage of the drag and scroll could be a quick scan through the whole image and find some interesting details with their grey values on certain positions. So for imshow, it's good enough about the drag and scroll function (sometimes the drag and scroll don't work once I call camera toolbar and close it, but that's beyond this discussion)
An advanced example is to draw a freehand roi on a large image. To pick a manual roi, I need to draw it pixel by pixel. So with imshow, I could zoom in and draw a roi, and then zoom out quickly and move to the next position.
But today I have just realized that I could not draw a roi using imtool, so it's function is no longer attractive for me. The only reason that I'm using imtool before is that it could show the pixel value of the cursor instantly, which also could be achieved in a less convenient way through data tips in imshow.
I thought the purpose of the imtool design is to provide a primitive GUI with a few functions used frequently. But currently, the limited functions list on the imtool panel were seldomly used, or I could call these panels separately when I need them. The functions in Image Processing Toolbox have been extensively expanded since 2006, so why not officially add more functions on imtool?
As a GUI tool for image processing, you could try imageJ(it's free and only 70MB). Once you open it, you would love it as it provides massive functions in its menu, which is a very friendly GUI for newbies like medical PhD students. I'm a geoscientist and have used both imageJ and Matlab for over 6 years. I think that imageJ is good for fine operations on individual image and Matlab is better for image batch processing using codes. From this perspective, why Matlab provides the imtool with the functions listed in its menu?
I didn't intend to debate something, and I'm highly thankful for the development of the imtool. I just think that the imtool could be updated or add some fancy functions.

Iniciar sesión para comentar.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by