Skip to content

Commit 4cf1960

Browse files
authored
Separate requirements in files and folders (#451)
- Reduced the requirements to the basic packages, add extra requirements in `ui_env.yml` file - Update readme, contributing, documentation
1 parent b3c8cd4 commit 4cf1960

25 files changed

+132
-114
lines changed

.github/workflows/docker_build_test_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
- name: Run docker container with tests
3434
shell: bash -l {0}
3535
run: |
36-
docker run --rm --entrypoint /bin/bash -v /home/runner/work/CILViewer/CILViewer:/root/source_code cil-viewer -c "source ./mambaforge/etc/profile.d/conda.sh && conda activate cilviewer_webapp && conda install cil-data pytest -c ccpi && python -m pytest /root/source_code/Wrappers/Python -k 'not test_version and not test_cli_resample and not test_CILViewerBase and not test_CILViewer3D and not test_viewer_main_windows and not test_ui_dialogs'"
36+
docker run --rm --entrypoint /bin/bash -v /home/runner/work/CILViewer/CILViewer:/root/source_code cil-viewer -c "source ./mambaforge/etc/profile.d/conda.sh && conda activate cilviewer_webapp && conda install cil-data pytest pyside2 eqt>=1.0.0 -c ccpi && python -m pytest /root/source_code/Wrappers/Python -k 'not test_version and not test_cli_resample and not test_CILViewerBase and not test_CILViewer3D and not test_viewer_main_windows and not test_ui_dialogs'"
3737
# TODO: publish to come later

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## vx.x.x
44

5+
Requirements:
6+
- Reduced the requirements to the basic packages, add extra requirements in `ui_env.yml` file #451
7+
8+
Documentation:
9+
- Update readme, contributing, documentation #451
10+
511
Build and CI:
612
- Renamed mambaforge to miniforge to fix docker action #446
713
- Use ubuntu v22.04 in the actions #446

CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@
22
Contribute to the repository by opening a pull request.
33

44
## Local
5-
Develop code locally by cloning the source code and installing it.
6-
5+
Clone the source code.
76
```sh
8-
# Clone (download) source code
97
git clone git@github.com:TomographicImaging/CILViewer.git
8+
```
9+
Navigate the folder.
10+
```sh
1011
cd CILViewer
11-
# Install
12-
pip install ./Wrappers/Python
12+
```
13+
14+
Create a new environment.
15+
```sh
16+
conda env create –f Wrappers/Python/conda-recipe/environment.yml
17+
```
18+
Activate the environment.
19+
```sh
20+
conda activate cilviewer
21+
```
22+
Install the package.
23+
```sh
24+
pip install ./Wrappers/Python --no-dependencies
1325
```
1426

1527
### Run tests
1628
Before merging a pull request, all tests must pass.
1729
Install the required packages:
1830
```sh
19-
pip install pytest pillow
31+
conda install eqt pillow pyside2 pytest -c ccpi cil-data=22.0.0
2032
```
2133
Tests can be run locally from the repository folder
2234
```sh

Documentation/documentation.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CILViewer Documentation
2+
3+
## Using the 2D and 3D Viewers keyboard interactors
4+
5+
### **2D Viewer keybindings**
6+
The interactive viewer CILViewer2D provides:
7+
- Keyboard Interactions:
8+
- 'h' display the help
9+
- 'x' slices on the YZ plane
10+
- 'y' slices on the XZ plane
11+
- 'z' slices on the XY
12+
- 'a' auto window/level to accomodate all values
13+
- 's' save render to PNG (current_render.png)
14+
- 'l' plots horizontal and vertical profiles of the displayed image at the pointer location
15+
- 'i' toggles interpolation
16+
- slice up/down: mouse scroll (10 x pressing SHIFT)
17+
- Window/Level: ALT + Right Mouse Button + drag
18+
- Pan: CTRL + Right Mouse Button + drag
19+
- Zoom: SHIFT + Right Mouse Button + drag (up: zoom in, down: zoom out)
20+
- Pick: Left Mouse Click
21+
- ROI (square):
22+
- Create ROI: CTRL + Left Mouse Button
23+
- Resize ROI: Left Mouse Button on outline + drag
24+
- Translate ROI: Middle Mouse Button within ROI
25+
- Delete ROI: ALT + Left Mouse Button
26+
27+
### Demonstration on head dataset[1]
28+
29+
| 2D viewer | Zoom | Slice X + Pick |
30+
|----- |--- |--- |
31+
|![Window/Level](pics/windowLevel.png)|![Zoom](pics/zoom.png)|![Slice X + Pick](pics/sliceXPick.png)|
32+
33+
| ROI | Line profiles |
34+
|--- |--- |
35+
|![ROI](pics/ROI.png)|![line](pics/line.png)|
36+
37+
### **3D Viewer keybindings**
38+
The interactive 3D viewer CILViewer provides:
39+
- Keyboard Interactions:
40+
- 'h' display the help
41+
- 'x' slices on the YZ plane
42+
- 'y' slices on the XZ plane
43+
- 'z' slices on the XY
44+
- 'r' save render to current_render.png
45+
- 's' toggle visibility of slice
46+
- 'v' toggle visibility of volume render
47+
- 'c' activates volume render clipping plane widget, for slicing through a volume.
48+
- 'a' whole image Auto Window/Level on the slice.
49+
- 'i' interpolation of the slice.
50+
- Slice: Mouse Scroll
51+
- Zoom: Right Mouse + Move Up/Down
52+
- Pan: Middle Mouse Button + Move or Shift + Left Mouse + Move
53+
- Adjust Camera: Left Mouse + Move
54+
- Rotate: Ctrl + Left Mouse + Move
55+
56+
## References
57+
58+
[1] The head dataset is avaiable in [CIL-Data as 'head.mha'](https://github.com/TomographicImaging/CIL-Data) along with its license.
File renamed without changes.

0 commit comments

Comments
 (0)