Split get_image, get_last_image, get_last_live_image from LimaDataView
I play some times with LimaDataView
, and i would like to change the API in order to fit a little more with my needs.
Here is problems i can notice (if i am not wrong):
-
video
andimage
from a lima detector are not the same format (can be RGB for thevideo
, always intensity forimage
), butget_image
API can call and returnget_last_live_image
. -
get_image
can be called with-1
to reach the last image but the frame id is not provided
Then, my proposal is to slit this functions this way:
-
get_last_live_image
remain unchanged (it returns the image from thevideo
within the frame id, the update argument have to be removed -> always true in this context) - rework
get_image
to only deal with fixed frame id and image (not from thevideo
).get_image(-1)
will no more be a valid input to the function. The code remain mostly unchanged (check the memory buffer, else check the files) - create
get_last_image
to return the last availableimage
(not from thevideo
). It will returns the frame id within the image data (same API asget_last_live_image
). It's basically a call toget_image
with the very last frame id known at the time.
What do you think about it?
As i think i am the only one using get_image(-1)
, i think it is safe to break this part of the API, an to forget about compatibility. Or we could create a get_image2
in the mid time.
Edited by Valentin Valls