Exception at showing volshow() in AppDesigner

8 visualizzazioni (ultimi 30 giorni)
rocketMan
rocketMan il 10 Nov 2020
Commentato: rocketMan il 11 Nov 2020
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);

Risposte (1)

Cris LaPierre
Cris LaPierre il 10 Nov 2020
Modificato: Cris LaPierre il 10 Nov 2020
"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 Commenti
Cris LaPierre
Cris LaPierre il 11 Nov 2020
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 il 11 Nov 2020
I mean the same script, but an another machine

Accedi per commentare.

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by