SciKit-Surgery / scikit-surgery

SciKit-Surgery - Compact Libraries for Surgical Navigation
http://scikit-surgery.github.io/scikit-surgery/
Other
39 stars 11 forks source link

What requirements for Recording Data and Playback of Data #48

Open thompson318 opened 4 years ago

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Mar 7, 2019, 16:24

Similar to the #47 which is concerned with storage on a departmental server, (i.e. good curation of data), there is also the issue of how we record data, and how do we allow playback in a nice fashion, so we can re-watch sessions of data.

So, if anyone had ideas of what to implement in SNAPPY I'd like to hear them. Needs to be as simple as possible otherwise researchers tend not to adopt or use them.

  1. Formats for video storage? Fixed rate, or time-varying formats?
  2. Tools for post processing?
  3. How to save different sources, e.g. video+ultrasound+tracking, as either synchronised or unsynchronised

etc.

@StephenThompson @ThomasDowrick @MianAhmad @EddieEdwards @MirekJanatka

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Mar 7, 2019, 16:27

@SimoneFoti

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Mar 12, 2019, 08:03

There are separate considerations as to what is the best format for each individual source, and then for how we package them all together. My thoughts:

Individual sources

Video - I would say a fixed rate format, at least in the first instance, as this will be easier to implement, and probably to use. If we wanted variable frame rate we could add this as another class.
Ultrasound - start off saving as a video stream as above.
Tracking data - Series of timestamped 4x4 matrices. Either CSV or JSON? JSON might be easier to parse.

Combined sources
When saving unsynchronised data, it might be best to save the data from each source independently, as it's own file, but then include some meta information that links everything together, or just put them all in the same zip file before they are stored on XNAT.

For a lot of cases synchronised data is probably OK, and could be acheived with a more sophisticated version of the code snippet below:

sources = [US(params), Tracker(params), Video(params)]

for source in sources:
    source.start()

# Run this in a Qt Timer loop every x ms
for source in sources:
    source.write_latest_frame()