trame-slicer 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- trame_slicer-0.1.0/.codespellrc +2 -0
- trame_slicer-0.1.0/.flake8 +10 -0
- trame_slicer-0.1.0/.gitattributes +1 -0
- trame_slicer-0.1.0/.github/workflows/test_and_release.yml +82 -0
- trame_slicer-0.1.0/.gitignore +28 -0
- trame_slicer-0.1.0/.pre-commit-config.yaml +74 -0
- trame_slicer-0.1.0/CHANGELOG.md +264 -0
- trame_slicer-0.1.0/CONTRIBUTING.md +55 -0
- trame_slicer-0.1.0/LICENSE +15 -0
- trame_slicer-0.1.0/MANIFEST.in +4 -0
- trame_slicer-0.1.0/PKG-INFO +147 -0
- trame_slicer-0.1.0/README.md +108 -0
- trame_slicer-0.1.0/docs/trame-slicer-medical-app-example.png +0 -0
- trame_slicer-0.1.0/examples/__init__.py +0 -0
- trame_slicer-0.1.0/examples/medical_viewer_app.py +83 -0
- trame_slicer-0.1.0/examples/widgets/__init__.py +22 -0
- trame_slicer-0.1.0/examples/widgets/control_button.py +39 -0
- trame_slicer-0.1.0/examples/widgets/layout_button.py +49 -0
- trame_slicer-0.1.0/examples/widgets/load_client_volume_files_button.py +95 -0
- trame_slicer-0.1.0/examples/widgets/markups_button.py +24 -0
- trame_slicer-0.1.0/examples/widgets/segmentation_button.py +367 -0
- trame_slicer-0.1.0/examples/widgets/tools_strip.py +35 -0
- trame_slicer-0.1.0/examples/widgets/utils.py +33 -0
- trame_slicer-0.1.0/examples/widgets/volume_property_button.py +25 -0
- trame_slicer-0.1.0/examples/widgets/vr_preset_select.py +70 -0
- trame_slicer-0.1.0/examples/widgets/vr_shift_slider.py +33 -0
- trame_slicer-0.1.0/noxfile.py +96 -0
- trame_slicer-0.1.0/pyproject.toml +136 -0
- trame_slicer-0.1.0/tests/conftest.py +203 -0
- trame_slicer-0.1.0/tests/direct_view_factory.py +54 -0
- trame_slicer-0.1.0/tests/requirements.txt +5 -0
- trame_slicer-0.1.0/tests/test_abstract_view.py +53 -0
- trame_slicer-0.1.0/tests/test_display_manager.py +139 -0
- trame_slicer-0.1.0/tests/test_event_dispatcher.py +163 -0
- trame_slicer-0.1.0/tests/test_io_manager.py +217 -0
- trame_slicer-0.1.0/tests/test_layout_grid.py +246 -0
- trame_slicer-0.1.0/tests/test_layout_manager.py +190 -0
- trame_slicer-0.1.0/tests/test_markups_node.py +58 -0
- trame_slicer-0.1.0/tests/test_medical_view_example.py +11 -0
- trame_slicer-0.1.0/tests/test_segment_modifier.py +192 -0
- trame_slicer-0.1.0/tests/test_segmentation_display.py +24 -0
- trame_slicer-0.1.0/tests/test_segmentation_editor.py +210 -0
- trame_slicer-0.1.0/tests/test_segmentation_paint_effect.py +87 -0
- trame_slicer-0.1.0/tests/test_segmentation_scissors_effect.py +48 -0
- trame_slicer-0.1.0/tests/test_slice_view.py +146 -0
- trame_slicer-0.1.0/tests/test_threed_view.py +126 -0
- trame_slicer-0.1.0/tests/test_trame_state.py +15 -0
- trame_slicer-0.1.0/tests/test_view_manager.py +201 -0
- trame_slicer-0.1.0/tests/test_volume_rendering.py +89 -0
- trame_slicer-0.1.0/tests/view_events.py +62 -0
- trame_slicer-0.1.0/trame_slicer/__init__.py +3 -0
- trame_slicer-0.1.0/trame_slicer/core/__init__.py +19 -0
- trame_slicer-0.1.0/trame_slicer/core/display_manager.py +78 -0
- trame_slicer-0.1.0/trame_slicer/core/io_manager.py +169 -0
- trame_slicer-0.1.0/trame_slicer/core/layout_manager.py +144 -0
- trame_slicer-0.1.0/trame_slicer/core/segmentation_editor.py +398 -0
- trame_slicer-0.1.0/trame_slicer/core/slicer_app.py +148 -0
- trame_slicer-0.1.0/trame_slicer/core/view_manager.py +93 -0
- trame_slicer-0.1.0/trame_slicer/core/volume_property.py +125 -0
- trame_slicer-0.1.0/trame_slicer/core/volume_rendering.py +148 -0
- trame_slicer-0.1.0/trame_slicer/core/volumes_reader.py +430 -0
- trame_slicer-0.1.0/trame_slicer/rca_view/__init__.py +11 -0
- trame_slicer-0.1.0/trame_slicer/rca_view/rca_view_factory.py +167 -0
- trame_slicer-0.1.0/trame_slicer/resources/__init__.py +44 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets.xml +34 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-AAA.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-AAA2.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Air.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Bone.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Bones.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Cardiac.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Cardiac2.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Cardiac3.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Chest-Contrast-Enhanced.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Chest-Vessels.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Coronary-Arteries-2.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Coronary-Arteries-3.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Coronary-Arteries.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Cropped-Volume-Bone.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Fat.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Liver-Vasculature.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Lung.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-MIP.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Muscle.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Pulmonary-Arteries.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-Soft-Tissue.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/CT-X-ray.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/DTI-FA-Brain.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/MR-Angio.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/MR-Default.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/MR-MIP.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/MR-T2-Brain.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/US-Fetal.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/uCT-Bone-16bit.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/uCT-Bone-8bit.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/presets_icons/uCT-Skull.png +0 -0
- trame_slicer-0.1.0/trame_slicer/resources/terminologies/AnatomicRegionAndModifier-DICOM-Master.term.json +13317 -0
- trame_slicer-0.1.0/trame_slicer/resources/terminologies/SegmentationCategoryTypeModifier-DICOM-Master.term.json +13885 -0
- trame_slicer-0.1.0/trame_slicer/resources/terminologies/SegmentationCategoryTypeModifier-SlicerGeneralAnatomy.term.json +3750 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/__init__.py +52 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_modifier.py +390 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_paint_widget.py +198 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_paint_widget_2d.py +274 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_paint_widget_3d.py +267 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_properties.py +52 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_region_mask.py +70 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segment_scissor_widget.py +259 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segmentation.py +508 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segmentation_effects.py +157 -0
- trame_slicer-0.1.0/trame_slicer/segmentation/segmentation_widget.py +10 -0
- trame_slicer-0.1.0/trame_slicer/utils/__init__.py +22 -0
- trame_slicer-0.1.0/trame_slicer/utils/callback_undo_command.py +19 -0
- trame_slicer-0.1.0/trame_slicer/utils/convert_colors.py +6 -0
- trame_slicer-0.1.0/trame_slicer/utils/file_access.py +20 -0
- trame_slicer-0.1.0/trame_slicer/utils/signal_to_state.py +31 -0
- trame_slicer-0.1.0/trame_slicer/utils/singleton_meta.py +10 -0
- trame_slicer-0.1.0/trame_slicer/utils/vtk_event_dispatcher.py +74 -0
- trame_slicer-0.1.0/trame_slicer/utils/vtk_numpy.py +8 -0
- trame_slicer-0.1.0/trame_slicer/views/__init__.py +53 -0
- trame_slicer-0.1.0/trame_slicer/views/abstract_view.py +310 -0
- trame_slicer-0.1.0/trame_slicer/views/abstract_view_interactor.py +17 -0
- trame_slicer-0.1.0/trame_slicer/views/layout_grid.py +142 -0
- trame_slicer-0.1.0/trame_slicer/views/render_scheduler.py +63 -0
- trame_slicer-0.1.0/trame_slicer/views/slice_view.py +248 -0
- trame_slicer-0.1.0/trame_slicer/views/threed_view.py +267 -0
- trame_slicer-0.1.0/trame_slicer/views/threed_view_interaction_dispatch.py +120 -0
- trame_slicer-0.1.0/trame_slicer/views/trame_helper.py +149 -0
- trame_slicer-0.1.0/trame_slicer/views/view_factory.py +68 -0
- trame_slicer-0.1.0/trame_slicer/views/view_interaction_dispatch.py +210 -0
- trame_slicer-0.1.0/trame_slicer/views/view_layout.py +16 -0
- trame_slicer-0.1.0/trame_slicer/views/view_layout_definition.py +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tests/data/** filter=lfs diff=lfs merge=lfs -text
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Test and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
pre-commit:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.10"
|
|
18
|
+
|
|
19
|
+
# Install and run pre-commit
|
|
20
|
+
- run: |
|
|
21
|
+
pip install pre-commit
|
|
22
|
+
pre-commit install
|
|
23
|
+
pre-commit run --all-files
|
|
24
|
+
|
|
25
|
+
pytest:
|
|
26
|
+
if: false # Test running currently deactivated as it requires slicer lib wheel generation for each target
|
|
27
|
+
name: Pytest ${{ matrix.config.name }}
|
|
28
|
+
runs-on: ${{ matrix.config.os }}
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
python-version: ["3.10", "3.13"]
|
|
33
|
+
config:
|
|
34
|
+
- { name: "Linux", os: ubuntu-latest }
|
|
35
|
+
- { name: "MacOSX", os: macos-latest }
|
|
36
|
+
- { name: "Windows", os: windows-latest }
|
|
37
|
+
|
|
38
|
+
defaults:
|
|
39
|
+
run:
|
|
40
|
+
shell: bash
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Checkout
|
|
44
|
+
uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
47
|
+
uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python-version }}
|
|
50
|
+
|
|
51
|
+
- name: Install and Run Tests
|
|
52
|
+
run: |
|
|
53
|
+
pip install .[dev]
|
|
54
|
+
pytest -s ./tests
|
|
55
|
+
|
|
56
|
+
release:
|
|
57
|
+
needs: [pre-commit]
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
if: github.event_name == 'push'
|
|
60
|
+
environment:
|
|
61
|
+
name: pypi
|
|
62
|
+
url: https://pypi.org/p/trame-slicer
|
|
63
|
+
permissions:
|
|
64
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
65
|
+
contents: write # IMPORTANT: mandatory for making GitHub Releases
|
|
66
|
+
|
|
67
|
+
steps:
|
|
68
|
+
- name: Checkout
|
|
69
|
+
uses: actions/checkout@v4
|
|
70
|
+
with:
|
|
71
|
+
fetch-depth: 0
|
|
72
|
+
|
|
73
|
+
- name: Python Semantic Release
|
|
74
|
+
id: release
|
|
75
|
+
uses: python-semantic-release/python-semantic-release@master
|
|
76
|
+
with:
|
|
77
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
78
|
+
|
|
79
|
+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
|
|
80
|
+
- name: Publish package distributions to PyPI
|
|
81
|
+
if: steps.release.outputs.released == 'true'
|
|
82
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
node_modules
|
|
3
|
+
.venv
|
|
4
|
+
|
|
5
|
+
# local env files
|
|
6
|
+
.env.local
|
|
7
|
+
.env.*.local
|
|
8
|
+
|
|
9
|
+
# Log files
|
|
10
|
+
npm-debug.log*
|
|
11
|
+
yarn-debug.log*
|
|
12
|
+
yarn-error.log*
|
|
13
|
+
pnpm-debug.log*
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.idea
|
|
17
|
+
.vscode
|
|
18
|
+
*.suo
|
|
19
|
+
*.ntvs*
|
|
20
|
+
*.njsproj
|
|
21
|
+
*.sln
|
|
22
|
+
*.sw?
|
|
23
|
+
tests/data/
|
|
24
|
+
|
|
25
|
+
__pycache__
|
|
26
|
+
*egg-info
|
|
27
|
+
*pyc
|
|
28
|
+
/dist
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
|
+
|
|
5
|
+
exclude: ^.cruft.json|.copier-answers.yml$
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
9
|
+
rev: "1.19.1"
|
|
10
|
+
hooks:
|
|
11
|
+
- id: blacken-docs
|
|
12
|
+
additional_dependencies: [black==24.*]
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
15
|
+
rev: "v5.0.0"
|
|
16
|
+
hooks:
|
|
17
|
+
- id: check-added-large-files
|
|
18
|
+
- id: check-case-conflict
|
|
19
|
+
- id: check-merge-conflict
|
|
20
|
+
- id: check-symlinks
|
|
21
|
+
- id: check-yaml
|
|
22
|
+
- id: debug-statements
|
|
23
|
+
- id: end-of-file-fixer
|
|
24
|
+
- id: mixed-line-ending
|
|
25
|
+
- id: name-tests-test
|
|
26
|
+
args: ["--pytest-test-first"]
|
|
27
|
+
exclude: "direct_view_factory.py|view_events.py"
|
|
28
|
+
- id: requirements-txt-fixer
|
|
29
|
+
- id: trailing-whitespace
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
32
|
+
rev: "v1.10.0"
|
|
33
|
+
hooks:
|
|
34
|
+
- id: rst-backticks
|
|
35
|
+
- id: rst-directive-colons
|
|
36
|
+
- id: rst-inline-touching-normal
|
|
37
|
+
|
|
38
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
39
|
+
rev: "v3.4.2"
|
|
40
|
+
hooks:
|
|
41
|
+
- id: prettier
|
|
42
|
+
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
43
|
+
args: [--prose-wrap=always]
|
|
44
|
+
|
|
45
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
46
|
+
rev: "v0.9.1"
|
|
47
|
+
hooks:
|
|
48
|
+
- id: ruff
|
|
49
|
+
args: ["--fix", "--show-fixes", "--line-length", "120"]
|
|
50
|
+
- id: ruff-format
|
|
51
|
+
|
|
52
|
+
- repo: https://github.com/codespell-project/codespell
|
|
53
|
+
rev: "v2.3.0"
|
|
54
|
+
hooks:
|
|
55
|
+
- id: codespell
|
|
56
|
+
|
|
57
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
58
|
+
rev: "v0.10.0.1"
|
|
59
|
+
hooks:
|
|
60
|
+
- id: shellcheck
|
|
61
|
+
|
|
62
|
+
- repo: local
|
|
63
|
+
hooks:
|
|
64
|
+
- id: disallow-caps
|
|
65
|
+
name: Disallow improper capitalization
|
|
66
|
+
language: pygrep
|
|
67
|
+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
|
|
68
|
+
exclude: .pre-commit-config.yaml
|
|
69
|
+
|
|
70
|
+
- repo: https://github.com/abravalheri/validate-pyproject
|
|
71
|
+
rev: "v0.23"
|
|
72
|
+
hooks:
|
|
73
|
+
- id: validate-pyproject
|
|
74
|
+
additional_dependencies: ["validate-pyproject-schema-store[all]"]
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## v0.1.0 (2025-04-14)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
- **api**: Change paths to use slicer package
|
|
9
|
+
([`e2639ad`](https://github.com/KitwareMedical/trame-slicer/commit/e2639ad6736203af0a6b6545c78ddca3b8c641ca))
|
|
10
|
+
|
|
11
|
+
* Change paths to use slicer package for Slicer app compatibility
|
|
12
|
+
|
|
13
|
+
- **segmentation**: (wip) Add segment editor
|
|
14
|
+
([`8702402`](https://github.com/KitwareMedical/trame-slicer/commit/870240271255ca84020d0399653f188340361955))
|
|
15
|
+
|
|
16
|
+
* Add segmentation editor and paint/erase effect * Add segmentation editor scissor effect * Add
|
|
17
|
+
examples
|
|
18
|
+
|
|
19
|
+
- **segmentation**: Refactoring
|
|
20
|
+
([`3deb00c`](https://github.com/KitwareMedical/trame-slicer/commit/3deb00c6886b666c51bd22b301f3a02bc02341ad))
|
|
21
|
+
|
|
22
|
+
* Rename SegmentationEffect to Widget * Rename SegmentationTool to Effect * Rename
|
|
23
|
+
SegmentationManager to SegmentationEditor * Rename SegmentationEditor to SegmentModifier * Move
|
|
24
|
+
Segmentation logic to SegmentationEditor * Fix segmentation sanitize when using empty segment *
|
|
25
|
+
Fix segmentation export to NIFTI file * Move IO to segmentation editor * Fix brush scaling in
|
|
26
|
+
absolute mode and default to invariant * Fix events sent twice in Slice views * Move events
|
|
27
|
+
handling in views in dedicated classes * Add SegmentRegionMask responsible for region masking *
|
|
28
|
+
Fix failing tests * Add support for segmentation Undo / Redo * Add helper for signal / slot
|
|
29
|
+
connection * Add segmentation button to medical example * Fix brush diameter update when switching
|
|
30
|
+
views * Add Undo / Redo functionnalities * Update example * Migrate to pyproject.toml * Bump
|
|
31
|
+
pre-commit rules * Fix pre-commit errors
|
|
32
|
+
|
|
33
|
+
- **segmentation**: Scissor effect in slice views
|
|
34
|
+
([`5b55f3b`](https://github.com/KitwareMedical/trame-slicer/commit/5b55f3be491c7be9702c389b6165112de3d46419))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## v0.0.2 (2025-04-08)
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- **packaging**: Add missing manifest file
|
|
42
|
+
([`51bc005`](https://github.com/KitwareMedical/trame-slicer/commit/51bc0059da861458c0e968b3d37979021f06614f))
|
|
43
|
+
|
|
44
|
+
* Add missing manifest file to install the trame-slicer resources
|
|
45
|
+
|
|
46
|
+
- **view**: Fix resize hang on linux
|
|
47
|
+
([`27c2a93`](https://github.com/KitwareMedical/trame-slicer/commit/27c2a93736ba01d84590842f0a5ea8b58f95d1c7))
|
|
48
|
+
|
|
49
|
+
https://github.com/Kitware/trame-rca/pull/18
|
|
50
|
+
|
|
51
|
+
- **view**: Rollback monitored resize event
|
|
52
|
+
([`f2de24e`](https://github.com/KitwareMedical/trame-slicer/commit/f2de24e316ab137dd52735204788e4bb50542e6a))
|
|
53
|
+
|
|
54
|
+
* Rollback 05e7267a2eea3a953fa5fdc45b401401e898f4e2 which doesn't work for Linux systems.
|
|
55
|
+
|
|
56
|
+
### Documentation
|
|
57
|
+
|
|
58
|
+
- Add missing acknowledgments
|
|
59
|
+
([`032f400`](https://github.com/KitwareMedical/trame-slicer/commit/032f400c0004369eddb55b19a5174d3b997d3e96))
|
|
60
|
+
|
|
61
|
+
* Add missing HINT & COSY acknowledgments
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
- V0.0.2
|
|
66
|
+
([`e0128d6`](https://github.com/KitwareMedical/trame-slicer/commit/e0128d6eebde256bd4c510be1f4d8b1170431ff0))
|
|
67
|
+
|
|
68
|
+
- **layout**: Add argument to specify layout size
|
|
69
|
+
([`4f3c0a4`](https://github.com/KitwareMedical/trame-slicer/commit/4f3c0a4f499f8e58ea3168ad1ce5afe7fb0c329d))
|
|
70
|
+
|
|
71
|
+
- **rca_view**: Bump RCA version
|
|
72
|
+
([`3626778`](https://github.com/KitwareMedical/trame-slicer/commit/3626778b06a9d09fe372218239ca92c80105631a))
|
|
73
|
+
|
|
74
|
+
* Bump RCA version and change default encoder to Turbo JPEG
|
|
75
|
+
|
|
76
|
+
- **view**: Update interactor resize event
|
|
77
|
+
([`05e7267`](https://github.com/KitwareMedical/trame-slicer/commit/05e7267a2eea3a953fa5fdc45b401401e898f4e2))
|
|
78
|
+
|
|
79
|
+
* Interactor WindowResizeEvent is scheduled to be deprecated / removed. Update to use ConfigureEvent
|
|
80
|
+
instead.
|
|
81
|
+
|
|
82
|
+
- **view_layout**: Add quick access to 3d view properties
|
|
83
|
+
([`b1fefcd`](https://github.com/KitwareMedical/trame-slicer/commit/b1fefcdad50c05506b670451a695b66b9856a77a))
|
|
84
|
+
|
|
85
|
+
- **views**: Add zoom in / out
|
|
86
|
+
([`99cf3e9`](https://github.com/KitwareMedical/trame-slicer/commit/99cf3e94724bedee7d8c229620910b038806a2ee))
|
|
87
|
+
|
|
88
|
+
* Add helper methods to zoom in and out for Slice and 3D views
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## v0.0.1 (2025-01-30)
|
|
92
|
+
|
|
93
|
+
### Bug Fixes
|
|
94
|
+
|
|
95
|
+
- **test**: Fix factory tests
|
|
96
|
+
([`159101c`](https://github.com/KitwareMedical/trame-slicer/commit/159101c330c43de9eafdc1cec01dd0c12b98ee82))
|
|
97
|
+
|
|
98
|
+
- **test**: Fix failing tests with VTK 9.4
|
|
99
|
+
([`78916bb`](https://github.com/KitwareMedical/trame-slicer/commit/78916bb596651a4a772f5fe8fa0e9dd5c4e8ee9c))
|
|
100
|
+
|
|
101
|
+
- **test**: Fix missing test dependency
|
|
102
|
+
([`b690082`](https://github.com/KitwareMedical/trame-slicer/commit/b6900827f1e9aa06959f619c085c85b3acd9ce9b))
|
|
103
|
+
|
|
104
|
+
- **views**: Fix 2D view resize
|
|
105
|
+
([`ffb1131`](https://github.com/KitwareMedical/trame-slicer/commit/ffb1131f025cc625a02a9d56fda5a22be6713793))
|
|
106
|
+
|
|
107
|
+
- **views**: Fix rendering for 2D Slices
|
|
108
|
+
([`95ac535`](https://github.com/KitwareMedical/trame-slicer/commit/95ac5350c92947a4b95acc6f367956efbf3a31df))
|
|
109
|
+
|
|
110
|
+
### Chores
|
|
111
|
+
|
|
112
|
+
- Mark test data folder as LFS
|
|
113
|
+
([`f21db41`](https://github.com/KitwareMedical/trame-slicer/commit/f21db41db36f8d6232e47ddaf48158f67c54bc34))
|
|
114
|
+
|
|
115
|
+
- Remove outdated rendering pool
|
|
116
|
+
([`356e942`](https://github.com/KitwareMedical/trame-slicer/commit/356e942448498cc5c397f54e5095004eb994dfca))
|
|
117
|
+
|
|
118
|
+
- Remove test data from repository
|
|
119
|
+
([`6f7e145`](https://github.com/KitwareMedical/trame-slicer/commit/6f7e145d70474bbd78129b2c742f795678496ddb))
|
|
120
|
+
|
|
121
|
+
### Documentation
|
|
122
|
+
|
|
123
|
+
- Update library documentation
|
|
124
|
+
([`f2a5234`](https://github.com/KitwareMedical/trame-slicer/commit/f2a52345eabecf78048b6f7051eb4e46c1fff022))
|
|
125
|
+
|
|
126
|
+
- Update readme and contributing
|
|
127
|
+
([`7ec1c6a`](https://github.com/KitwareMedical/trame-slicer/commit/7ec1c6a505fc24256a5a4c61b6f828aab045db36))
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
- **api**: Change imports for Slicer application compatibility
|
|
132
|
+
([`6f43b9e`](https://github.com/KitwareMedical/trame-slicer/commit/6f43b9e2dd2b40661a0e79133926d64f4bb59dea))
|
|
133
|
+
|
|
134
|
+
- **api**: Change view API to use factories for displayable manager creation
|
|
135
|
+
([`4c9f6a4`](https://github.com/KitwareMedical/trame-slicer/commit/4c9f6a42fafeec6dce2abcd1a4265828fd831d0e))
|
|
136
|
+
|
|
137
|
+
- **api**: Improve trame Slicer folder structure
|
|
138
|
+
([`2c33ed2`](https://github.com/KitwareMedical/trame-slicer/commit/2c33ed2d76d7957a018c1cc4d293a1e333050759))
|
|
139
|
+
|
|
140
|
+
- **api**: Move files to git project root
|
|
141
|
+
([`4864f5b`](https://github.com/KitwareMedical/trame-slicer/commit/4864f5bd4c3f5281ec2d361f6d3ecf4a3b32ff8e))
|
|
142
|
+
|
|
143
|
+
- **api**: Rename library to trame-slicer
|
|
144
|
+
([`e79f9a2`](https://github.com/KitwareMedical/trame-slicer/commit/e79f9a26e93be32377e87f6d4417f8ac24597610))
|
|
145
|
+
|
|
146
|
+
* Rename library to trame-slicer for future usage consistency * SlicerTrame is reserved for Slicer
|
|
147
|
+
integrated trame-slicer extension
|
|
148
|
+
|
|
149
|
+
- **core**: Add custom share directory
|
|
150
|
+
([`9f26de6`](https://github.com/KitwareMedical/trame-slicer/commit/9f26de6a7b0db8048626b3d313e62d6150193455))
|
|
151
|
+
|
|
152
|
+
- **core**: Add file loading from front end
|
|
153
|
+
([`634708c`](https://github.com/KitwareMedical/trame-slicer/commit/634708c8af04bf4f442d1165190b06ec9eed06e9))
|
|
154
|
+
|
|
155
|
+
* Add file loading from front end * Automatically display the first volume * Fix Trame / Slicer
|
|
156
|
+
synchronization for 2D sliders and 3D view reset * Add background color property to view
|
|
157
|
+
definitions * Fix 2D view orientation to match volume orientation
|
|
158
|
+
|
|
159
|
+
- **core**: Add markups handling
|
|
160
|
+
([`d74153a`](https://github.com/KitwareMedical/trame-slicer/commit/d74153ac735437f51eaa7f62b881a1d9fa8dc810))
|
|
161
|
+
|
|
162
|
+
- **core**: Add slice 3D view visibility
|
|
163
|
+
([`5032996`](https://github.com/KitwareMedical/trame-slicer/commit/5032996e3c79838a5c6818d8bee46b4549cef866))
|
|
164
|
+
|
|
165
|
+
* Add Slice 3D view visibility * Add helper functions in io_manager * Move resources to dedicated
|
|
166
|
+
folder * Initialize additional logic * Bump minimum required trame-rca version to supporting mouse
|
|
167
|
+
hover
|
|
168
|
+
|
|
169
|
+
- **core**: Add volume rendering shift helpers
|
|
170
|
+
([`550953f`](https://github.com/KitwareMedical/trame-slicer/commit/550953f3aed077ee35e70cd6cfd2e6f47a298c46))
|
|
171
|
+
|
|
172
|
+
* Add VolumeProperty class responsible for VR shift logic * Add VolumeRendering vr shift logic * Add
|
|
173
|
+
3D Slicer resources for preset icons
|
|
174
|
+
|
|
175
|
+
- **example**: Create demo content with simplistic UI
|
|
176
|
+
([`b96a875`](https://github.com/KitwareMedical/trame-slicer/commit/b96a875d7c2a43075ca92c4488c9964a4680d145))
|
|
177
|
+
|
|
178
|
+
- **example**: Split medical view example
|
|
179
|
+
([`cff98d3`](https://github.com/KitwareMedical/trame-slicer/commit/cff98d30d21dbc7b37a72e382696b907d6788bb5))
|
|
180
|
+
|
|
181
|
+
* Split medical viewer example code into modularized widgets * Add example for the VR Slider * Add
|
|
182
|
+
smoke test for medical viewer example
|
|
183
|
+
|
|
184
|
+
- **io-manager**: Add explicit options to save / load models without coordinate change
|
|
185
|
+
([`cd57308`](https://github.com/KitwareMedical/trame-slicer/commit/cd57308ad714c365af703992779a4cd4dc7bce86))
|
|
186
|
+
|
|
187
|
+
- **segmentation**: Add segmentation
|
|
188
|
+
([`5226c1e`](https://github.com/KitwareMedical/trame-slicer/commit/5226c1edf226639c17cf8372c6d1b8bb3a9f47ac))
|
|
189
|
+
|
|
190
|
+
* Add segmentation handling in the POC
|
|
191
|
+
|
|
192
|
+
- **views**: Add additional support for RCA encoding formats
|
|
193
|
+
([`887a5d2`](https://github.com/KitwareMedical/trame-slicer/commit/887a5d2082a6f4d7b8c8fb41eab0763652cc2103))
|
|
194
|
+
|
|
195
|
+
- **views**: Add component responsible for the layout
|
|
196
|
+
([`ca92047`](https://github.com/KitwareMedical/trame-slicer/commit/ca92047e8be4d86f9fdb6dc2e3996e4e505c1278))
|
|
197
|
+
|
|
198
|
+
* Refactor code structure for more clarity * Apply precommit rules * Add LayoutGrid component for
|
|
199
|
+
displaying the view layout * Add ViewManager responsible for instantiating the views * Removed
|
|
200
|
+
outdated classes and code
|
|
201
|
+
|
|
202
|
+
- **views**: Add mouse hover support
|
|
203
|
+
([`99552f9`](https://github.com/KitwareMedical/trame-slicer/commit/99552f9a0eefc0be23cc29d2785c06ff213807fb))
|
|
204
|
+
|
|
205
|
+
* Add mouse hover support * Fix double mouse release bug
|
|
206
|
+
|
|
207
|
+
- **views**: Add Slice and 3D view interaction
|
|
208
|
+
([`43861be`](https://github.com/KitwareMedical/trame-slicer/commit/43861bedf7d24232ea2760dbaff1bad0b629b421))
|
|
209
|
+
|
|
210
|
+
* Bump VTK version to 9.3 for serialization support * Add 2D Slice interaction * Add 3D View
|
|
211
|
+
interaction in Remote Controlled Area * Add trame-vtklocal as dependency for local rendering * Add
|
|
212
|
+
trame-rca as dependency for remote rendering
|
|
213
|
+
|
|
214
|
+
- **views**: Add Slice offset interaction
|
|
215
|
+
([`acf6b8f`](https://github.com/KitwareMedical/trame-slicer/commit/acf6b8f78bcd8a606cccee0f392d89a9f719e15c))
|
|
216
|
+
|
|
217
|
+
- **views**: Add View factory and hook with Slicer / Trame
|
|
218
|
+
([`f99b427`](https://github.com/KitwareMedical/trame-slicer/commit/f99b427ae21276199a65e29bf3a6afd510345663))
|
|
219
|
+
|
|
220
|
+
- **views**: Add view orientation marker / rulers
|
|
221
|
+
([`93dacc1`](https://github.com/KitwareMedical/trame-slicer/commit/93dacc1c5b232031418c4dc43d7db08531a97a56))
|
|
222
|
+
|
|
223
|
+
* Add helper function to activate orientation marker and ruler
|
|
224
|
+
|
|
225
|
+
- **views**: Add Volume Rendering
|
|
226
|
+
([`0b79e02`](https://github.com/KitwareMedical/trame-slicer/commit/0b79e029b52605bc0096db1d162eeb5eb76a68d5))
|
|
227
|
+
|
|
228
|
+
- **views**: Add Volume Rendering and 2D interaction refresh
|
|
229
|
+
([`b6cea3c`](https://github.com/KitwareMedical/trame-slicer/commit/b6cea3cc1537c3dc396768d1ca68963eda2c9442))
|
|
230
|
+
|
|
231
|
+
* Add strategy responsible for scheduled rendering * Add volume rendering in POC application * Add
|
|
232
|
+
default scheduled rendering to direct rendering in unit tests
|
|
233
|
+
|
|
234
|
+
- **views**: Add WebP RCA encoding
|
|
235
|
+
([`a90173b`](https://github.com/KitwareMedical/trame-slicer/commit/a90173b5cbcba2a8f7669d027d30a1c2e24050e9))
|
|
236
|
+
|
|
237
|
+
- **views**: Factorize trame-rca utils components
|
|
238
|
+
([`8a62d35`](https://github.com/KitwareMedical/trame-slicer/commit/8a62d35ef36c4e549972eef77c4b68ff1c2ceb00))
|
|
239
|
+
|
|
240
|
+
* Factorize RCA components to use trame-rca utils implementation
|
|
241
|
+
|
|
242
|
+
- **views**: First working version of layout display
|
|
243
|
+
([`de91828`](https://github.com/KitwareMedical/trame-slicer/commit/de91828aa2a91da41ad42155c298c833f53cdff7))
|
|
244
|
+
|
|
245
|
+
* Change expected layout dict to dict of layout * Add fit to view to abstract view * Add rotate view
|
|
246
|
+
to 3D view * Add option to fit to content when showing volume
|
|
247
|
+
|
|
248
|
+
- **views**: Improve rendering reactivity
|
|
249
|
+
([`44dd219`](https://github.com/KitwareMedical/trame-slicer/commit/44dd219b55b0a212ccf61af22db7b7460a0a3672))
|
|
250
|
+
|
|
251
|
+
* Improve rendering reactivity by implementing encoding and push as subprocesses
|
|
252
|
+
|
|
253
|
+
- **views**: Improve view creation and connectivity
|
|
254
|
+
([`9a07d6b`](https://github.com/KitwareMedical/trame-slicer/commit/9a07d6b358c8a2725256415847977d130b633c72))
|
|
255
|
+
|
|
256
|
+
* Add DisplayManager responsible for showing nodes depending on views * Update SlicerApp * Update
|
|
257
|
+
TrameApp to reflect changes * Add IOManager responsible for loading volumes / models and
|
|
258
|
+
segmentations * Add tests for loading DCM volume * Move test data to dedicated folder
|
|
259
|
+
|
|
260
|
+
- **views**: Make RCA overlay configurable
|
|
261
|
+
([`578e7c1`](https://github.com/KitwareMedical/trame-slicer/commit/578e7c1bde0d64a93be6d1c54b66364be3beb3e5))
|
|
262
|
+
|
|
263
|
+
* Allow injecting UI creation for the RCA views * Remove custom CSS for the vertical sliders * Add
|
|
264
|
+
helpers to configure Vuetify sliders and connect them to Slicer views
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Contributing to trame-slicer
|
|
2
|
+
|
|
3
|
+
1. Clone the repository using `git clone`
|
|
4
|
+
1. Install the dev dependencies via `pip install pre-commit`
|
|
5
|
+
1. Run `pre-commit install` to set up pre-commit hooks
|
|
6
|
+
1. Make changes to the code, and commit your changes to a separate branch
|
|
7
|
+
1. Create a fork of the repository on GitHub
|
|
8
|
+
1. Push your branch to your fork, and open a pull request
|
|
9
|
+
|
|
10
|
+
## Testing
|
|
11
|
+
|
|
12
|
+
The library testing rely on the trame-slicer test data. To setup your testing
|
|
13
|
+
environment :
|
|
14
|
+
|
|
15
|
+
1. Download the [trame-slicer-test-data]{.title-ref} zip file available in this
|
|
16
|
+
repository\'s release page
|
|
17
|
+
1. Unzip the file content to the [tests/data]{.title-ref} folder
|
|
18
|
+
1. Install the test requirements using pip using the
|
|
19
|
+
[tests/requirements.txt]{.title-ref} file
|
|
20
|
+
1. Run the tests using the pytest module `python -m pytest tests`
|
|
21
|
+
|
|
22
|
+
## Interactivity
|
|
23
|
+
|
|
24
|
+
Some tests allow for interactive interaction with the views and can be activated
|
|
25
|
+
by using the following arguments :
|
|
26
|
+
|
|
27
|
+
`python -m pytest tests --render_interactive=<interaction_time_limit_s>`
|
|
28
|
+
|
|
29
|
+
The interactivity time limit will apply to tests using a trame server in an
|
|
30
|
+
asyncio tasks. Interactivity for VTK render window logic will require manually
|
|
31
|
+
closing the windows to stop the interaction.
|
|
32
|
+
|
|
33
|
+
## Commit messages
|
|
34
|
+
|
|
35
|
+
trame-slicer follows trame\'s commit message convention to be compatible with
|
|
36
|
+
it\'s CI features including the auto semantic release.
|
|
37
|
+
|
|
38
|
+
## Tips
|
|
39
|
+
|
|
40
|
+
1. When first creating a new project, it is helpful to run
|
|
41
|
+
`pre-commit run --all-files` to ensure all files pass the pre-commit checks.
|
|
42
|
+
1. A quick way to fix `black` issues is by installing black
|
|
43
|
+
(`pip install black`) and running the `black` command at the root of your
|
|
44
|
+
repository.
|
|
45
|
+
1. Sometimes, `black` and `flake8` do not agree. Add options to your `.flake8`
|
|
46
|
+
file to fix these things. See the
|
|
47
|
+
[flake8 configuration docs](https://flake8.pycqa.org/en/latest/user/configuration.html)
|
|
48
|
+
for more details.
|
|
49
|
+
1. A quick way to fix `codespell` issues is by installing codespell
|
|
50
|
+
(`pip install codespell`) and running the `codespell -w` command at the root
|
|
51
|
+
of your directory.
|
|
52
|
+
1. The
|
|
53
|
+
[.codespellrc file](https://github.com/codespell-project/codespell#using-a-config-file)
|
|
54
|
+
can be used fix any other codespell issues, such as ignoring certain files,
|
|
55
|
+
directories, words, or regular expressions.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Apache Software License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, Kitware SAS
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|