Skip to content

Commit

Permalink
added more sample data, fixed example notebook, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
itspranavk committed Jul 14, 2023
1 parent 923a25a commit 0983f31
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 51 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,26 @@ git clone --recurse-submodules https://github.com/UM2ii/openjphpy
pip install -e openjphpy/
```

Documentation for openjphpy is available [here](./docs/openjphpy.md).

**Note:** openjphpy is only supported on Linux based environments with support for other environments coming in the future.

### Example Notebook

We have provided an example notebook in this repository, along with 10 test images, to experiment with. You can find the example notebook [here](openjphpy/notebooks/example.ipynb).

We also provide [15 sample medical images](./data/) across X-ray, MRI, and CT modalities (5 images per modality), with data sourced from the [NIH Chest X-Ray 14](https://arxiv.org/abs/1705.02315) and [Medical Segmentation Decathlon (MSD)](http://medicaldecathlon.com/) datasets. For portability, all data is stored as `npy` files.

**Note:** CT data is stored as uint16 and not in Hounsfield units.

## Limitations

Currently, openjphpy can only encode imaging data with types 8-bit and 16-bit unsigned integers (uint8 and uint16). If pixel values fall outside the range [0, 65,535], an error may be raised (strict mode) or values will be clipped (non-strict mode). Precision is automatically chosen based on image data's dynamic range
Currently, openjphpy does not support encoding signed data and can only encode imaging data with types 8-bit and 16-bit unsigned integers (uint8 and uint16). If pixel values fall outside the range [0, 65,535], an error may be raised (strict mode) or values will be clipped (non-strict mode). Precision is automatically chosen based on image data's dynamic range.

## Future Work

In the future, we intend to extend support to non-Linux environments. Similarly, we intend to employ a similar approach used by [openjphjs](https://github.com/chafey/openjphjs) to integrate native C++ code directly into Python. While our current implementation supports the entire feature set of OpenJPH, it is not computationally optimized. We invite collaborators in the open-source community to help integrate with OpenJPH's native C++ code with direct encode/decode capabilities in Python.

## Documentation

Complete documentation for openjphpy is available [here](./docs/openjphpy.md).

## Contact

If you have any questions about openjphpy, please contact us [here](mailto:pkulkarni@som.umaryland.edu,vparekh@som.umaryland.edu).
Binary file added data/CT0.npy
Binary file not shown.
Binary file added data/CT1.npy
Binary file not shown.
Binary file added data/CT2.npy
Binary file not shown.
Binary file added data/CT3.npy
Binary file not shown.
Binary file added data/CT4.npy
Binary file not shown.
Binary file added data/MR0.npy
Binary file not shown.
Binary file added data/MR1.npy
Binary file not shown.
Binary file added data/MR2.npy
Binary file not shown.
Binary file added data/MR3.npy
Binary file not shown.
Binary file added data/MR4.npy
Binary file not shown.
Binary file added data/XR0.npy
Binary file not shown.
Binary file added data/XR1.npy
Binary file not shown.
Binary file added data/XR2.npy
Binary file not shown.
Binary file added data/XR3.npy
Binary file not shown.
Binary file added data/XR4.npy
Binary file not shown.
3 changes: 0 additions & 3 deletions data/dataset0/README.md

This file was deleted.

Binary file removed data/dataset0/data.npz
Binary file not shown.
3 changes: 0 additions & 3 deletions data/dataset1/README.md

This file was deleted.

Binary file removed data/dataset1/data.npz
Binary file not shown.
Binary file added data/encoded/CT0.jph
Binary file not shown.
Binary file added data/encoded/MR3.jph
Binary file not shown.
107 changes: 67 additions & 40 deletions notebooks/example.ipynb

Large diffs are not rendered by default.

0 comments on commit 0983f31

Please sign in to comment.