Live recording on Napari #3455
jacopoabramo
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Can you explain a bit why? I'll admit I am generally biased against class hierarchies but after a quick glance at the code it matches more or less what I would have done, I think. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings everyone,
for the last couple of days I've been working on a plugin called napari-live-recording, which is loosely inspired by the plugin napari-webcam. The general idea of this plugin would be to quickly prototype cameras and I'm trying to give the possibility to everyone to setup their own camera in order to have a generic interface. There are a couple of issues with it yet which I'm trying to solve, but at the moment I was able to make live recordings and record TIFF stack images with a generic USB camera using OpenCV and the Ximea xiB-64 (we are using this camera at my institute for some projects).
I just gave a little glance at the issue list on the repo so I'm not sure that Napari has been conceptualized with this type of use case. Nevertheless if it is an interesting feature let me know if it's worth to integrate in Napari itself. I understand that there are also other interesting projects like ImSwitch, which already integrates Napari for image viewing, but then again: this plugin at the moment is only thought as a way of quick prototyping cameras and get familiar with their APIs (or doing really quick setups for testing purposes). I'll be moving this camera to ImSwitch itself when the time comes, most probably.
I'm opening this discussion to ask for a couple of tips in order to make the code more stable and remove the fact that at this moment everything has been written on a single file, as my idea was to - like I said - give everyone the possibility to implement their own camera.
So here's a question:
@thread_worker
function within the widget. I would like to move them into separate worker classes by reimplementing either aFunctionWorker
orGeneratorWorker
. I've tried in the beginning to follow this approach but it simply wouldn't work so I moved to the idea presented in the napari-webcam plugin in order to make it work. Does anybody know how to implement it properly using the pattern described above?In case this discussion would be pointless and you want me to move the topic in the issue list, please let me know and I'll be happy to do so.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions