Metadata-Version: 2.4
Name: qim3d
Version: 1.6.1
Summary: QIM tools and user interfaces for volumetric imaging
Author-email: Felipe Delestro <fima@dtu.dk>, QIM Development Team <info@qim.dk>
Maintainer-email: Felipe Delestro <fima@dtu.dk>, QIM Development Team <info@qim.dk>
License-Expression: MIT
Project-URL: Homepage, https://qim.dk/
Project-URL: Documentation, https://docs.qim.dk/qim3d/
Project-URL: Repository, https://github.com/qim-center/qim3d
Project-URL: Issues, https://github.com/qim-center/qim3d/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: numpy>=2.2.0
Requires-Dist: scipy>=1.15.0
Requires-Dist: matplotlib>=3.10.0
Requires-Dist: scikit-image>=0.25.0
Requires-Dist: zarr>=3.0
Requires-Dist: trimesh>=4.4.9
Requires-Dist: pytetwild
Requires-Dist: imageio-ffmpeg>=0.6
Requires-Dist: k3d>=2.17
Requires-Dist: Pillow>=10.0.1
Requires-Dist: plotly>=5.14.1
Requires-Dist: PyGEL3D>=0.8.2
Requires-Dist: pyvista[jupyter]>=0.45
Requires-Dist: seaborn>=0.12.2
Requires-Dist: tqdm>=4.65.0
Requires-Dist: ipywidgets>=8.1.2
Requires-Dist: dask>=2023.6.0
Requires-Dist: h5py>=3.9.0
Requires-Dist: imagecodecs>=2024.12.30
Requires-Dist: nibabel>=5.2.0
Requires-Dist: olefile>=0.46
Requires-Dist: ome_zarr>=0.15.0
Requires-Dist: pydicom>=2.4.5
Requires-Dist: tifffile>=2025.1.10
Requires-Dist: dask-image>=2024.5.3
Requires-Dist: localthickness>=0.1.2
Requires-Dist: structure-tensor>=0.2.1
Requires-Dist: outputformat>=0.1.3
Requires-Dist: psutil>=5.9.0
Provides-Extra: deep-learning
Requires-Dist: torch>=2.0.1; extra == "deep-learning"
Requires-Dist: torchvision>=0.15.2; extra == "deep-learning"
Requires-Dist: torchinfo>=1.8.0; extra == "deep-learning"
Requires-Dist: monai>=1.2.0; extra == "deep-learning"
Provides-Extra: gui
Requires-Dist: gradio<6,>=5.1; extra == "gui"
Requires-Dist: gradio-improvedfileexplorer>=1.0.0; extra == "gui"
Requires-Dist: fastapi>=0.109.0; extra == "gui"
Requires-Dist: uvicorn[standard]>=0.27.0; extra == "gui"
Provides-Extra: all
Requires-Dist: qim3d[deep-learning]; extra == "all"
Requires-Dist: qim3d[gui]; extra == "all"

# Quantitative Imaging in 3D

<img src="docs/assets/qim3d-logo.png" alt="qim3d logo" style="width:384px">

[![PyPI version](https://badge.fury.io/py/qim3d.svg)](https://badge.fury.io/py/qim3d)
[![Downloads](https://static.pepy.tech/badge/qim3d)](https://pepy.tech/project/qim3d)

The `qim3d` (kɪm θriː diː) library is designed to make it easier to work with 3D imaging data in Python. It offers a range of features, including data loading and manipulation, image processing and filtering, visualization of 3D data, and analysis of imaging results.

You can easily load and process 3D image data from various file formats, apply filters and transformations to the data, visualize the results using interactive plots and 3D rendering, and perform quantitative analysis on the images.

Documentation available at https://docs.qim.dk/qim3d/

For more information on the QIM center visit https://qim.dk/

## Installation

`qim3d` is distributed via [pypi](https://pypi.org/project/qim3d/) and can be installed easily with several methods.  
**Choose one of the methods below**:

```sh
# pip
pip install qim3d
```

```sh
# conda
conda create -n myqim3d python=3.14
conda activate myqim3d
pip install qim3d
```

```sh
# uv
uv add qim3d
```

```sh
# pixi
pixi add --pypi qim3d
```

Note that some features require you to install extra dependencies — you can use `qim3d[all]` to install all features. For more detailed instructions and troubleshooting, please refer to the [documentation](https://docs.qim.dk/qim3d/user_guide/installation/).

`qim3d` follows the [SPEC-0](https://scientific-python.org/specs/spec-0000/) recommendation for supported Python versions, currently: Python 3.12 – 3.14.

## Examples

### Interactive volume slicer

```python
import qim3d

vol = qim3d.examples.bone_128x128x128
qim3d.viz.slicer(vol)
```
![viz slicer](docs/assets/screenshots/viz-slicer.gif)

### Line profile

```python
import qim3d

vol = qim3d.examples.bone_128x128x128
qim3d.viz.line_profile(vol)
```
![line profile](docs/assets/screenshots/viz-line_profile.gif)

### Threshold exploration
```python
import qim3d

# Load a sample volume
vol = qim3d.examples.bone_128x128x128

# Visualize interactive thresholding
qim3d.viz.threshold(vol)
```
![threshold exploration](docs/assets/screenshots/interactive_thresholding.gif)



### Synthetic data generation

```python
import qim3d

# Generate synthetic collection of volumes
num_volumes = 15
volume_collection, labels = qim3d.generate.volume_collection(num_volumes=num_volumes)

# Visualize the collection
qim3d.viz.volumetric(volume_collection)
```
![synthetic collection](docs/assets/screenshots/synthetic_collection_default_rotation.gif )

### Structure tensor analysis

```python
import qim3d

vol = qim3d.examples.fibers_150x150x150
val, vec = qim3d.processing.structure_tensor(vol, visualize=True, axis=1)
```
![structure tensor](docs/assets/screenshots/structure_tensor_visualization_fibers.gif)

## Contributing

Please see the [Contributor Guide](/CONTRIBUTING.md).

## Support

The development of the `qim3d` is supported by the Infrastructure for Quantitative AI-based Tomography **QUAITOM** which is supported by a Novo Nordisk Foundation Data Science Programme grant (Grant number NNF21OC0069766).

<img src="https://novonordiskfonden.dk//app/uploads/NNF-INT_logo_tagline_blue_RGB_solid.png" alt="NNF" style="width:256px">
