필터 지우기
필터 지우기

Exception at showing volshow() in AppDesigner

조회 수: 7 (최근 30일)
rocketMan
rocketMan 2020년 11월 10일
댓글: rocketMan 2020년 11월 11일
Hello, I always get an exception when I try to put a created via volshow() figure into an Appdesigner. Does anyone know how to fix it?
The exception: Update traversal encountered invalid scene tree.
The code:
app.Panel = uipanel(app.GridLayout);
h=volshow(BW, 'parent',app.Panel);

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 11월 10일
편집: Cris LaPierre 2020년 11월 10일
"The volshow function creates a uipanel object in the specified parent figure."
I believe the issue is because volshow does not support uifigures, which is what is used in app designer. Try the following in MATLAB. I get the same error message you report with the uifigure example.
% Load a demo volume
load('spiralVol.mat');
% Works
f = figure;
volshow(spiralVol, 'parent',f);
% doesn't work
uf = uifigure;
volshow(spiralVol, 'parent',uf);
It does work with a uipanel, even if that uipanel is placed on a figure. However, not with a uifigure
p = uipanel;
volshow(spiralVol, 'parent',p);
f=figure;
fp = uipanel(f,'Title','Main Panel','FontSize',12,...
'BackgroundColor','white',...
'Position',[.25 .1 .67 .67]);
volshow(spiralVol, 'parent',fp);
% doesn't work, but no error
uf=uifigure;
ufp = uipanel(uf,'Title','Main Panel','FontSize',12,...
'BackgroundColor','white',...
'Position',[.25 .1 .67 .67]);
volshow(spiralVol, 'parent',ufp);
  댓글 수: 3
Cris LaPierre
Cris LaPierre 2020년 11월 11일
It seems to not support uipanels when they are placed on uifigures. The canvas in app designer is a uifigure.
What do you mean by your other notebook? Is that another app or a live script?
rocketMan
rocketMan 2020년 11월 11일
I mean the same script, but an another machine

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile 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!

Translated by