Metadata-Version: 2.4
Name: OmniSlicer
Version: 0.0.10
Summary: Omnidirectional Volume Slicing Package for 3D Medical Image Analysis
Author-email: Johannes Kiechle <johannes.kiechle@tum.de>
License-Expression: MIT
Project-URL: Homepage, https://github.com/hannesk95/OmniSlicer
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.6.0
Requires-Dist: trimesh>=4.6.8
Requires-Dist: numpy>=2.2.6
Requires-Dist: pyvista>=0.45.0
Requires-Dist: torchio>=0.20.7
Requires-Dist: tqdm>=4.67.1
Requires-Dist: torchvision>=0.21.0
Dynamic: license-file

# Omnidirectional Volume Slicer - OmniSlicer 

Implementation of the omnidirectional volume slicer package in Python and PyTorch for 3D medical image analysis, from our Medical Image Analysis publication ["TomoGraphView: 3D Medical Image Classification with Omnidirectional Slice Representations and Graph Neural Networks"](https://www.sciencedirect.com/science/article/pii/S1361841526002434).

![Comparison of OmniSlicer against traditional methods](https://raw.githubusercontent.com/hannesk95/OmniSlicer/main/assets/volume_slicing.png)

## Example Usage

```python
from OmniSlicer import OmniSlicer

volume_path = "path_to_volume.nii.gz"
mask_path = "path_to_mask.nii.gz"
output_dir = "output_dir"
n_views = N

OmniSlicer.extract_slices(volume_path=volume_path,
                          mask_path=mask_path,
                          output_dir=output_dir,
                          n_views=n_views)
```

## Tested Dependencies

The functionality of **OmniSlicer** has been successfully validated using the following dependency versions. These represent the environment in which the package has been developed and tested:

| Dependency     | Version Tested |
|----------------|----------------|
| `python`       | 3.11.14        |
| `torch`        | 2.6.0+cu124    |
| `torchvision`  | 0.21.0+cu124   |
| `trimesh`      | 4.6.8          |
| `numpy`        | 2.2.6          |
| `pyvista`      | 0.45.0         |
| `torchio`      | 0.20.7         |
| `tqdm`         | 4.67.1         |

These versions are defined in the project’s installation requirements and are automatically resolved when installing OmniSlicer via `pip`. While other combinations may work, the dependency set above is the configuration against which all core features have been verified. **Please make sure that you install torch with CUDA**.


## Citation

```bibtex
@article{kiechle2026tomographview,
  title={TomoGraphView: 3D medical image classification with omnidirectional slice representations and graph neural networks},
  author={Kiechle, Johannes and Fischer, Stefan M and Lang, Daniel M and Bercea, Cosmin I and Nyflot, Matthew J and Felsner, Lina and Schnabel, Julia A and Peeken, Jan C},
  journal={Medical Image Analysis},
  pages={104174},
  year={2026},
  publisher={Elsevier}
}
```
