How to resize imtool window?

조회 수: 2 (최근 30일)
DB
DB 2023년 9월 14일
답변: Image Analyst 2023년 9월 14일
Hi,
when I magnify the image 2 times, the imtool window size doesn't grow to accomodate the Image new size. So, the magnified image is not displayed full because the window size remains the same. Is there a way to make the window bigger automatically when it's displaying the magnified result? So that I don't have to manually make the window bigger to show the whole new (magnified) image.
imtool(Rimage,[900 1000], InitialMagnification=200);
Thank you!

채택된 답변

Image Analyst
Image Analyst 2023년 9월 14일
Rather than keep resizing the imtool window as the user zooms in or out, why not just maximize the window at the very beginning by getting the handle to it's window and setting the 'WindowState' property of it to 'maximized'?
rgbImage = imread('peppers.png');
handleToWindow = imtool(rgbImage, InitialMagnification = 200);
handleToWindow.WindowState = 'maximized'

추가 답변 (1개)

DGM
DGM 2023년 9월 14일
Set the figure properties as you choose.
inpict = imread('peppers.png');
hi = imtool(inpict,'initialmagnification',200);
set(hi,'units','normalized','position',[0 0 1 1])

카테고리

Help CenterFile Exchange에서 Explore and Edit Images with Image Viewer App에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by