フィルターのクリア

imshow and montage with UIAxes

4 ビュー (過去 30 日間)
Veena Chatti
Veena Chatti 2020 年 8 月 25 日
回答済み: Veena Chatti 2020 年 8 月 25 日
Hi!
I'm trying to use the app designer to display an image from a stack of images in a TIFF file. The ~80 MB image is a
512 x 512 x 3 x 100 array of uint16.
In the command window, this works to show the Kth image in the stack:
imshow(rawframes(:,:,3,K))
When I try the same thing with UIAxes using variables that are app properties, however, I get an error. The app property app.V corresponds to a value between 1 and 100 that's set by a slider in the app. Its default is 1.
imshow(app.rawframes(:,:,3,app.V), 'Parent', app.UIAxes)
The error I get says:
Error using images.internal.createMontage>getOneImage (line 332)
Multi-plane image inputs must be RGB images of size MxNx3.
Error in images.internal.createMontage>getImages (line 238)
img = getOneImage(imgSource,useIndexedRead, idxs(k), cmap);
Error in images.internal.createMontage (line 66)
imageArray = getImages(imgSrc, thumbnailSize, borderSize, backgroundColor, indices, cmap, waitbarEnabled);
Error in montage (line 181)
[bigImage, cmap] = images.internal.createMontage(Isrc, thumbnailSize,...
Can anyone help? What's going on? I also tried montage and got the same error.
Thanks!

採用された回答

Veena Chatti
Veena Chatti 2020 年 8 月 25 日
Never mind, it was really simple, and I figured it out. The value of app.V had to be rounded to the nearest integer before trying to use it to index into either imshow or montage. All good!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDisplay Image についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by