MATLAB: Matlab cell2mat error

cell2matmatlab 2014a

Hi,
I have a following error when I use Matlab 2012b and 2016a. "Error using cell2mat (line 52) CELL2MAT does not support cell arrays containing cell arrays or objects." However, I do not have this error in Matlab 2014a. Does anyone have idea why this happens?
Thank you

Best Answer

I had to make a lot of changes to the code. I made the first batch of fixes against R2014a; I marked those in the code with 'WDR'. I then moved over to a new release and fixed the cell2mat problems that you had posted about; those are also marked with 'WDR' in the code.
For example, the code assumes that some ultrasound information is present in the dicom information; I removed that limitation. Also, I removed the assumption that the ocr() routine is available (it requires a new-ish version of the Computer Vision toolbox.)
From R2014b onwards, the colormap changing did not work, because colormaps now depend on the axes. I fixed that.
From R2014b onwards, the majority of the callbacks that you had defined failed. You have them defined as methods of VUESR so they were marked as belonging only to VUESR objects. However, graphics callback get invoked with graphics objects as the first parameter, and the way MATLAB determines which object a routine is to be looked up against in a call is by scanning for the first object from the left in the parameter list. Therefore for normal graphics callbacks, you need routines that are either outside of any class, or are derived from the graphics system. The fix was to move "tool" to be the first parameter of all of the graphics callbacks (including adding it as a parameter to a couple of routines it was not passed to before) and adjusting the calling sequence of all of the callback anonymous functions to insert tool as the first parameter. This was a fair bit of editing, and I did not mark the changes.
After that I did more testing and fixed some bugs, mostly relating to the assumption that there were multiple images available.