porteralab / EZcalcium

Calcium Data Extraction and Analysis
GNU General Public License v3.0
43 stars 7 forks source link

ROI centers #6

Closed Rneuro closed 3 years ago

Rneuro commented 3 years ago

Hello I am using Matlab 2020b - the ROI detection step appears to complete ok, but when I then open the newly generated file in the ROI refinement app, the ROIs shown in pink are the same that were identified in the ROI detection step, but the ROIs shown in black that I can step through in the ROI refinement app do not line up with these pink circles. It seems that the ROI center information is not correct saved in the file at the end of the ROI detection step is incorrect.

ROI detection final fig: ROIdetection-fig

ROI refinement - black dot does not line up with a pink circle: ROIrefinement

bodayw commented 3 years ago

Hi,

Thanks for reporting this.

The cause of the bug is that on high-DPI systems (DPI scaling higher than 100% on Windows, or any Mac computers that has a "retina display"), functions like getframe in this case, returns a bigger data array than the "logical" size of the UI axes in pixels, thus the coordinates of the black ROI contour calculated before are off by exactly the DPI scaling factor.

Now fixed with 45563db and in release v2.1.2.