Problem in displaying an image with imshow in app designer
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to develop my own app to segment a stack of graylevel images. I designed the "AppSegmentation" app with app designer in Matlab 2023a. This app is supposed to load a dataset from the workspace when the user click on the load dataset button, display a slice of the dataset in UIAxes, apply a threshold value from a numeric edit field, display the same slice but after segmentation in the UIAxes_2, display the number of slices in the stack and allow the user to navigate between slice to ensure that the threshold value is correct. When the ok button is pushed, the threshold level and the segmented stack are supposed to be exported in the workspace.
Now, when I run the app, the segmented slice is displayed in UIAxes_2 but the non-segmented slice is not displayed in UIAxes. I cannot spot what is wrong in the code of the app.
Any help/advice would be great.
I have attached the input dataset as a mat file and the app file.
Thanks in advance,
Guillaume
0 个评论
采纳的回答
Kevin Holly
2023-9-12
编辑:Kevin Holly
2023-9-12
I looked at your file and experienced the same problem. I was able to switch the parent to app.UIAxes2 and it worked. I ended up deleting app.UIAxes and placing a new UIAxes. This ended up working. See app attached. I had an error loading the data when I first ran your app so I changed the start up function of your Load pushbutton. I also added an icon to the button for fun.
I'm not sure why your original UIAxes was having issues. When exploring, I noticed that it would display a vertical line after imshow was used and then the Visible property was changed to off.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!