Skip to content

Commit 36c3b17

Browse files
authored
Merge branch 'main' into sample-data-toggle
2 parents 056f190 + 052c8ba commit 36c3b17

148 files changed

Lines changed: 5011 additions & 2668 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: E2E Testing on ${{ matrix.os }}
1111
runs-on: ${{ matrix.os }}
1212
env:
13-
DOWNLOAD_TIMEOUT: 60000
13+
DOWNLOAD_TIMEOUT: 220000
1414
VITE_SHOW_SAMPLE_DATA: true
1515
steps:
1616
- uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ reports
3535

3636
.github/copilot
3737
CLAUDE.md
38+
.claude/

CONTRIBUTING.md

Lines changed: 63 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,87 @@
11
# Development
22

3-
Below lists a few commands for building and running a local copy of VolView.
3+
## Prerequisites
44

5-
To prepare your environment after cloning the repo, run:
5+
Before you begin, make sure your environment matches the following versions:
6+
7+
- **Node.js**: >= 18.20.0 (20.x LTS recommended)
8+
- **npm**: >= 9.x (npm 10+ works with Node 20)
9+
10+
Check your versions:
11+
12+
```bash
13+
node --version
14+
npm --version
15+
```
16+
17+
> **Tip:** Use `nvm` or `volta` to manage and switch Node.js versions.
618
19+
For reproducible installs, use:
20+
21+
```bash
22+
npm ci
723
```
24+
25+
26+
---
27+
28+
## Dependencies
29+
30+
Refer to `package.json` for the full list of dependencies and devDependencies.
31+
32+
---
33+
34+
## Setup
35+
36+
To prepare your environment after cloning the repo, run:
37+
38+
```bash
839
npm install
940
```
1041

42+
---
43+
1144
## Compiles and hot-reloads for development
1245

13-
```
46+
```bash
1447
npm run dev
1548
```
1649

50+
---
51+
1752
## Compiles and minifies for production
1853

19-
```
54+
```bash
2055
npm run build
2156
```
2257

58+
---
59+
2360
## Analyzing the production bundle
2461

25-
You can generate a production bundle and produce a bundle size breakdown report:
62+
Generate a production bundle and produce a bundle size breakdown report:
2663

27-
```
64+
```bash
2865
npm run build:analyze
2966
```
3067

68+
---
69+
3170
## Lints and fixes files
3271

33-
```
72+
```bash
3473
npm run lint
3574
```
3675

76+
---
77+
3778
## Testing
3879

39-
```
80+
```bash
4081
# unit tests
41-
npm run test:unit
82+
npm run test
4283

43-
# e2e tests
84+
# e2e tests (Chrome)
4485
npm run test:e2e:chrome
4586
```
4687

@@ -50,36 +91,38 @@ When adding a new baseline image and test, the image should be pulled from GitHu
5091

5192
#### Run one e2e spec file
5293

53-
```
94+
```bash
5495
npm run test:e2e:dev -- -- --spec ./tests/specs/remote-manifest.e2e.ts
5596
```
5697

98+
---
99+
57100
## Developing with VTK.js
58101

59102
Follow these steps to develop against a custom development branch of VTK.js:
60103

61104
1. Build and package VTK.js:
62105

63-
```sh
106+
```bash
64107
path/to/vtk-js > npm run build:esm
65108
```
66109

67110
2. Create a symbolic link to the VTK.js distribution folder on your local system:
68111

69-
```sh
70-
> cd path/to/vtk-js/dist/esm
71-
path/to/vtk-js/dist/esm > npm link
112+
```bash
113+
cd path/to/vtk-js/dist/esm
114+
npm link
72115
```
73116

74117
3. Reference the symbolic link in your local VolView build:
75118

76-
```sh
77-
> cd path/to/VolView
78-
path/to/VolView > npm link --no-save @kitware/vtk.js
119+
```bash
120+
cd path/to/VolView
121+
npm link --no-save @kitware/vtk.js
79122
```
80123

81124
4. Build and run VolView:
82125

83-
```sh
84-
path/to/VolView > npm run dev
126+
```bash
127+
npm run dev
85128
```

docs/authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ VolView itself does not specify any given authentication mechanism to use. How y
44

55
## VolView behind Login Portal
66

7-
The easiest approach to securing a VolView instance is to host VolView behind an authentication portal. This will secure access to VolView, and allow VolView to automatically use existing user credentials to request protected data. Often the credentials are stored in a cookie.
7+
The easiest approach to securing a VolView instance is to host VolView behind an authentication portal. This will secure access to VolView, and allow VolView to automatically use existing user credentials to request protected data. Often the credentials are stored in a cookie.
88

99
## OAuth Tokens via URL
1010

@@ -26,4 +26,4 @@ The token URL is expected to return the access token as plaintext, i.e. `text/pl
2626
By default, VolView will make a `GET` request to the token URL. If another type of request is needed, you can configure it via the `tokenUrlMethod` parameter. For example, to make a `POST` request: `https:/example.com/VolView/?tokenUrl=https://example.com/userToken&tokenUrlMethod=POST`.
2727

2828
> [!NOTE]
29-
> This requires CORS to be properly configured for the token URL endpoint. See the [CORS](/cors) documentation for more info.
29+
> This requires CORS to be properly configured for the token URL endpoint. See the [CORS](/cors) documentation for more info.

docs/configuration_file.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
By loading a JSON file, you can set VolView's configuration:
44

5-
- Starting view layout (Axial Only, 3D Primary, etc).
5+
- Starting view layout grid size
66
- Labels for tools
77
- Visibility of Sample Data section
88
- Keyboard shortcuts
99

1010
## Starting view layout
1111

12-
The `activeLayout` key has options (Axial Only, 3D Primary, etc.) defined in `config.ts`
12+
The `gridSize` key sets the initial layout grid as `[width, height]`. For example, `[2, 2]` creates a 2x2 grid of views.
1313

1414
```json
1515
{
1616
"layout": {
17-
"activeLayout": "Axial Only"
17+
"gridSize": [2, 2]
1818
}
1919
}
2020
```
@@ -98,7 +98,7 @@ To configure a key for an action, add its action name and the key(s) under the `
9898
}
9999
},
100100
"layout": {
101-
"activeLayout": "Axial Only"
101+
"gridSize": [1, 1]
102102
}
103103
}
104104
```
@@ -131,7 +131,7 @@ To configure a key for an action, add its action name and the key(s) under the `
131131
}
132132
},
133133
"layout": {
134-
"activeLayout": "Axial Only"
134+
"gridSize": [2, 2]
135135
},
136136
"dataBrowser": {
137137
"hideSampleData": false

docs/cors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ server {
2626

2727
## CORS proxy
2828

29-
If you do not control the data server, you can use a CORS proxy. A CORS proxy is a lightweight proxy server that is configured to attach CORS headers to responses originating from the data server.
29+
If you do not control the data server, you can use a CORS proxy. A CORS proxy is a lightweight proxy server that is configured to attach CORS headers to responses originating from the data server.

docs/deploying_volview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Deploying VolView is straightforward: just take the locally built files in `dist
55
As a local example, running `npx serve dist/` will spin up a static file server (running on <http://localhost:3000>) that reads the locally built files from `dist/`.
66

77
> [!NOTE]
8-
> Using `npx serve` is *not* a recommended way to deploy VolView. It is only used to demonstrate how easy it can be to deploy VolView in simple scenarios.
8+
> Using `npx serve` is _not_ a recommended way to deploy VolView. It is only used to demonstrate how easy it can be to deploy VolView in simple scenarios.
99
1010
## Managed Hosting (S3, GCP, etc.)
1111

@@ -17,7 +17,7 @@ Please refer to your desired server's documentation on how to serve static files
1717

1818
### Apache example config
1919

20-
In this apache2 example, the `dist/*` files are located under `/var/www/VolView`, and the domain is `example.com`. This does *not* configure TLS.
20+
In this apache2 example, the `dist/*` files are located under `/var/www/VolView`, and the domain is `example.com`. This does _not_ configure TLS.
2121

2222
```
2323
<VirtualHost *:80>
@@ -28,7 +28,7 @@ In this apache2 example, the `dist/*` files are located under `/var/www/VolView`
2828

2929
### Nginx example config
3030

31-
In this nginx example, the `dist/*` files are located under `/var/www/VolView`, and the domain is `example.com`. This does *not* configure TLS.
31+
In this nginx example, the `dist/*` files are located under `/var/www/VolView`, and the domain is `example.com`. This does _not_ configure TLS.
3232

3333
```
3434
server {
@@ -43,4 +43,4 @@ server {
4343
try_files $uri $uri/ /index.html;
4444
}
4545
}
46-
```
46+
```

docs/index.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,34 @@ VolView is an open source radiological viewer developed for clinical professiona
88

99
Major features of VolView include:
1010

11-
1. **Cinematic Volume Rendering**: Create beautiful renderings and gain new insights into your data with only a few clicks. VolView provides three cinematic volume rendering modes and intuitive controls for each. We've also provides simple ways to control lighting and multiple presets to get you started.
11+
1. **Cinematic Volume Rendering**: Create beautiful renderings and gain new insights into your data with only a few clicks. VolView provides three cinematic volume rendering modes and intuitive controls for each. We've also provides simple ways to control lighting and multiple presets to get you started.
1212

13-
2. **Drag-and-Drop DICOM**: Drag DICOM images onto VolView, and they will be quickly parsed and presented as thumbnails. Click on a thumbnail, and the data is quickly loaded and presented as 2D slices and a 3D cinematic volume rendering.
13+
2. **Drag-and-Drop DICOM**: Drag DICOM images onto VolView, and they will be quickly parsed and presented as thumbnails. Click on a thumbnail, and the data is quickly loaded and presented as 2D slices and a 3D cinematic volume rendering.
1414

15-
3. **Annotations and Measures**: We have provided a small set of tools for painting, measuring, and cropping, and we are actively working to expand that toolset. If you have suggestions for new tools or for improving VolView in general, please leave feedback at our [Issue Tracker](https://github.com/Kitware/VolView/issues).
15+
3. **Annotations and Measures**: We have provided a small set of tools for painting, measuring, and cropping, and we are actively working to expand that toolset. If you have suggestions for new tools or for improving VolView in general, please leave feedback at our [Issue Tracker](https://github.com/Kitware/VolView/issues).
1616

17-
4. **Simple, Scalable, and Secure**: Simply visit a website to install VolView. Once it is running, all data handling, processing, and visualization occurs on your machine. Data you load into VolView never leaves your machine. And VolView is designed to run on any web browser: from the one on your phone to the one running on your most powerful workstations. It will take advantage of local GPU resources to accelerate its rendering processes, but if none is available, it will still generate the same high quality renderings, albeit a bit slower.
17+
4. **Simple, Scalable, and Secure**: Simply visit a website to install VolView. Once it is running, all data handling, processing, and visualization occurs on your machine. Data you load into VolView never leaves your machine. And VolView is designed to run on any web browser: from the one on your phone to the one running on your most powerful workstations. It will take advantage of local GPU resources to accelerate its rendering processes, but if none is available, it will still generate the same high quality renderings, albeit a bit slower.
1818

19-
5. **Foundation for the Future**: VolView is meant to serve as a foundation for your future projects and products. It is open-source and free for commercial and academic use. You may modify it yourself, or Kitware can help you customize it to support client-server workflows, provide streamlined interfaces and tools, and carry your brand.
19+
5. **Foundation for the Future**: VolView is meant to serve as a foundation for your future projects and products. It is open-source and free for commercial and academic use. You may modify it yourself, or Kitware can help you customize it to support client-server workflows, provide streamlined interfaces and tools, and carry your brand.
2020

21-
VolView is **not FDA approved for any purpose**, but Kitware can work with you to create a custom version of VolView and submit it for FDA approval. For more information, contact [kitware@kitware.com](mailto:kitware@kitware.com).
21+
VolView is **not FDA approved for any purpose**, but Kitware can work with you to create a custom version of VolView and submit it for FDA approval. For more information, contact [kitware@kitware.com](mailto:kitware@kitware.com).
2222

2323
## History
2424

2525
VolView version 1.1 was released on Sept. 21, 1999 to provide clinical professionals with an intuitive interface to industry-leading volume rendering capabilities. Built using [VTK](https://vtk.org), it was extremely innovative at the time. It provided interactive volume renderings that did not require dedicated systems purchased for big-name medical device manufacturers. It supported Windows 95/98/NT, Sun, Silicon Graphics and Linux environments, and it provided custom level-of-detail and composite rendering techniques. That version of VolView thrived for over a decade, with the last release in June of 2011. In 2011, open source radiological viewers had become commonplace (many also built using VTK), and we pivoted our attention to 3D Slicer as an advance, community-support, extensible platform for research and clinical application development.
2626

27-
We have released VolView 4.0 in 2022 to again advance the radiological image visualization field. Built using the javascript version of VTK (i.e., [vtk.js](https://kitware.github.io/vtk-js/index.html)), VolView 4.0 runs in web browsers and provides cinematic volume rendering capabilities that are only broadly available in dedicated systems sold by big-name medical device manufacturers. We look forward to continuing to use the VolView platform for medical image visualization innovation, with plans to support WebXR for holographic and AR/VR devices as well as companion libraries for advance image analysis (e.g., [itk.wasm](https://github.com/InsightSoftwareConsortium/itk-wasm)) and AI algorithms (e.g., via [MONAI](https://monai.io)).
27+
We have released VolView 4.0 in 2022 to again advance the radiological image visualization field. Built using the javascript version of VTK (i.e., [vtk.js](https://kitware.github.io/vtk-js/index.html)), VolView 4.0 runs in web browsers and provides cinematic volume rendering capabilities that are only broadly available in dedicated systems sold by big-name medical device manufacturers. We look forward to continuing to use the VolView platform for medical image visualization innovation, with plans to support WebXR for holographic and AR/VR devices as well as companion libraries for advance image analysis (e.g., [itk.wasm](https://github.com/InsightSoftwareConsortium/itk-wasm)) and AI algorithms (e.g., via [MONAI](https://monai.io)).
2828

2929
## Roadmap
3030

3131
Details and progress on our roadmap are tracked in the VolView issue tracker on Github: https://github.com/Kitware/VolView/issues
3232

3333
Our next major release is planned for March, 2023, and it will support:
34-
* DICOM Web
35-
* DICOM SEG, RT, and SR reading and writing
36-
* ITK for image processing
37-
* Deep learning inference for image analysis
34+
35+
- DICOM Web
36+
- DICOM SEG, RT, and SR reading and writing
37+
- ITK for image processing
38+
- Deep learning inference for image analysis
3839

3940
## Citation
4041

@@ -50,14 +51,13 @@ This work was funded, in part, by the NIH via NIBIB and NIGMS R01EB021396, NIBIB
5051

5152
## Related Work
5253

53-
Learn about our related works at the following links:
54-
* Glance: General purpose scientific visualization in web browsers
55-
* https://kitware.github.io/glance/index.html
56-
* 3D Slicer: Desktop (C++ and Python), extensible radiological viewer
57-
* https://slicer.org
58-
* trame: Python framework for quickly creating web application involving server-side rendering and computation.
59-
* https://kitware.github.io/trame/index.html
60-
* itk.wasm: Web-assembly version of ITK for in-browser image segmentation and registration, with outstanding DICOM support.
61-
* https://github.com/InsightSoftwareConsortium/itk-wasm
62-
* vtk.js: A pure javascript library for advanced, interactive, scientific visualization in web browsers.
63-
* https://kitware.github.io/vtk-js/index.html
54+
- Glance: General purpose scientific visualization in web browsers
55+
- https://kitware.github.io/glance/index.html
56+
- 3D Slicer: Desktop (C++ and Python), extensible radiological viewer
57+
- https://slicer.org
58+
- trame: Python framework for quickly creating web application involving server-side rendering and computation.
59+
- https://kitware.github.io/trame/index.html
60+
- itk.wasm: Web-assembly version of ITK for in-browser image segmentation and registration, with outstanding DICOM support.
61+
- https://github.com/InsightSoftwareConsortium/itk-wasm
62+
- vtk.js: A pure javascript library for advanced, interactive, scientific visualization in web browsers.
63+
- https://kitware.github.io/vtk-js/index.html

docs/mouse_controls.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## Data management
44

5-
| Shortcut | Action |
6-
| -------- | --------------------- |
7-
| Ctrl + . | Delete Current Image |
8-
| Ctrl + / | Clear all data |
5+
| Shortcut | Action |
6+
| -------- | -------------------- |
7+
| Ctrl + . | Delete Current Image |
8+
| Ctrl + / | Clear all data |
99

1010
## Slice
1111

0 commit comments

Comments
 (0)