HolyLab / Imagine

A graphical interface for recording with OCPI microscopes.
1 stars 1 forks source link

Respect PCO ROI constraints #23

Closed Cody-G closed 7 years ago

Cody-G commented 8 years ago

When selecting a Region of Interest (ROI) within the "binning" tab, currently we do not enforce rules for the PCO.Edge 4.2. It would be nice if the Imagine GUI automatically constrained the users' entries to be valid. The rules for the PCO.Edge 4.2 camera are as follows:

  1. Horizontal image size must be adjusted in increments of 160 pixels. For example: 161 to 2060 is a valid ROI, but 162 to 2060 is not.
  2. Vertical image size must be reduced symmetrically. Valid examples; 1 to 2048 2 to 2047 101 to 2038 etc... Invalid examples: 2 to 2048 1 to 2047 etc...

I think a good solution would involve two changes:

1) When the user clicks the arrow buttons to adjust the binning size, it should change to the next valid size. In the case of the vertical buttons, that means that both top and bottom limits must be adjusted. 2) When the user types an invalid combination of binning parameters into the entry box, the entry box should update to the closest valid set of numbers. The problem with this is that Qt aggressively tries to correct the entry as you type it. Maybe there's a way to delay the correction until the user presses enter or the focus changes away from the entry box (for example, when the user clicks a different entry box).

kdw503 commented 7 years ago

Closed.