Problem in displaying an image with imshow in app designer

조회 수: 15 (최근 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 CenterFile Exchange에서 Develop 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