diff --git a/documentation/content/doc/configuration_file.md b/documentation/content/doc/configuration_file.md new file mode 100644 index 000000000..af0e78a52 --- /dev/null +++ b/documentation/content/doc/configuration_file.md @@ -0,0 +1,141 @@ +# Configuration JSON File + +By loading a JSON file, you can set VolView's: + +- Starting view layout (Axial Only, 3D Primary, etc). +- Labels for tools +- Visibility of Sample Data section +- Keyboard shortcuts + +## Starting view layout + +The `activeLayout` key has options (Axial Only, 3D Primary, etc.) defined in `config.ts` + +```json +{ + "layout": { + "activeLayout": "Axial Only" + } +} +``` + +## 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. + +```json +{ + "labels": { + "defaultLabels": { + "lesion": { "color": "#ff0000" }, + "tumor": { "color": "green", "strokeWidth": 3 } + } + } +} +``` + +## Segment Group File Format + +The `segmentGroupSaveFormat` key specifies the file extension of the segment group images +VolView will include in the volview.zip file. + +```json +{ + "io": { + "segmentGroupSaveFormat": "nii" + } +} +``` + +These are the supported file formats: + +hdf5, iwi.cbor, mha, nii, nii.gz, nrrd, vtk + +## 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`. + +```json +{ + "shortcuts": { + "polygon": "Ctrl+p", + "showKeyboardShortcuts": "t" + } +} +``` + +## Visibility of Sample Data section + +Simplify the data browser by hiding the Sample Data expandable section. + +```json +{ + "dataBrowser": { + "hideSampleData": false + } +} +``` + +## 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", "strokeWidth": 3 }, + "innocuous": { "color": "white" } + }, + "rulerLabels": { + "big": { "color": "#ff0000" }, + "small": { "color": "white" } + }, + "rectangleLabels": { + "red": { "color": "#ff0000", "fillColor": "transparent" }, + "green": { "color": "green", "fillColor": "transparent" }, + "white-yellow-fill": { + "color": "white", + "fillColor": "#00ff0030" + } + }, + "polygonLabels": { + "poly1": { "color": "#ff0000" }, + "poly2Label": { "color": "green" } + } + }, + "layout": { + "activeLayout": "Axial Only" + }, + "dataBrowser": { + "hideSampleData": false + }, + "shortcuts": { + "polygon": "Ctrl+p", + "showKeyboardShortcuts": "t" + }, + "io": { + "segmentGroupSaveFormat": "nrrd" + } +} +``` diff --git a/documentation/content/doc/loading_data.md b/documentation/content/doc/loading_data.md index d0ef92498..04b368a13 100644 --- a/documentation/content/doc/loading_data.md +++ b/documentation/content/doc/loading_data.md @@ -56,92 +56,6 @@ page](https://github.com/Kitware/VolView/issues)! In order for VolView to download and display your remote datasets, your server must be configured with the correct [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) configuration. CORS is a browser security mechanism that restricts how web applications can access remote resources. Without proper CORS configuration, VolView will be unable to download and display your datasets. Configuring your web server with CORS is beyond the scope of this documentation; please refer to your server's documentation. -### Configuration JSON File - -By loading a JSON file, you can set VolView's: - -- Starting view layout (Axial Only, 3D Primary, etc). -- Labels for tools -- Visibility of Sample Data section -- Keyboard shortcuts - -#### 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", "strokeWidth": 3 }, - "innocuous": { "color": "white" } - }, - "rulerLabels": { - "big": { "color": "#ff0000" }, - "small": { "color": "white" } - }, - "rectangleLabels": { - "red": { "color": "#ff0000", "fillColor": "transparent" }, - "green": { "color": "green", "fillColor": "transparent" }, - "white-yellow-fill": { - "color": "white", - "fillColor": "#00ff0030" - } - }, - "polygonLabels": { - "poly1": { "color": "#ff0000" }, - "poly2Label": { "color": "green" } - } - }, - "layout": { - "activeLayout": "Axial Only" - }, - "dataBrowser": { - "hideSampleData": false - } - "shortcuts": { - "polygon": "Ctrl+p", - "showKeyboardShortcuts": "t" - } -} -``` - ## Layer Images To overlay images in the 2D views, there is a layer button on image thumbnails. A PET image could be layered on top of a CT image. The layered image is resampled to the base image using the image's spatial metadata. If the spatial metadata does not place the images in the same coordinate system, the layer alignment will be incorrect. diff --git a/documentation/content/doc/state_files.md b/documentation/content/doc/state_files.md index 7a9d8e8c6..ac78eaf44 100644 --- a/documentation/content/doc/state_files.md +++ b/documentation/content/doc/state_files.md @@ -2,7 +2,7 @@ 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, and more. -State files can be saved by clicking on "Disk" icon in the top of the toolbar. This button will generate a `*.volview` file that can then be re-opened in VolView at any time. +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. 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. diff --git a/documentation/tpl/__en__ b/documentation/tpl/__en__ index 9bf65bbeb..b41bdc4c0 100644 --- a/documentation/tpl/__en__ +++ b/documentation/tpl/__en__ @@ -29,4 +29,5 @@ sidebar: mouse_controls: Mouse/Keyboard Controls rendering: Cinematic Rendering state_files: State Files - server: Remote Server Capabilities \ No newline at end of file + server: Remote Server Capabilities + configuration_file: Configuration File diff --git a/documentation/tpl/__sidebar__ b/documentation/tpl/__sidebar__ index 56f52dfad..6ee3e3420 100644 --- a/documentation/tpl/__sidebar__ +++ b/documentation/tpl/__sidebar__ @@ -1,8 +1,8 @@ doc: - introduction: + introduction: what_is_volview: index.html quick_start_guide: quick_start_guide.html - details: + details: welcome_screen: welcome_screen.html loading_data: loading_data.html toolbar: toolbar.html @@ -10,3 +10,4 @@ doc: rendering: rendering.html state_files: state_files.html server: server.html + configuration_file: configuration_file.html