Executing a guide GUI multiple times

3 次查看(过去 30 天)
Jon
Jon 2012-6-21
I am trying to reuse a GUI developed in guide by executing the GUI three times from a script and have all three interact with each other (getting three GUIs to interact with each other is not my issue). How can i call a GUI, called my_GUI, with three different instances so I can have instance 1, 2, and 3 open together and let me work with them together?
The reason I am doing this is because I need isolate points in a 3D medical image volume for doing a manual rigid body transform. I want to avoid using just one GUI in which I would either need to change my axial, coronal and sagittal views in the axes, reduce my axes sizes, or something of the like. I would rather like to be able to move three in-depend gui's as I like but still use the same .fig file. Also I would like to avoid having three different GUI files that are the exact same but for the data I pass into it.
Any suggestions would be greatly appreciated.
Jon

回答(1 个)

Walter Roberson
Walter Roberson 2012-6-21
In GUIDE, one of the first things that is done by the function that has the same name as your .fig file, is to test to see whether it is already running, and if so then it does not create another instance. You would want to disable that code. My vague memory is that it works by looking for a figure with its own Tag.
There is no inherent problem with running several figures with the same Tag. You will need to check the rest of the GUIDE code, though, as I seem to recall it using the Tag for something else, possibly in the closing function.
There is a potential problem if the generated code uses Tags in order to locate items without qualifying that those have to be part of the same figure. I do not remember seeing a problem along those lines come up, but I have not looked through much GUIDE code.

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by