Skip to content

Commit 0cc85d6

Browse files
committed
docs: document sparse manifest state files
1 parent 925e41e commit 0cc85d6

File tree

3 files changed

+67
-6
lines changed

3 files changed

+67
-6
lines changed

docs/loading_data.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@ To layer images:
6767
1. Under the Rendering tab, an opacity slider changes the transparency of the upper layer.
6868

6969
![Add Layer](./assets/add-layer.jpg)
70+
71+
## State Files
72+
73+
Load preconfigured scenes with annotations, segment groups, and view settings via [state files](./state_files.md). State files can embed data (`*.volview.zip`) or reference remote data via URIs (`*.volview.json`).

docs/state_files.md

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,69 @@
11
# State Files
22

3-
VolView state files are a great way to save your scene and data to either be used later, or for distributing to collaborators and other users. These files store all of the information you need to restore the state of VolView: your data, annotations, camera positions, background colors, colormaps, multi-view layouts, and more.
3+
VolView state files save your scene configuration: annotations, camera positions, colormaps, layouts, and more. There are two formats:
44

5-
State files can be saved by clicking on "Disk" icon in the top of the toolbar. This button will generate a `*.volview.zip` file that can then be re-opened in VolView at any time.
5+
## Zip State Files (`*.volview.zip`)
66

7-
When saving VolView state, your data is saved along with the application state. This way, when you send a state file to a collaborator, they too can open the state file and load the previously saved data. However, this means that your state file will be as large as your dataset(s) and may contain patient identifying information. Please follow your institutes HIPAA, IRB and other regulatory and confidentiality requirements.
7+
Save by clicking the "Disk" icon in the toolbar. This embeds your image data that was loaded from local files alongside the application state. Useful for sharing annotations with collaborators.
88

9-
State files are loaded by clicking on the "Folder" icon immediately below the save-state Disk icon. This will bring up a file browser for you to select and load your state file.
9+
## Sparse Manifest Files (`*.volview.json`)
1010

11-
TIP: State files are a great way for developers to transfer data into / out of VolView for integration with other systems. For example, they can be used to integrate VolView with access control systems, to streamline workflows, or to ingest results from AI systems.
11+
JSON files that reference remote data via URIs instead of embedding it. Useful for:
12+
13+
- Linking to data hosted on servers
14+
- Sharing annotations without duplicating large datasets
15+
- Integrating with external systems (AI pipelines, access control, etc.)
16+
17+
Example manifest:
18+
19+
```json
20+
{
21+
"version": "6.2.0",
22+
"dataSources": [
23+
{ "id": 0, "type": "uri", "uri": "https://example.com/scan.zip" },
24+
{ "id": 1, "type": "uri", "uri": "https://example.com/segmentation.nii.gz" }
25+
],
26+
"segmentGroups": [
27+
{
28+
"id": "seg-1",
29+
"dataSourceId": 1,
30+
"metadata": {
31+
"name": "Tumor Segmentation",
32+
"parentImage": "0",
33+
"segments": {
34+
"order": [1],
35+
"byValue": {
36+
"1": { "value": 1, "name": "Tumor", "color": [255, 0, 0, 255] }
37+
}
38+
}
39+
}
40+
}
41+
],
42+
"tools": {
43+
"rectangles": {
44+
"tools": [
45+
{
46+
"imageID": "0",
47+
"frameOfReference": {
48+
"planeNormal": [0, 0, 1],
49+
"planeOrigin": [0, 0, 50]
50+
},
51+
"slice": 50,
52+
"firstPoint": [-20, -20, 50],
53+
"secondPoint": [20, 20, 50],
54+
"label": "lesion"
55+
}
56+
],
57+
"labels": {
58+
"lesion": { "color": "red" }
59+
}
60+
}
61+
}
62+
}
63+
```
64+
65+
## Loading State Files
66+
67+
- **Drag and drop** onto VolView
68+
- **File browser** via the "Folder" icon below the save button
69+
- **URL parameter**: `?urls=[https://example.com/session.volview.json]`

tests/specs/remote-manifest.e2e.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ describe('VolView loading of remoteManifest.json', () => {
2525
const fileName = 'remoteFilesRelativeURI.json';
2626
await writeManifestToFile(manifest, fileName);
2727
await openVolViewPage(fileName);
28-
await volViewPage.waitForViews();
2928
});
3029
});

0 commit comments

Comments
 (0)