OpenwaterHealth / OpenwaterHealth/openlifu-python

Add functonality to return a 'file object' for data associated with photoscans/volumes/transducers

Open
#216 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
27
Forks
21
Avg merge
1d 20m
Merged PRs (30d)
6

Description

Currentlly for photoscans, the loading of vtkPolyData and vtkImage data is handled in openlifu. However, for loading model files and volume files associated with transducers and volumes, SlicerOpenLIFU uses get_transducer_absolute_filepath_info and get_volume_info. While this works for now, these functions will likely go away if the database is represented differently in the future. For example what if the data were stored online and the way to get it is not an absolute filepath but rather a URL that needs to be sent to a download utility.

Once approach for transducers is to generalize the code for loading models out of photoscan.py and create a util function in openlifu that returns vtkPolydata for each model included in the transducer file.

In general, openlifu should be responsible for getting the data in the first place. Maybe openlifu should be responsible for providing a kind of "file object" that hasn't necessarily been read yet. fsspec seems to have exactly such a generic concept of "file object" that we could use. (It seems it's one of the tools DVC uses under the hood!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with photoscan.py and the existing get_transducer_absolute_filepath_info and get_volume_info usage described in SlicerOpenLIFU. Compare how model and volume data are obtained, then define the file-object boundary for current local data and future URL-backed data. Done means openlifu owns acquisition for photoscans, transducers, and volumes without callers relying on absolute paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.