Metadata-Version: 2.4
Name: qim3d
Version: 1.3.0
Summary: QIM tools and user interfaces for volumetric imaging
Author-email: Felipe Delestro <fima@dtu.dk>
License-Expression: MIT
Project-URL: Homepage, https://platform.qim.dk/qim3d
Classifier: Programming Language :: Python :: 3
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.10
Description-Content-Type: text/markdown
Requires-Dist: gradio>=5.1
Requires-Dist: h5py>=3.9.0
Requires-Dist: localthickness>=0.1.2
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: pydicom==2.4.4
Requires-Dist: numpy>=1.26.0
Requires-Dist: outputformat>=0.1.3
Requires-Dist: Pillow>=10.0.1
Requires-Dist: plotly>=5.14.1
Requires-Dist: scipy>=1.11.2
Requires-Dist: seaborn>=0.12.2
Requires-Dist: setuptools>=68.0.0
Requires-Dist: tifffile>=2025.1.10
Requires-Dist: imagecodecs>=2024.12.30
Requires-Dist: tqdm>=4.65.0
Requires-Dist: nibabel>=5.2.0
Requires-Dist: ipywidgets>=8.1.2
Requires-Dist: dask>=2023.6.0
Requires-Dist: k3d>=2.16.1
Requires-Dist: olefile>=0.46
Requires-Dist: psutil>=5.9.0
Requires-Dist: structure-tensor>=0.2.1
Requires-Dist: noise>=1.2.2
Requires-Dist: zarr>=2.18.2
Requires-Dist: ome_zarr>=0.9.0
Requires-Dist: dask-image>=2024.5.3
Requires-Dist: scikit-image>=0.24.0
Requires-Dist: trimesh>=4.4.9
Requires-Dist: PyGEL3D>=0.6.1
Requires-Dist: slgbuilder>=0.2.1
Requires-Dist: pyvista[jupyter]>=0.45
Requires-Dist: imageio-ffmpeg>=0.6
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"

# 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://platform.qim.dk/qim3d/

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

## Installation

We recommend using a conda environment:

```bash
conda create -n qim3d python=3.11
```

After the environment is created, activate it by running:
```bash
conda activate qim3d
```

And then installation is easy using pip:
```bash
pip install qim3d
```

Remember that the environment needs to be activated each time you use `qim3d`!

For more detailed instructions and troubleshooting, please refer to the [documentation](https://platform.qim.dk/qim3d/#installation).

## 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.NT_128x128x128
val, vec = qim3d.processing.structure_tensor(vol, visualize = True, axis = 2)
```

![structure tensor](docs/assets/screenshots/structure_tensor_visualization.gif)

## 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">
