Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@ A simple interactive viewer based on VTK classes and written in Python.
Examples of QApplications are the [`iviewer`](Wrappers/Python/ccpi/viewer/iviewer.py) and the [`standalone viewer`](Wrappers/Python/ccpi/viewer/standalone_viewer.py). An example of use in an external software is [iDVC](https://github.com/TomographicImaging/iDVC).

## Installation instructions
To install via `conda`, create a **minimal** environment using:
We recommend installing with additional requirements needed to run the [UI utilities](Wrappers/Python/ccpi/viewer/ui) for embedding the viewer in Qt applications. These include `eqt>=2.0.0` and one Python-Qt binding, such as `PySide2`, `PySide6` or `PyQt5`. The [UI examples](Wrappers/Python/examples/ui_examples) require `cil-data` as well.

```bash
conda create --name cilviewer ccpi-viewer=25.0.0 -c ccpi -c conda-forge
To install via `conda`:
```sh
conda env create --file Wrappers/Python/conda-recipe/ui_env.yml
```
### Qt embedding
This will install `PySide2` but you could edit the `.yml` to use a different Python-Qt binding.

To embed the viewer in Qt applications we provide extra [UI utilities](Wrappers/Python/ccpi/viewer/ui). To use those, the environment needs to include the extra requirements `eqt>=2.0.0` and one Python-Qt binding, such as `PySide2`, `PySide6` or `PyQt5`. The [UI examples](Wrappers/Python/examples/ui_examples) require `cil-data` as well.
### Minimal Version
Alternatively, to create a **minimal** environment without the requirements for the UI utilities use:

The environment can be updated to include these (`pyside2`) dependencies as follows:
```sh
conda env update --name cilviewer --file Wrappers/Python/conda-recipe/ui_env.yml
```bash
conda create --name cilviewer ccpi-viewer=25.1.0 -c ccpi -c conda-forge
```

## Run the standalone viewer QApplication

Note: this needs the additional UI requirements (recommended installation above).

- Activate your environment using: ``conda activate cilviewer``.
- Launch by typing: `cilviewer`
- Load a dataset using the File menu. Currently supported data formats:
Expand Down
3 changes: 2 additions & 1 deletion Wrappers/Python/conda-recipe/ui_env.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: cilviewer
name: cilviewer_ui
dependencies:
- ccpi::ccpi-viewer=25.1.0
- conda-forge::pyside2
- conda-forge::eqt>=2.0.0
- ccpi::cil-data=22.0.0
Expand Down
Loading