|
1 | 1 | # State Files |
2 | 2 |
|
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: |
4 | 4 |
|
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`) |
6 | 6 |
|
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. |
8 | 8 |
|
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`) |
10 | 10 |
|
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]` |
0 commit comments