Possible MatLab versions incompatibility

The attached function was developed using MatLab 2011. Line 104 in the attached function Image.m :
% Set parent object in list of arguments to be passed to the image function
*imageargs = [imageargs 'Parent' handles.main_axes];*
triggers an error message that reads: “ Error using matlab.graphics.axis.Axes/horzcat Conversion to matlab.graphics.axis.Axes from cell is not possible.
We changed it as follows:
*imageargs = [imageargs 'Parent' double(handles.main_axes)];*
Now function EImage works. The results of its elaborations are displayed on a graphic window that, unluckily, cannot be resized. We suspect something about the window 'Parent' is wrong after our patch. We would greatly appreciate knowing the right correction to apply.
Thank you in advance. Sincerely, Maura Monville

5 件のコメント

Stephen23
Stephen23 2016 年 9 月 16 日
編集済み: Stephen23 2016 年 9 月 16 日
@Maura Monville: what MATLAB version are you trying to run the code on?
Maura Monville
Maura Monville 2016 年 9 月 16 日
Thank you. I removed the cast to double and inserted the "{}". Its behaviour has not changed from the way it behaves casting that argument to double. The results of EImage elaborations pops up on the screen in a new window but again such a window canNOT be resized. How come ? Best regards, maura
Maura Monville
Maura Monville 2016 年 9 月 16 日
I am trying to run function EImage with MatLab 2016. Itried both 2016a and 2016b. I got the same behaviour. Thank you
Walter Roberson
Walter Roberson 2016 年 9 月 16 日
We would also need the .fig to test with.
Maura Monville
Maura Monville 2016 年 9 月 17 日
Template "EImage.fig" is not resizable. I cannot figure out why. Windows entitled respectively "Percent Difference Map" and "Gamma Map" are instances of "EImage.fig". I think they inherit the properties and attributed from "EImage.fig". Therefore they are themselves unresizable .. I might be wrong ... I would like the following:
  • To generate the graphic template "Eimage.fig" in such a way so as it is resizable. I believe its instances will be as well.
  • To learn how to hook up new analytical functionalities to window "Image Comparison" (what should I read ?)
  • To learn how to draw a ROI on the displayed image in window "Image Compare" (what should I read ?)
Thank you so much. Kind regards, maura

サインインしてコメントする。

回答 (1 件)

Adam
Adam 2016 年 9 月 16 日

0 投票

I assume this array gets interpreted somewhere later on so you should probably just add
{ handles.main_axes }
to the array rather than converting to double, since it appears to be a cell array anyway, then just interpret it as such when you use it.

3 件のコメント

Maura Monville
Maura Monville 2016 年 9 月 16 日
Thank you. I removed the cast to double and inserted the "{}". Its behaviour has not changed from the way it behaves casting that argument to double. The results of EImage elaborations pops up on the screen in a new window but again such a window canNOT be resized. How come ? Best regards, maura
Adam
Adam 2016 年 9 月 16 日
It doesn't seem like your problem is related to the parent - if it is correctly set to be the right axes then this should not affect the resizeability of the window containing those axes.
Maura Monville
Maura Monville 2016 年 9 月 17 日
I did not implemented the GUI myself. I just developed the current analytical functions stand alone. The guy who implemented the GUI linked my functions to the GUI so as they can be called by pushing the proper GUI buttons. Sorry. I do not have an answer about the axes. I have attached the MatLab code and the raphic template (.fig). Maybe you can be more specific .... ? Thank you. Regards, maura

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2016 年 9 月 16 日

コメント済み:

2016 年 9 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by