Using sliceViewer function in App Designer
Ältere Kommentare anzeigen
Hi,
I am using the following syntax to try to display a sliceViewer element inside a GUI of App Designer:
% Button pushed function: LoadCT
function LoadCTButtonPushed(app, event)
dir = uigetdir;
oCT=cPETRUS_loadCT(dir);
sliceViewer(oCT.Image,'parent',app.UIAxes2)
end
however I get the following error:
Error using images.stacks.browser.internal.SliceViewer/set.Parent
The Parent property must be a figure or uipanel.
Error in sliceViewer/parseInputs
Error in sliceViewer
It's weird because I can display other things in this axis using other functions that use and dont use the 'parent' atribute, but I cant with sliceViewer.
Any thoughts on this?
Antworten (1)
Raj Tummala
am 13 Aug. 2021
Bearbeitet: Raj Tummala
am 13 Aug. 2021
0 Stimmen
Use a panel instead of a figure:
sliceViewer(oCT.Image,'parent',app.Panel)
You can see it in a figure, but it's needs to UIFigure not UIAxes:
sliceViewer(oCT.Image,'parent',app.UIFigure2)
However, the problem with this approach is that the size is not constrained (it takes up the entire screen).
1 Kommentar
Omar Zenteno
am 14 Sep. 2021
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!