Closed braincore closed 6 years ago
Sorry for the confusion! I had altered getUserRoi
function in such a way that setUserRoi(getUserRoi())
was not round tripping properly, and wrongly changed setUserRoi
rather than undo my getUserRoi
changes. I'll abandon this.
Hi @braincore , thanks for your PR.
The calculation does appear to be correct. The methods are based on those from the ST API, and the lines of code relative to your commit are based on the following from ST:
Height is calculated as
TopLeftY - BotRightY
. I found that the way the array is laid out is somewhat counterintuitive. The upper left corner of the array has coordinates (0, 15) and the lower right corner has coordinates (15, 0) and the upper right and lower left corners of your custom array need to be set. For example a possible 4x4 array could have coordinates (7, 11) for the upper left and (11, 7) for the lower right. I found that I had to draw a diagram in order to get my points to work out and to set the custom array successfully. Please let me know if you have any other questions.