OpenwaterHealth / OpenwaterHealth/openlifu-python

Load Volume from Nifti

Open
#84 4 comments 0 reactions 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

We decided to store volumetric data in the NIfTI1 format, because the volumes can store spatial orientation data (as a transform), and be loaded natively into slicer. I'm not quite sure how to implement this into the Database class, though. In MATLAB, I created a Volume class that was essentially an xarray.DataArray - it has voxel data with units, named coordinate axes with values and units, a transform matrix, and a flexible attribute dictionary. I think we can probably use xarray.DataArray here as well, although nibabel.Nifti1Image, which is what nibabel.nifti1.load returns, may be suitable on it's down (although I'm not as comfortable operating on the underlying data). I know vtk has a number of volumetric data formats which I'm guessing will be used in visualization, as well, although again - ease of use for processing is also a factor. I'm probably going to try to load from .nii to an xarray.DataArray, but I welcome other suggestions

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 by reading the Database class and the existing volume-loading path, then compare the issue's proposed xarray.DataArray and nibabel.nifti1.load approaches for .nii data. Review how vtk may be used for visualization. Done means the project has an agreed representation and a defined way to load NIfTI1 volumes while preserving spatial orientation and processing metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
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.