Metadata-Version: 2.5
Name: fdg-pet-ct-mlx
Version: 0.2.5
Summary: Native MLX FDG PET image synthesis
Project-URL: Repository, https://github.com/MedMLX/fdg-pet-ct-mlx
Author: Joseph Sandoval, Alfredo Sandoval Jr.
License-Expression: Apache-2.0
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.5
Requires-Dist: mlx<1,>=0.32.4
Requires-Dist: nibabel<6,>=5.4.2
Requires-Dist: numpy<3,>=2.0
Provides-Extra: dev
Requires-Dist: pyright==1.1.414; extra == 'dev'
Requires-Dist: pytest<10,>=8.4; extra == 'dev'
Requires-Dist: ruff<1,>=0.13; extra == 'dev'
Requires-Dist: scipy-stubs<1.19,>=1.18; extra == 'dev'
Requires-Dist: scipy<2,>=1.13; extra == 'dev'
Description-Content-Type: text/markdown

# fdg-pet-ct-mlx

Generate synthetic FDG PET activity from CT and organ labels with native MLX. Includes scanner blur, scatter and count noise.

| Input | Output |
| :--- | :--- |
| Aligned CT + organ labels + profiles | Synthetic PET SUV volume |

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

## Quick start

```bash
uv venv --python 3.13
source .venv/bin/activate
uv pip install "fdg-pet-ct-mlx>=0.2.5"
```

## MedMLX runner

With aligned CT and MAISI label volumes and your own profile JSON:

```python
from fdg_pet_ct_mlx.medmlx import run

result = run(
    image_path="ct.nii.gz",
    labels_path="labels.nii.gz",
    profile_path="profiles.json",
    output_dir="outputs",
    seed=7,
)
print(result["outputs"]["pet"])
```

The runner validates the image geometry and caller-supplied profiles, then writes
`pet.nii.gz` on the CT grid. See the [profile format and array API](https://github.com/MedMLX/fdg-pet-ct-mlx/blob/main/docs/technical.md)
for required fields and a synthetic tensor example.

No model weights are needed. This is image-space synthesis; it does not simulate projection physics or reconstruction.

## Documentation

[Profiles, array API and validation](https://github.com/MedMLX/fdg-pet-ct-mlx/blob/main/docs/technical.md)

## License

Apache-2.0; license and third-party notices are included in the distribution.

For research and education. Outputs require human review.
