Skip to content
Snippets Groups Projects
Commit d2d1bfd7 authored by fima's avatar fima :beers:
Browse files

Docs update

parent bcf9831d
No related branches found
No related tags found
1 merge request!55Docs update
Showing
with 491 additions and 292 deletions
.cache/plugin/social/e4665e2507cbe100841b0959a0e48ef6.png

45.5 KiB

docs/assets/qim3d-icon.png

5.11 KiB

This diff is collapsed.
docs/assets/qim3d-logo.png

25.1 KiB | W: | H:

docs/assets/qim3d-logo.png

17.6 KiB | W: | H:

docs/assets/qim3d-logo.png
docs/assets/qim3d-logo.png
docs/assets/qim3d-logo.png
docs/assets/qim3d-logo.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
docs/assets/screenshots/CLI-k3d.png

342 KiB

docs/assets/screenshots/GUI-data_explorer.png

456 KiB

docs/assets/screenshots/GUI-iso3d.png

284 KiB

docs/assets/screenshots/GUI-local_thickness.png

212 KiB

docs/assets/screenshots/qim3d-filters_example.png

409 KiB

docs/assets/screenshots/viz-k3d.png

297 KiB

docs/assets/screenshots/viz-slices.png

189 KiB

---
icon: fontawesome/solid/keyboard
---
# Command line interface
The library also includes a command line interface for easy access to some functionalities, and the convenience of using qim3d directly from your terminal.
This offers quick interactions, making it ideal for tasks that require efficiency or when certain functionalities need to run on a server.
## Graphical User Interfaces
### `qim3d gui`
!!! quote "Reference"
The GUIs available in `qim3d` are built using Gradio:
<https://github.com/gradio-app/gradio>
```bibtex
@article{abid2019gradio,
title = {Gradio: Hassle-Free Sharing and Testing of ML Models in the Wild},
author = {Abid, Abubakar and Abdalla, Ali and Abid, Ali and Khan, Dawood and Alfozan, Abdulrahman and Zou, James},
journal = {arXiv preprint arXiv:1906.02569},
year = {2019},
}
```
| Arguments | Description |
| --------- | ----------- |
| `--data-explorer` | Starts the Data Explorer |
| `--iso3d` | Starts the 3D Isosurfaces visualization |
| `--local-thickness` | Starts the Local thickness tool |
| `--host` | Desired host for the server. By default runs on `0.0.0.0` |
| `--platform` | Uses the Qim platform API for a unique path and port depending on the username |
!!! Example
Here's an example of how to open the [Data Explorer](gui.md#data_explorer)
```
qim3d gui --data-explorer
```
``` title="Output"
Running on local URL: http://127.0.0.1:7860
```
In this case, the GUI will be available at `http://127.0.0.1:7860`
![Data explorer GUI](assets/screenshots/GUI-data_explorer.png)
!!! Example
Or for the local thickness GUI:
```
qim3d gui --local-thickness --host 127.0.0.1 --platform
```
``` title="Output"
{'username': 'fima', 'jupyter_port': '57326', 'gradio_port': '47326'}
╭────────────────────────╮
│ Starting gradio server │
├────────────────────────╯
├ Gradio
├ Using port 47326
╰ Running at 10.52.0.158
http://127.0.0.1:47326/gui/fima/47326/
INFO: Started server process [1534019]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:47326 (Press CTRL+C to quit)
```
In this case, the GUI will be available at `http://127.0.0.1:47326/gui/fima/47326/`
![Local thickness GUI](assets/screenshots/GUI-local_thickness.png)
## Data visualization
The command line interface also allows you to easily visualize data.
### `qim3d viz`
!!! quote "Reference"
Volumetric visualization uses K3D:
[Github page](https://github.com/K3D-tools/K3D-jupyter)
It is possible to launch the k3d visualization directly from the command line.
| Arguments | Description |
| --------- | ----------- |
| `--source` | Path to the volume file (Any image format supported by `qim3d.io.load()`) |
| `--destination` | Path to the `html` file to be saved. By default, `k3d.html` is saved where the command is run. |
| `--no-browser` | Do not open the file when finished. |
!!! Example
```
qim3d viz --source blobs_256x256x256.tif
```
``` title="Output"
Loading data from blobs_256x256x256.tif
Done, volume shape: (256, 256, 256)
Generating k3d plot...
Done, plot available at <k3d.html>
Opening in default browser...
```
And a new tab will be opened in the default browser with the interactive k3d plot:
![CLI k3d](assets/screenshots/CLI-k3d.png){ width="512" }
Or an specific path for destination can be used. We can also choose to not open the browser:
!!! Example
```
qim3d viz --source blobs_256x256x256.tif --destination my_plot.html --no-browser
```
``` title="Output"
Loading data from blobs_256x256x256.tif
Done, volume shape: (256, 256, 256)
Generating k3d plot...
Done, plot available at <my_plot.html>
```
This writes to disk the `my_plot.html` file.
---
icon: fontawesome/solid/window-maximize
---
# Graphical User Interfaces
The `qim3d` library provides a set of custom made GUIs that ease the interaction with the available tools.
!!! quote "Reference"
The GUIs available in `qim3d` are built using Gradio:
<https://github.com/gradio-app/gradio>
```bibtex
@article{abid2019gradio,
title = {Gradio: Hassle-Free Sharing and Testing of ML Models in the Wild},
author = {Abid, Abubakar and Abdalla, Ali and Abid, Ali and Khan, Dawood and Alfozan, Abdulrahman and Zou, James},
journal = {arXiv preprint arXiv:1906.02569},
year = {2019},
}
```
In general, the GUIs can be launched directly from the command line.
For details see [here](cli.md#qim3d-gui).
::: qim3d.gui.data_explorer ::: qim3d.gui.data_explorer
::: qim3d.gui.iso3d options:
members: False
![Data explorer GUI](assets/screenshots/GUI-data_explorer.png)
::: qim3d.gui.local_thickness ::: qim3d.gui.local_thickness
options:
members: False
![Local thickness GUI](assets/screenshots/GUI-local_thickness.png)
::: qim3d.gui.iso3d
options:
members: False
![Iso3d GUI](assets/screenshots/GUI-iso3d.png)
# <img src="assets/qim3d-logo.png" width="300px"> # ![qim3d logo](assets/qim3d-logo.svg){ width="256" }
`qim3d` is a Python library for quantitative imaging analysis in 3D. It provides functionality for handling data, as well as tools for visualization and analysis. `qim3d` is a Python library for quantitative imaging analysis in 3D. It provides functionality for handling data, as well as tools for visualization and analysis.
![Data explorer GUI](assets/screenshots/qim3d-filters_example.png)
## Installation ## Installation
Install the latest stable version by using pip: Creating an `conda` environment is not required but recommended:
``` ```
pip install qim3d conda create -n qim3d python=3.11
``` ```
After the environment is created, activate it by running:
## Getting started
Some basic funtionalites are descibred here. The full documentation is still under development.
### Loading Data
To load image data from a file, use `qim.io.load()`
```python
import qim3d
# Load a file
vol = qim3d.io.load("path/to/file.tif")
# Load a file as a virtual stack
vol = qim3d.io.load("path/to/file.tif", virtual_stack=True)
``` ```
conda activate qim3d
### Visualize data
You can easily check slices from your volume using `slices`
```python
import qim3d
img = qim3d.examples.fly_150x256x256
# By default shows the middle slice
qim3d.viz.slices(img)
# Or we can specifly positions
qim3d.viz.slices(img, position=[0,32,128])
# Parameters for size and colormap are also possible
qim3d.viz.slices(img, img_width=6, img_height=6, cmap="inferno")
``` ```
Install the latest stable version by using `pip`:
### GUI Components
The library also provides GUI components for interactive data analysis and exploration.
The `qim3d.gui` module contains various classes for visualization and analysis:
```python
import qim3d
app = qim3d.gui.iso3d.Interface()
app.launch()
```
GUIs can also be launched using the Qim3D CLI:
``` ```
$ qim3d gui --data-explorer pip install qim3d
``` ```
!!! warning
Installing `qim3d` may take a bit of time due to its dependencies. Thank you for your patience!
## Contributing ## Contributing
Contributions to `qim3d` are welcome! If you find a bug, have a feature request, or would like to contribute code, please open an issue or submit a pull request. Contributions to `qim3d` are welcome!
If you find a bug, have a feature request, or would like to contribute code, please open an issue or submit a pull request.
You can find us at Gitlab: You can find us at Gitlab:
https://lab.compute.dtu.dk/QIM/tools/qim3d [https://lab.compute.dtu.dk/QIM/tools/qim3d](https://lab.compute.dtu.dk/QIM/tools/qim3d
)
## License
This project is licensed under the MIT License. This project is licensed under the MIT License.
## Support
The development of `qim3d` is supported by:
![Novo Nordisk Foundation](https://novonordiskfonden.dk//app/uploads/NNF-INT_logo_tagline_blue_RGB_solid.png){ width="256" }
\ No newline at end of file
---
icon: fontawesome/solid/database
---
# Data input and output
Dealing with volumetric data can be done by `qim3d` for the most common image formats available.
Currently, it is possible to directly load `tiff`, `h5`, `nii`,`txm`, `vol` and common `PIL` formats using one single function.
::: qim3d.io.load ::: qim3d.io.load
options:
members:
- DataLoader
::: qim3d.io.save ::: qim3d.io.save
options:
members:
- DataSaver
::: qim3d.io.downloader ::: qim3d.io.downloader
options:
members:
- Downloader
\ No newline at end of file
---
icon: fontawesome/solid/robot
---
# Machine learning models
The `qim3d` library aims to ease the creation of ML models for volumetric images
::: qim3d.models.unet ::: qim3d.models.unet
\ No newline at end of file
# Release history ---
Here you can fin details about the version history of `qim3d` icon: fontawesome/solid/bookmark
---
## v0.3.1 (February 1, 2024) # Release History
- Save functionality for all file formats Below, you'll find details about the version history of `qim3d`.
### Just for tests As the library is still in its early development stages, there may be breaking changes before `v1.0` without prior deprecation warnings. Therefore, it's advisable to review the release history for more information if you encounter any issues.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non dolor non justo pharetra elementum porttitor at quam. Duis quam ligula, consequat vitae dolor non, facilisis tincidunt justo. Aliquam congue ex ac nibh tristique, et fringilla odio hendrerit. Cras sit amet dui mauris. Curabitur vitae nibh ut dui luctus cursus at id orci. Proin quam lacus, finibus in porttitor sed, ultrices vel ante. Phasellus ut rhoncus diam. Vestibulum vel ultricies orci, ut vehicula libero. Sed bibendum velit sed volutpat maximus. Maecenas non euismod ipsum. Donec eu tempor lorem. Donec lectus turpis, interdum eget commodo sed, euismod id sapien. Fusce malesuada tortor est.
### v0.3.2 (23/02/2024)
This version focus on the increased usability of the `qim3d` library
## v0.3.0 (January 23, 2024) - Online documentation available at [https://platform.qim.dk/qim3d](https://platform.qim.dk/qim3d)
- Virtual stacks also available for `txm` files
- Updated GUI launch pipeline
- New functionalities for `qim3d.vix.slices`
- Introduction of `qim3d.processing.filters` 🎉
- Introduction of `qim3d.viz.k3d` 🎉
- Introduction of qim3d CLI ### v0.3.1 (01/02/2024)
- Data Explorer GUI
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non dolor non justo pharetra elementum porttitor at quam. Duis quam ligula, consequat vitae dolor non, facilisis tincidunt justo. Aliquam congue ex ac nibh tristique, et fringilla odio hendrerit. Cras sit amet dui mauris. Curabitur vitae nibh ut dui luctus cursus at id orci. Proin quam lacus, finibus in porttitor sed, ultrices vel ante. Phasellus ut rhoncus diam. Vestibulum vel ultricies orci, ut vehicula libero. Sed bibendum velit sed volutpat maximus. Maecenas non euismod ipsum. Donec eu tempor lorem. Donec lectus turpis, interdum eget commodo sed, euismod id sapien. Fusce malesuada tortor est.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non dolor non justo pharetra elementum porttitor at quam. Duis quam ligula, consequat vitae dolor non, facilisis tincidunt justo. Aliquam congue ex ac nibh tristique, et fringilla odio hendrerit. Cras sit amet dui mauris. Curabitur vitae nibh ut dui luctus cursus at id orci. Proin quam lacus, finibus in porttitor sed, ultrices vel ante. Phasellus ut rhoncus diam. Vestibulum vel ultricies orci, ut vehicula libero. Sed bibendum velit sed volutpat maximus. Maecenas non euismod ipsum. Donec eu tempor lorem. Donec lectus turpis, interdum eget commodo sed, euismod id sapien. Fusce malesuada tortor est. Release expanding the IO functionalities
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non dolor non justo pharetra elementum porttitor at quam. Duis quam ligula, consequat vitae dolor non, facilisis tincidunt justo. Aliquam congue ex ac nibh tristique, et fringilla odio hendrerit. Cras sit amet dui mauris. Curabitur vitae nibh ut dui luctus cursus at id orci. Proin quam lacus, finibus in porttitor sed, ultrices vel ante. Phasellus ut rhoncus diam. Vestibulum vel ultricies orci, ut vehicula libero. Sed bibendum velit sed volutpat maximus. Maecenas non euismod ipsum. Donec eu tempor lorem. Donec lectus turpis, interdum eget commodo sed, euismod id sapien. Fusce malesuada tortor est. - Support for loading `vol` `nii` and `bigtiff` files
- Data loader now supports `virtual_stack`
- Save functionality for all file formats except `txm`
### v0.3.0 (23/01/2024)
- Introduction of qim3d CLI 🎉
- Introduction of memory utils 🎉
- Data Explorer GUI
- Save functionality for `tif` files
## v0.2.0 (Sept 18, 2023) ### v0.2.0 (18/09/2023)
Includes new develoments toward the usability of the library, as well as its integration with the QIM platform. Includes new develoments toward the usability of the library, as well as its integration with the QIM platform.
...@@ -39,7 +50,7 @@ Includes new develoments toward the usability of the library, as well as its int ...@@ -39,7 +50,7 @@ Includes new develoments toward the usability of the library, as well as its int
- Image examples accessible from `qim3d.examples` - Image examples accessible from `qim3d.examples`
## v0.1.3 (May 17, 2023) ### v0.1.3 (17/05/2023)
First stable release. First stable release.
......
code {
border-radius: 6px !important;
}
h1 {
font-size: 2.5em !important;
}
h2 {
margin-top: 5em !important;
font-size: 2em !important;
}
h3 {
margin-top: 2em !important;
font-size: 1.5em !important;
}
.md-search__form { .md-search__form {
border-radius: 8px; border-radius: 8px;
} }
...@@ -10,8 +29,10 @@ ...@@ -10,8 +29,10 @@
border-radius: 0px !important; border-radius: 0px !important;
} }
.md-nav__item .md-nav__link--active, .md-nav__item .md-nav__link--active code { .md-nav__item .md-nav__link--active,
color: orange} .md-nav__item .md-nav__link--active code {
color: orange
}
.md-typeset a { .md-typeset a {
color: orange; color: orange;
...@@ -26,9 +47,6 @@ ...@@ -26,9 +47,6 @@
font-size: 2.0em; font-size: 2.0em;
} }
code {
border-radius: 6px !important;
}
.md-tabs__list li:last-child { .md-tabs__list li:last-child {
margin-left: auto; margin-left: auto;
...@@ -42,3 +60,12 @@ code { ...@@ -42,3 +60,12 @@ code {
.md-header__title { .md-header__title {
margin-left: 0px !important; margin-left: 0px !important;
} }
.doc-module {
margin-top: 128px !important;
}
.md-main{
margin-bottom: 256px;
}
\ No newline at end of file
---
icon: fontawesome/solid/screwdriver-wrench
---
# Utils
A set of tools to ease managment of the system, with the common needs for large data in mind.
::: qim3d.utils.system ::: qim3d.utils.system
options: options:
members: members:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment