Metadata-Version: 2.5
Name: mlxradiomics
Version: 0.1.0.dev3
Summary: Apple Silicon Metal radiomics with bounded voxel batches.
License-Expression: Apache-2.0 AND MIT AND BSD-3-Clause
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Classifier: Operating System :: MacOS :: MacOS X
Requires-Python: <3.15,>=3.13
Requires-Dist: medmlx-core==0.2.3
Requires-Dist: mlx==0.32.4; sys_platform == 'darwin' and platform_machine == 'arm64'
Requires-Dist: numpy<3,>=2.0
Provides-Extra: io
Requires-Dist: pyyaml<7,>=6; extra == 'io'
Requires-Dist: simpleitk==2.5.6; extra == 'io'
Provides-Extra: lbp
Requires-Dist: scipy==1.18.1; extra == 'lbp'
Requires-Dist: trimesh==4.9.0; extra == 'lbp'
Description-Content-Type: text/markdown

# mlxradiomics

Extract radiomics features and voxel maps on the Apple Silicon GPU with native MLX.

[Docs](docs/technical.md) · [MedMLX](https://github.com/MedMLX)

![Prewindowed CT liver ROI → local entropy, contrast and homogeneity maps.](https://raw.githubusercontent.com/MedMLX/mlxradiomics/main/docs/showcase.png)

*Prewindowed CT liver ROI → local entropy, contrast and homogeneity maps.*

| Input | Output |
| :--- | :--- |
| Aligned image + label mask | ROI features or voxel maps |

**Apple Silicon · Metal · Python 3.13 / 3.14** · [uv](https://docs.astral.sh/uv/)

## Quick start

```bash
git clone https://github.com/MedMLX/mlxradiomics.git
cd mlxradiomics
make env
```

With aligned `image` and `mask` NumPy arrays:

```python
from mlxradiomics import Settings, extract

# image and mask are aligned NumPy arrays; spacing follows array-axis order.
result = extract(
    image, mask, spacing=(3.0, 1.0, 1.0),
    settings=Settings(label=2, bin_width=25,
                      features=("firstorder_Mean", "glcm_Contrast")),
    voxel=True,
)
mean_map = result.features["original_firstorder_Mean"]
```

Use `voxel=False` for ROI features. The optional `io` extra supports NIfTI and NRRD files; see Docs.

## License

[Apache-2.0](LICENSE). See [third-party notices](THIRD_PARTY_NOTICES.md).

For research and education. Outputs require human review.
