필터 지우기
필터 지우기

How to transfer the size of a zoomed in image to the entire stack?

조회 수: 1 (최근 30일)
Phil
Phil 2013년 4월 3일
Hey,
currently I'm writing a GUI. It simply imports a tiff-stack and has some basic functions like pausing, resuming or sliding through the entire video. Works fine so far. However, I tried to zoom in a particular region. (I created the GUI via GUIDE and added the zoom in/zoom out tools by it's toolbar editor). This works for the first displayed image in the stack. When I play the movie, however, the images are displayed in the "original" size. I'd like to keep the size of the zoomed in region throughout the entire stack. How is this possible? I wonder if it is possible to somehow retrieve the size of the cropped region (I can not find the handles structure nor a callback for the zoom-function) and transfer it to the original stack?
I'd appreciate any kind of help since I'm rather new to GUIs.
Best wishes,
Phil

답변 (2개)

Walter Roberson
Walter Roberson 2013년 4월 3일
You can examine the axis XLim and YLim properties: those are what is changed to "zoom".

Phil
Phil 2013년 4월 3일
편집: Walter Roberson 2013년 4월 3일
Thanks for your answer!
This is what I tried in the "ClickedCallback" of the zoom tool. What I did was:
xlim = get(handles(1).axes1, 'XLim');
ylim = get(handles(1).axes1, 'YLim');
which returned the minimum/maximum values of the axis. However, after modifying the callback, the zoom tool(s) didn't work anymore (this is what MATLAB warned me to do anyway: "Changing this callback property will modify the predefined behavior of this tool". Basically I do not know which of the callbacks to refer to.. clicked, on or off-callback.
Thx again,
Philipp

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by