Problem in displaying an image with imshow in app designer

6 ビュー (過去 30 日間)
GMabilleau
GMabilleau 2023 年 9 月 12 日
コメント済み: GMabilleau 2023 年 9 月 13 日
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

採用された回答

Kevin Holly
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.
  1 件のコメント
GMabilleau
GMabilleau 2023 年 9 月 13 日
Thanks Kevin, it works also at my end. The issues observed with the first UIAxes will remain a mystery for me... Don't know whether it is related, but I started the app under R2022b and then the app was automatically updated when opened the first time in R2023a. Maybe something went wrong there.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by