Zapit-Optostim / zapit

General purpose optostimulation system
GNU Lesser General Public License v2.1
6 stars 1 forks source link

Sometimes drawing camera ROI is glitchy #82

Open raacampbell opened 1 year ago

raacampbell commented 1 year ago

Issue Description

Drawing the camera ROI sometimes fails in ways such as:

Other related things can happen. This seems to be a MATLAB bug related to the use of this rectangle tool with a MATLAB uifigure. The MathWorks have been notified but so far no solution. The problem occurs on roughly 15% of ROI drawing attempts. It the time. This is not really a bug in Zapit. The same code for drawing ROIs works perfectly well with a traditional MATLAB figure (not a uifigure).

Workaround

If you encounter this issue you should just double-click the ROI to accept it. Reset the FOV if needed and try again. Eventually it will work. The GUI caches the previous ROI position so in practice, once your setup is finalised, you will likely not need to re-draw often.