imshow and montage with UIAxes

4 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Display Image 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by