Skip to content

Commit

Permalink
Merge branch 'main' into xr-looking-glass
Browse files Browse the repository at this point in the history
  • Loading branch information
tbirdso authored Oct 26, 2023
2 parents 1100945 + e664a17 commit fee51f7
Show file tree
Hide file tree
Showing 78 changed files with 1,873 additions and 729 deletions.
28 changes: 27 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,30 @@ npm run test:e2e:chrome

When running end-to-end tests, baseline images are saved to `tests/baseline`. Baseline diffs and actual snapshots are saved to `.tmp`.

When adding a new baseline image and test, the image should be pulled from GitHub Actions. Every test run will upload artifacts containing the snapshots taken, and those should be used when verifying and committing the baseline images.
When adding a new baseline image and test, the image should be pulled from GitHub Actions. Every test run will upload artifacts containing the snapshots taken, and those should be used when verifying and committing the baseline images.

## Developing with VTK.js

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

1. Build and package VTK.js:
```sh
path/to/vtk-js > npm run build:esm
```

2. Create a symbolic link to the VTK.js distribution folder on your local system:
```sh
> cd path/to/vtk-js/dist/esm
path/to/vtk-js/dist/esm > npm link
```

3. Reference the symbolic link in your local VolView build:
```sh
> cd path/to/VolView
path/to/VolView > npm link --no-save @kitware/vtk.js
```

4. Build and run VolView:
```sh
path/to/VolView > npm run dev
```
48 changes: 45 additions & 3 deletions documentation/content/doc/loading_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,56 @@ In order for VolView to download and display your remote datasets, your server m

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

- View layout (Axial Only, 3D Primary, etc).
- Starting view layout (Axial Only, 3D Primary, etc).
- Labels for tools
- Visibility of Sample Data section
- Keyboard shortcuts

Example JSON:
#### Starting view layout

The `activeLayout` key has options (Axial Only, 3D Primary, etc.) defined in `config.ts`

#### Labels for tools

Each tool type (Rectangle, Polygon, etc.) can have tool specific labels. To share labels
across tools, define the `defaultLabels` key and don't provide labels for a tool that
should use the default labels.

#### Visibility of Sample Data section

Simplify the data browser by hiding the Sample Data expandable section.

#### Keyboard Shortcuts

Configure the keys to activate tools, change selected labels, and more.
All [shortcut actions](https://github.com/Kitware/VolView/blob/main/src/constants.ts#L53) are under the `ACTIONS` variable.

To configure a key for an action, add its action name and the key(s) under the `shortcuts` section. For key combinations, use `+` like `Ctrl+f`.

#### Example JSON:

```json
{
"labels": {
"defaultLabels": {
"lesion": { "color": "#ff0000" },
"tumor": { "color": "green", "strokeWidth": 3 }
}
},
"layout": {
"activeLayout": "Axial Only"
}
}
```

#### All options:

```json
{
"labels": {
"defaultLabels": {
"lesion": { "color": "#ff0000" },
"tumor": { "color": "green" },
"tumor": { "color": "green", "strokeWidth": 3 },
"innocuous": { "color": "white" }
},
"rulerLabels": {
Expand All @@ -97,6 +135,10 @@ Example JSON:
"dataBrowser": {
"hideSampleData": false
}
"shortcuts": {
"polygon": "Ctrl+p",
"showKeyboardShortcuts": "t"
}
}
```

Expand Down
Loading

0 comments on commit fee51f7

Please sign in to comment.