Error when switching to YZ view

Sometimes when I switch to YZ view there is this error where it seems to follow my cursor and make the white ‘empty’ background pixels and images zoom out when I move my cursor. It shows up like this on MATLAB:

Error setting property ‘DataAspectRatio’ of class ‘Axes’:
Input values must be positive finite numbers.

Error in mibController/plotImage (line 134)
obj.mibView.handles.mibImageAxes.DataAspectRatio = [1 coef_z 1];

Error in mibController/mibToolbarPlaneToggle (line 61)

Error in mibGUI>toolbarPlaneToggle_ClickedCallback (line 503)

Error in gui_mainfcn (line 95)

Error in mibGUI (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in>@(hObject,eventdata)mibGUI(‘toolbarPlaneToggle_ClickedCallback’,hObject,eventdata,guidata(hObject))
Error while evaluating ToggleTool ClickedCallback.

Sometimes this can be fixed by exiting out and restarting MIB. Sometimes that doesn’t fix it. It only happens once in a while but I was wondering if there was a better way to fix it or way to prevent it entirely.

Thank you.

Hi @buenoc,
yes, I also noticed the similar problem during the training, but I was not able to reproduce it myself. It should be rather easy to fix, but I just need to find how to reproduce it.
If it happens to you again, try to recall width, height and depth of the stack, what was magnification and the difference in voxel aspect ratio between XY and Z dimensions.
Were you changing the orientation via the buttons in the toolbar or using Alt+2 shortcut?

Hi Ilya,

I was using the buttons. I’ll let you know when it happens again!

Thank you.

Thanks for the tip,
Let me know if it comes again, I am interested to fix that

I believe it was a problem with the voxel size! The datasets which showed the problem have a 0 in the Z. When I go back to the XY view and then change the parameters to 4 x 4 x 4nm, I am able to open it in the YZ view with no problem. (When I tried to change the parameters from the YZ view while it was having the error it froze the program… whoops).

I wasn’t the person to prepare this dataset so I’m not sure what went wrong, but it seems like while the dataset should have started at 4 x 4 x 4nm voxel size to begin with, when it was chopped some of the Z stacks ended up with 4e-9 x 3.9e-9 x 0 micrometers and others with 4e-9 x 3.9e-9 x 9e-9 micrometers. I haven’t had this problem personally, so I’m not sure how that happened. Thanks for the suggestion!

yes, that may be the reason. One possible scenario is when you have a series of 2D tif files, which are normally opened as a 3D stack. In this situation, each of the TIF files contains the bounding box that defines the whole stack, thus opening of a single file may cause weird calculation of the voxel size (they are calculated from the bounding box).
Does the change of the voxel size via Menu->Dataset->Parameters fixed the problem?
In any way it is a bug and I will try to fix it.
Thank you!

Yes, when I go into Menu-> Dataset -> Parameters and change the voxel size, the problem is fixed. I need to switch to XY view beforehand though, because when I tried to switch the voxel size while still in the YZ view the program froze.

1 Like