I'm new to MATLAB's App Designer. I'm trying to make an app that reads in a 3D matrix and shows axial, coronal and sagittal views. However, early steps have already proven to be difficult.
I'm using the startupFcn to give the 3D matrix as an input (function startupFcn(app, Img)). Then, I want to calculate some basic information from this input matrix (e.g. size) in the properties section to use in other callbackfunctions (see below). This results in the following error:
"Invalid default value for property 'size_Img' in class 'BoundingBox': Unable to resolve the name app.Img."
I have tried setting the input variable Img global and using the access property to public (as seen below), but I keep getting the same error. Am I doing something wrong?
Thanks in advance for the pointers!
Sam
properties (Access = private) size_Img = size(app.Img) % Image Size size_Sag = size_Img(1); % Image Saggital Size size_Trans = size_Img(2); % Image Transverse Size size_Front = size(3); % Image Frontal Size ... end properties (Access = public) Img % Input image end
Best Answer