Skip to content

The OHIF Config File

Introduction

From creating your own labels to controlling the hanging protocol, the ohif_config.json file is a powerful tool for customizing your Flywheel workflows. Additionally, you can also build your own blind reader study questions to display alongside images. Using the integrated viewer and study forms allows you to automatically capture responses to form questions alongside the images themselves.

This guide describes the configuration options in the ohif_config.json file.

exampleStudywithtimerandmeasurements.png

Viewer Settings

These settings configure the look and feel of the viewer including from hiding toolbar options, to creating custom labels for ROIS, and configuring keyboard shortcuts.

  • general settings: includes enabling timers, hiding measurements, and configuring how multiple contours interact.
  • toolbar: hide tools that do not apply to your workflow
  • labels: Add custom labels along with limits on how many times each label should be used
  • layouts: Configure the hanging protocol for the viewer
  • hotkeys: Configure keyboard shortcuts inside the viewer
  • mouseActions: Configure what mouse actions for inside the viewer

Instruction Steps

Build a Study Form

Create questions for readers to answer using the studyForm configurations. Learn more about studyForm options.

Applying the OHIF configurations

To apply these configurations to your project:

  1. Run the file through a linter such as the Online JSON linter to make sure you have valid JSON.
  2. Save the files as ohif_config.json.
  3. Go to the Information tab for your project, and upload it as an attachment

| | | --- | ohifconfig.png

General Settings

These are the top level of settings in the ohif_config.json file

Property Description Value Required
allowDraft Enable or Disable the draft feature in study form boolean no
automatedLabelling Automatically applies a label to a measurement. This setting is enable by default. Set to false to disable.

Automate labeling only applies in study form questions where both the requireMeasurements and the measurementTools are configured.
boolean no
contourUnique When set to true, contours/ROIs cannot overlap on the same slice boolean no
draftStudy boolean no
hideFreehandVertex Vertex points are not displayed on the image boolean no
hideMeasurementOutput Measurement output are not displayed on the image boolean no
hideMeasurements Hide measurements in the right panel
If studyForm and its components are not included and hideMeasurements: true, no study summary/form will be displayed but measurements will be
If studyForm and its components are not included and hideMeasurements: false , no study summary/form or measurements will be displayed
boolean no
hideROIOutput ROI area, mean, std dev are not displayed on the image boolean no
labels Custom labels for measurements in the OHIF Viewer

See the labels section for more details
Array of objects with the following properties:
label - The text displayed as a measurement option
value - The key to store measurement data under
limit - The number of allowed measurements using this label per study
boundary-Sets a boundary for the contour so that distinct features cannot overlap
no
layouts Define the hanging protocol for grid and asymmetric layout

See the layouts section for more details
object no
overlay Defines which DICOM tags to display on an image in the viewer

See the overlay section for more details
object no
resetTool Reset the active tool when loading a new study boolean no
studyForm Options for creating a study form

See the studyForm section for more details
object no
timerOn Run timer until reader moves to the next session. Total “read time” is captured and saved along with form input as metadata on the session boolean no
timerVisible Displays timer for the reader in the right panel boolean no
toolbar Configure available tools in the toolbar

See below for more details
object no
Example
{
  "draftStudy": true,
  "resetTool": false,
  "hideFreehandVertex": true,
  "hideROIOutput": true,
  "hideMeasurements": false,
  "timerOn": true,
  "timerVisible": true,
  "contourUnique": true,
  "automatedLabelling": true,
  "overlay": [],
  "labels": [],
  "studyForm": [],
  "hotkeys": [],
  "toolbar": []
}

Toolbar

The toolbar section allows the tool set to be trimmed down by category. Below is the default toolbar:

OHIFDefaultToolbar.png

Table 2. The viewer toolbar

Tool Description Default hotkey or keyboard shortcut
Series View series in the left menu none
Nav Navigate to a different session from the same subject. This allows you to view multiple sessions at the same time. none
Layout Add additional viewports and select their position none
Stack Scroll Navigates quickly on the stack of images by dragging up and down inside the viewport s
Zoom Zoom or Magnify the region of the image under the pointer z or m
Levels Changes the window width or window center by swiping horizontally or vertically. none
Invert Inverts the colors of the image in the active viewport i
Pan Allows navigating on the image by dragging p
ROI
Manual Rotate Rotates the image in the active viewport None
Ellipse Draws an ellipse with measurements and allows you to choose a label None
Rectangle Draws a rectangle with measurements and allows you to choose a label None
ROI Window Sets the window width/length of the viewport as the average value in the rectangular region None
Freehand Draws freehand region None
Open Freehand Draws an open-ended freehand annotation None
Sculpt Adjust a freehand ROI or open-freehand ROI None
Eraser Erases a selected measurement None
Clear Clears all current measurements None
Measure
Length Calculates the length between two points. Metadata about the results appear in the measurements panel. None
Bidirectional Draws two perpendicular lines with width and length. Metadata about the results appear in the measurements panel. None
Freehand Draws a freehand region.

Metadata about the results appear in the measurements panel
None
Angle Determines the smallest angle between three points.

Metadata about the results appear in the measurements panel
a
Orient
Manual rotate Rotates the image in the active viewport None
Rotate right Rotates the image 90 degrees r (rotate right)

l (rotate left)
Flip H Flips the image in the active viewport horizontally h
Flip V Flips the image in the active viewport vertically v
 
Annotate Adds an arrow with custom text as annotation

Metadata about the results appear in the measurements panel
None
CINE Shows playback dialog with finer controls for playing sequences None
Probe Determines the numeric image value under the cursor None
Colormap Colormap: Choose an image colormap None
Segmentation Loads segmentation overlays on to active NIFTI or DICOM viewports. None
Link Synchronizes different viewports on scroll, levels, or zoom

Select a layout with more than one viewport to see this option
None
Crosshairs Sync different slices of the same data None
2DMPR Switch to 2D MPR viewer d
Reset Resets all modifications made to the current images viewport None
Measurements Displays any annotations, ROIs, or measurements along with more information on who added it and when. This is also where a study form appears if configured None
Tags Displays all DICOM tags and values for the image– including private DICOM tags. Flywheel looks up tags in a dictionary, if there is no match found, the viewer displays the offset for the label None

Each category can have an only or except array that allows or restricts available tools in that category.

Below shows an example of all of the tools you can hide in the toolbar along with how to hide them using the config :

ToolbarHideTools.png

Example
"toolbar": {
    "Zoom": {
      "except": [
"Zoom",
"Magnify"
      ]
    },
    "Measure": {
      "except": [
        "Length",
        "Bidirectional",
        "Angle"
      ]
    },
    "ROI": {
      "except": [
        "Ellipse",
        "Rectangle",
        "ROI Window",
        "Freehand",
        "Open Freehand",
        "Sculpt",
        "Eraser",
        "Clear"
      ]
    },
    "Segmentation": {
      "except": [
        "Segmentation"
      ]
    },
    "Reset": {
      "except": [
        "Reset"
      ]
    },
    "Annotate": {
      "except": [
        "Annotate"
      ]
    },
    "CINE": {
      "except": [
        "CINE"
      ]
    },
    "Protocols": {
      "except": [
        "Protocols"
      ]
    },
    "Download": {
      "except": [
        "Download"
      ]
    },
    "2D MPR": {
      "except": [
        "2D MPR"
      ]
    },
    "Help": {
      "except": [
        "Help"
      ]
    },
    "Link": {
      "except": [
        "Scroll",
        "Levels",
        "Zoom"
      ]
    },
    "Crosshairs": {
      "except": [
        "Crosshairs"
      ]
    }
  }

Overlay: Display Scan Information on the Image

The overlay allows you to configure what type of data is displayed over an image in the viewer. This allows the reader to easily find relevant information about the scan like like acquisition date or patient age .

Below is an example of the default overlay:

Example
{
  "overlay": {
    "color": "lime",
    "topLeft": [
      "Image Size: {rows:required} × {columns:required}",
      "WL: {windowCenter:required} WW{windowWidth:required}",
      "X: {imageX}px Y: {imageY}px | Value:{modalityPixelValue:required} HU",
      "Thickness: {sliceThickness:required} mm Location {sliceLocation:required} mm"
    ],
    "topRight": [
      "{patientId}",
      "{patientName}",
      "{studyDescription}",
      "{seriesDescription}"
    ],
    "bottomRight": [
      "{echoTime:required}:{repetitionTime:required}",
      "{magneticFieldStrength:required}",
      "{acquisitionDate} {acquisitionTime}",
      "{protocolName}"
    ],
    "bottomLeft": [
      "Zoom: {zoomPercentage:required}%",
      "Im: {imageIndex:required}/{stackSize:required}
      Series: {seriesNumber:required}"
    ]
  }
}

The overlay is divided into 4 parts that determine where the text appears: "topLeft", "topRight", "bottomRight", and "bottomLeft".

defaultOverlayhighlight.png

Property Description Example
color Choose the color of the text on the overlay "color": "<color>"

The following formats are supported:
Known Colors "color" : "red"
RGB "color" : "rgb (255,255,255)"
RGBA "color" : "rgba (102,175,233,0.6)"
HSL "color" : "hsl (240, 100%, 75%)"
HSLA "color" : "hsla (240, 25%, 25%, .5)"
Hexadecimal "color" : "#333" or "color" : "#3D5E7F"
DICOM keyword Displays the value for the specified DICOM tag "{dicomKeyword}"

You can also indicate that a tag is required by entering "{dicomKeyword:required}". For example "{patientName:required}".

If the DICOM file does not have the required tag, it will not display in the overlay. With multiple tags marked required in a given line, all must be present in the image for the line to be displayed in the overlay.
text add any descriptive text to your custom overlay by entering the string in your config file. "Series: {seriesNumber:required}" or "Subject's UID: {patientId}"

To remove all overlay text, upload an ohif_config.json with a blank overlay section as shown below:

Example
{
  "overlay": {
    "topLeft": [],
    "topRight": [],
    "bottomRight": [],
    "bottomLeft": []
  }
}

NoOverlayExample.png

Overlay Text

Property Description Type
required If it is specified in the string then it will display in the overlay if it has a value. string
rows Original image height number
columns Original image width number
windowCenter The center of range number
windowWidth The range of the CT Image's number number
imageX The current x position of an image number
imageY The current y position of an image number
modalityPixelValue The stored pixel value of the pixels in the sampling rectangle number
sliceThickness Nominal slice thickness in millimeters (mm) number
sliceLocation Relative position of the image plane in millimeters (mm) number
bitsAllocated Number of bits allocated for each pixel sample number
acquisitionDate The date the acquisition of the data that resulted in this image started string
acquisitionTime The time the acquisition of data that resulted in this image started string
protocolName User-defined description of the conditions under which the Series was performed string
magneticFieldStrength Nominal field strength of the MR Magnet in teslas (T) number
repetitionTime The period between the beginning of a pulse sequence and the beginning of the succeeding (essentially identical) pulse sequence in milliseconds (ms) number
echoTime Time between the middle of the excitation pulse and the peak of the echo produced in milliseconds (ms) number
zoomPercentage scale * 100 string
imageIndex An index identifying the position of this image within a PET series number
stackSize Size of the stack number
seriesNumber A number that identifies the Series number
modality Type of equipment that originally acquired the data used to create the images in the Series string
seriesInstanceUID Unique identifier of the Series containing the referenced Instances string
seriesDescription Description of the Series string
studyInstanceUID Unique identifier of the Study containing the referenced Instances string
seriesDate Date the Series started date
seriesTime Time the Series started time
patientAge Age of the Patient string
patientSize Length (height) of the Patient in meters number
patientWeight Weight of the patient in kilograms
frameOfReferenceUID Uniquely identifies the Frame of Reference for a Series string
imageOrientationPatient Specifies the direction cosines of the first row and the first column with respect to the patient number
imagePositionPatient Patient position descriptor relative to the equipment string
pixelSpacing Physical distance in the patient between the center of each pixel in millimeters (mm)
Specified by a numeric pair - adjacent row spacing [delimiter] adjacent column spacing
number
rowPixelSpacing The spacing between the centers of adjacent rows (vertical spacing) in millimeters (mm) number
columnPixelSpacing The spacing between the centers of adjacent columns (horizontal spacing) in millimeters (mm) number
samplesPerPixel Number of samples (planes) in this image number
photometricInterpretation Specifies the intended interpretation of the pixel data string
bitsStored Number of bits stored for each pixel sample number
highBit Most significant bit for pixel sampling data number
pixelRepresentation Data representation of the pixel samples number
planarConfiguration Indicates whether the pixel data are encoded color-by-plane or color-by-pixel number
pixelAspectRatio Ratio of the vertical size and horizontal size of the pixels in the image specified by a pair of integer values where the first value is the vertical pixel size and the second value is the horizontal pixel size number
smallestPixelValue The minimum actual pixel value encountered in this image number
largestPixelValue The maximum actual pixel value encountered in this image number
redPaletteColorLookupTableDescriptor Specifies the format of the Red Palette Color Lookup Table Data (0028,1201) number
greenPaletteColorLookupTableDescriptor Specifies the format of the Green Palette Color Lookup Table Data (0028,1202) number
bluePaletteColorLookupTableDescriptor Specifies the format of the Blue Palette Color Lookup Table Data (0028,1203) number
redPaletteColorLookupTableData Red Palette Color Lookup Table Data string
greenPaletteColorLookupTableData Green Palette Color Lookup Table Data string
bluePaletteColorLookupTableData Blue Palette Color Lookup Table Data string
rescaleIntercept The value b in relationship between stored values (SV) and the output units number
rescaleSlope m in the equation specified in Rescale Intercept (0028,1052) number
rescaleType Specifies the output units of Rescale Slope (0028,1053) and Rescale Intercept (0028,1052) string
sopClassUID Uniquely identifies the SOP Class string
sopInstanceUID Uniquely identifies the SOP Instance (See Section C.12.1.1.1 for further explanation) string
overlays Indicates whether this overlay represents a region of interest or other graphics string
patientName Patient's full name string
patientId Primary identifier for the patient string
instanceNumber A number that identifies the image string
lossyImageCompression Specifies whether an image has undergone lossy compression at a point in its lifetime string
lossyImageCompressionRatio Describes the approximate lossy compression ratio(s) that have been applied to this image number
lossyImageCompressionMethod A label for the lossy compression method(s) that have been applied to this image string
studyDescription Institution-generated description or classification of the Study (component) string
studyDate Date the study started date
studyTime Time the study started time
accessionNumber A RIS-generated number that identifies the order for the study string
frameTime Nominal time per individual frame in milliseconds (ms) number
laterality Laterality of (paired) body part examined string
scale Image scaling refers to the resizing of a digital image number
frameRate Rate at which the frames of a multi-frame image should be displayed in frames/second (1000/frameTime) string
compression Compression, in general, aims to reduce file size, with or without decreasing data quality of the original file string
wwwc W: L: windowLevel with decimal precision 2 string
imageDimensions The length and width of the digital image string
pixelValue The stored pixel value of the pixels in the sampling rectangle number
rotation Viewport rotation in degrees number

Labels

Create custom labels and configure how they interact with other labels

Property Description Value
label What appears to the reader as the label as well as how to reference the label string
value The key to store measurement as metadata string
limit The number of allowed measurements using this label per study number
boundary Sets a boundary for the contour so that distinct features cannot overlap See below for more details

Boundary

  • label: the label that should be used as a boundary
  • direction: which direction the boundary applies.
  • Options for open contours are:
    • up/down
    • left/right
  • Options for closed contours are:
    • Inward: label with boundary definition (alpha) needs to be fully encompassed in the other label noted (beta) Example: If beta was the rib cage and alpha was the heart, the heart is contained inside the chest cavity
    • Outward: label with boundary definition (alpha) can not be encompassed in the other label noted (beta) // aka anywhere else in the image Example: If beta was the liver and alpha was the kidney, they are two separate organs that can't be inside one another
Example labels with boundaries:
{
  "zoomLevel": {
    "minimum": 0.25,
    "maximum": 20
  },
  "contourUnique": true,
  "labels": [
    {
      "label": "Bruch's Membrane",
      "value": "BM",
      "limit": 1
    },
    {
      "label": "Supraspinatus - anteroposterior",
      "value": "SAP",
      "limit": 1,
          "boundary":  [{"label": "Bruch's Membrane", "direction": "inward"}]
    },
    {
      "label": "Supraspinatus - mediolateral",
      "value": "SML",
      "limit": 2,
          "boundary":  [{"label": "SAP", "direction": "outward"}]
    },
    {
      "label": "Retinal Pigment Epithelium",
      "value": "RPE",
      "limit": 1
    },
    {
      "label": "Photoreceptor Layers",
      "value": "PR",
      "limit": 1,
      "boundary": [
        {
          "label": "Retinal Pigment Epithelium",
          "direction": "inward"
        }
      ]
    },
    {
      "label": "External Limiting Membrane",
      "value": "ELM",
      "limit": 1,
      "boundary": [
        {
          "label": "PR",
          "direction": "up/down"
        }
      ]
    },
    {
      "label": "Ellipsoid Zone",
      "value": "EZ",
      "limit": 1,
          "boundary":  [{"label": "Retinal Pigment Epithelium", "direction": "left/right"}]
    },
    {
      "label": "Outer Plexiform Layer - Henle Fiber Layer",
      "value": "OPL-HFL",
      "limit": 1
    },
    {
      "label": "Inner Limiting Membrane",
      "value": "ILM",
      "limit": 1
    },
    {
      "label": "Intraretinal Fluid",
      "value": "IRF",
      "limit": 1
    },
    {
      "label": "Subretinal Fluid",
      "value": "SRF",
      "limit": 1
    },
    {
      "label": "Subretinal Hyperreflective Material",
      "value": "SHRM",
      "limit": 1
    },
    {
      "label": "Pigmented Epithelium Detachment - Fibrovascular",
      "value": "PED-F",
      "limit": 1
    },
    {
      "label": "Pigmented Epithelium Detachment - Serous",
      "value": "PED-S",
      "limit": 1
    },
    {
      "label": "Pigmented Epithelium Detachment - Drusenoid",
      "value": "PED-D",
      "limit": 1
    }
  ],
  "hotkeys": [
    {
      "commandName": "incrementActiveViewport",
      "label": "Next Viewport",
      "keys": [
        "right"
      ]
    },
    {
      "commandName": "decrementActiveViewport",
      "label": "Previous Viewport",
      "keys": [
        "left"
      ]
    },
    {
      "commandName": "rotateViewportCW",
      "label": "Rotate Right",
      "keys": [
        "r"
      ]
    },
    {
      "commandName": "rotateViewportCCW",
      "label": "Rotate Left",
      "keys": [
        "l"
      ]
    },
    {
      "commandName": "invertViewport",
      "label": "Invert",
      "keys": [
        "i"
      ]
    },
    {
      "commandName": "flipViewportVertical",
      "label": "Flip Horizontally",
      "keys": [
        "h"
      ]
    },
    {
      "commandName": "flipViewportHorizontal",
      "label": "Flip Vertically",
      "keys": [
        "v"
      ]
    },
    {
      "commandName": "scaleUpViewport",
      "label": "Zoom In",
      "keys": [
        "+"
      ]
    },
    {
      "commandName": "scaleDownViewport",
      "label": "Zoom Out",
      "keys": [
        "-"
      ]
    },
    {
      "commandName": "fitViewportToWindow",
      "label": "Zoom to Fit",
      "keys": [
        "="
      ]
    },
    {
      "commandName": "resetViewport",
      "label": "Reset",
      "keys": [
        "space"
      ]
    },
    {
      "commandName": "nextImage",
      "label": "Next Image",
      "keys": [
        "down"
      ]
    },
    {
      "commandName": "previousImage",
      "label": "Previous Image",
      "keys": [
        "up"
      ]
    },
    {
      "commandName": "previousViewportDisplaySet",
      "label": "Previous Series",
      "keys": [
        "pagedown"
      ]
    },
    {
      "commandName": "nextViewportDisplaySet",
      "label": "Next Series",
      "keys": [
        "pageup"
      ]
    },
    {
      "commandName": "deleteMeasurement",
      "label": "Delete Measurement",
      "keys": [
        "backspace",
        "del"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Zoom"
      },
      "label": "Zoom",
      "keys": [
        "z"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Wwwc"
      },
      "label": "Wwwc",
      "keys": [
        "w",
        "esc"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Magnify"
      },
      "label": "Magnify",
      "keys": [
        "m"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Pan"
      },
      "label": "Pan",
      "keys": [
        "p"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "StackScroll"
      },
      "label": "Stack Scroll",
      "keys": [
        "s"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Angle"
      },
      "label": "Angle",
      "keys": [
        "a"
      ]
    },
    {
      "commandName": "prevMeasureTool",
      "label": "Previous Measurement Tool",
      "keys": [
        "["
      ]
    },
    {
      "commandName": "nextMeasureTool",
      "label": "Next Measurement Tool",
      "keys": [
        "]"
      ]
    },
    {
      "commandName": "firstImage",
      "label": "First Image",
      "keys": [
        "home"
      ]
    },
    {
      "commandName": "lastImage",
      "label": "Last Image",
      "keys": [
        "end"
      ]
    },
    {
      "commandName": "nextTemporalSeries",
      "label": "Next Time",
      "keys": [
        "."
      ]
    },
    {
      "commandName": "previousTemporalSeries",
      "label": "Previous Time",
      "keys": [
        ","
      ]
    },
    {
      "commandName": "setFullDynamicWWWC",
      "label": "Full Dynamic W/L",
      "keys": [
        "0"
      ]
    },
    {
      "commandName": "windowLevelPreset1",
      "label": "W/L Preset 1",
      "keys": [
        "1"
      ]
    },
    {
      "commandName": "windowLevelPreset2",
      "label": "W/L Preset 2",
      "keys": [
        "2"
      ]
    },
    {
      "commandName": "windowLevelPreset3",
      "label": "W/L Preset 3",
      "keys": [
        "3"
      ]
    },
    {
      "commandName": "windowLevelPreset4",
      "label": "W/L Preset 4",
      "keys": [
        "4"
      ]
    },
    {
      "commandName": "windowLevelPreset5",
      "label": "W/L Preset 5",
      "keys": [
        "5"
      ]
    },
    {
      "commandName": "windowLevelPreset6",
      "label": "W/L Preset 6",
      "keys": [
        "6"
      ]
    },
    {
      "commandName": "windowLevelPreset7",
      "label": "W/L Preset 7",
      "keys": [
        "7"
      ]
    },
    {
      "commandName": "windowLevelPreset8",
      "label": "W/L Preset 8",
      "keys": [
        "8"
      ]
    },
    {
      "commandName": "windowLevelPreset9",
      "label": "W/L Preset 9",
      "keys": [
        "9"
      ]
    },
    {
      "commandName": "mpr2d",
      "label": "2D MPR",
      "keys": [
        "d"
      ]
    }
  ],
  "mouseActions": [
    {
      "toolName": "Rotate",
      "button": "middle"
    },
    {
      "toolName": "StackScroll",
      "button": "right"
    },
    {
      "toolName": "Crosshair",
      "button": "left"
    },
    {
      "toolName": "ZoomMouseWheel",
      "button": "wheel"
    }
  ]
}

Layouts

Specify different hanging protocols and configure the following settings for what images appear as well as how they are displayed.

Property Description Value Required
name Any name for layout string yes
selector Define tags and values for finding matching protocol for a study/series metadata tag - DICOM tags or property name
match** - matching regular expression
yes
type Define the type of layout grid - Grid type layout(Default)
asymmetric** - Asymmetric type layout
no
position Position of the viewport x - Horizontal position value in range 0 -1
y** - Vertical position value in range 0 -1
yes
size Size of the viewport width - Horizontal size value in range 0 -1
height** - Vertical size value in range 0 -1
yes
type Type of the viewport 2D - 2D DICOM image viewport(Default)
2D MPR - Multi-Planar-Reconstructed viewport with 2D display
*
3D** - 3D volume display(Not supported now)
no
orientation Orientation for 2D MPR viewport axial - Axial MPR view
sagittal - Sagittal MPR view
coronal - Coronal MPR view
Specify an array with 6 numbers specifying the slice normal and view up direction coordinate values
yes
SeriesDescription Find the matching series description string
You can also use REGEX pattern matching.
yes
showFov 2D MPR viewport to show the ETDRS indicators if configured true (Only applicable to 2D MPR viewport)   no
fovDiameters  To specify the diameter of the FOV circles where the values should be in physical units (mm). This will be only applicable when "showFov" is configured as true   no
hideFovGrid To hide the FOV circles and display only the FOV center icon in the FOV indicators   no

Grid

For defining the Grid layout, we have to define the viewports as an array of array where the outer array defines the row count and inner array defines the column count. Below is a sample 1x2 (1 Row, 2 Columns) format

Example
{
  "layouts": [
    {
      "name": "MR",
      "selector": {
        "tag": "00080060",
        "match": "^MR$"
      },
      "viewports": [
        [
          {
            "tag": "0008103E",
            "match": "^3D_PD.*"
          },
          {
            "tag": "0008103E",
            "match": "^3D_T2FS.*"
          }
        ]
      ]
    }]
}

Asymmetrical

For defining the asymmetric layout, we have to define the viewports as an array by providing the position and size of each viewport. The asymmetric format type is an extended viewport definition where we can specify the type of viewport(2D and 2D MPR) and the orientation for 2D MPR type. The Grid layout can also be achieved by using this asymmetric format by providing proper position and size values. Below is some of the sample asymmetric layout format:

Grid Layout with Asymmetric Layout Type

Example
{
  "layouts": [
    {
      "name": "MR",
      "selector": {
        "tag": "00080060", 
        "match": "^.*"
      },
      "type": "asymmetric",
      "viewports": [
          {
                  "position": {"x": 0, "y": 0},
                  "size": {"width": 0.333, "height": 1},
                  "type": "2D MPR",
                  "orientation": "axial",
                  "SeriesDescription": "^.*"
          },
          {
                  "position": {"x": 0.333, "y": 0},
                  "size": {"width": 0.334, "height": 1},
                  "type": "2D MPR",
                  "orientation": "sagittal",
                  "SeriesDescription": "^.*"
          },
          {
                  "position": {"x": 0.667, "y": 0},
                  "size": {"width": 0.333, "height": 1},
                  "type": "2D",
                  "SeriesDescription": "^.*"
          }
        ]
    }]
}

Asymmetric Layout with Different Viewport Dimension

{
  "layouts": [
    {
      "name": "Modality",
      "selector": {
        "tag": "00080060", 
        "match": "^.*"
      },
      "type": "asymmetric",
      "viewports": [
          {
                  "position": {"x": 0, "y": 0},
                  "size": {"width": 0.75, "height": 1},
                  "type": "2D",
                  "SeriesDescription": "^.*"
          },
          {
                  "position": {"x": 0.75, "y": 0},
                  "size": {"width": 0.25, "height": 0.5},
                  "type": "2D MPR",
                  "orientation": "sagittal",
                  "SeriesDescription": "^.*"
          },
          {
                  "position": {"x": 0.75, "y": 0.5},
                  "size": {"width": 0.25, "height": 0.5},
                  "type": "2D MPR",
                  "orientation": "coronal",
                  "SeriesDescription": "^.*"
          }
      ]
    }
]
}

Asymmetric Layout with Different Viewport Dimension and ETDRS Field of View Grid Defined

Of note, ETDRS stands for Early Treatment for Diabetic Retinopathy Study, and is an anatomic framework for reviewing pathologic findings on OCT/Ophthalmology data. The user is able to identify the foveal center using the central crosshair and then utilize the predefined rings (1mm, 3mm, and 6mm) to review pathologies and their potential impacts on vision based on their proximity to the foveal center.

Example
{
    "layouts": [
        {
            "name": "Modality",
            "selector": {
                "tag": "00080060",
                "match": "^.\*"
            },
            "type": "asymmetric",
            "viewports": [
                {
                    "position": {
                        "x": 0,
                        "y": 0
                    },
                    "size": {
                        "width": 0.75,
                        "height": 1
                    },
                    "type": "2D",
                    "SeriesDescription": "^.\*"
                },
                {
                    "position": {
                        "x": 0.75,
                        "y": 0
                    },
                    "size": {
                        "width": 0.25,
                        "height": 0.5
                    },
                    "type": "2D MPR",
                    "orientation": "sagittal",
                    "SeriesDescription": "^.\*"
                },
                {
                    "position": {
                        "x": 0.75,
                        "y": 0.5
                    },
                    "size": {
                        "width": 0.25,
                        "height": 0.5
                    },
                    "type": "2D MPR",
                    "orientation": "coronal",
                    "SeriesDescription": "^.\*",
                    "showFov": true,
                    "fovDiameters": [
                        1,
                        3,
                        6
                    ],
                    "hideFovGrid": false
                }
            ]
        }
    ]
}

Keyboard Shortcuts and Mouse Actions

To better fit your readers' workflows, configure keyboard shortcuts (also known as hotkeys) and mouse actions within the viewer.

HotKeys

Property Description Value
commandName Describe the action string
label label the shortcut string
keys Key for the action The key used for the shortcut
Example
{
"hotkeys": [
    {
      "commandName": "incrementActiveViewport",
      "label": "Next Viewport",
      "keys": [
        "right"
      ]
    },
    {
      "commandName": "decrementActiveViewport",
      "label": "Previous Viewport",
      "keys": [
        "left"
      ]
    },
    {
      "commandName": "rotateViewportCW",
      "label": "Rotate Right",
      "keys": [
        "r"
      ]
    },
    {
      "commandName": "rotateViewportCCW",
      "label": "Rotate Left",
      "keys": [
        "l"
      ]
    },
    {
      "commandName": "invertViewport",
      "label": "Invert",
      "keys": [
        "i"
      ]
    },
    {
      "commandName": "flipViewportHorizontal",
      "label": "Flip Horizontally",
      "keys": [
        "h"
      ]
    },
    {
      "commandName": "flipViewportVertical",
      "label": "Flip Vertically",
      "keys": [
        "v"
      ]
    },
    {
      "commandName": "scaleUpViewport",
      "label": "Zoom In",
      "keys": [
        "+"
      ]
    },
    {
      "commandName": "scaleDownViewport",
      "label": "Zoom Out",
      "keys": [
        "-"
      ]
    },
    {
      "commandName": "fitViewportToWindow",
      "label": "Zoom to Fit",
      "keys": [
        "="
      ]
    },
    {
      "commandName": "resetViewport",
      "label": "Reset",
      "keys": [
        "space"
      ]
    },
    {
      "commandName": "nextImage",
      "label": "Next Image",
      "keys": [
        "down"
      ]
    },
    {
      "commandName": "previousImage",
      "label": "Previous Image",
      "keys": [
        "up"
      ]
    },
    {
      "commandName": "previousViewportDisplaySet",
      "label": "Previous Series",
      "keys": [
        "pagedown"
      ]
    },
    {
      "commandName": "nextViewportDisplaySet",
      "label": "Next Series",
      "keys": [
        "pageup"
      ]
    },
    {
      "commandName": "deleteMeasurement",
      "label": "Delete Measurement",
      "keys": [
        "backspace",
        "del"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Zoom"
      },
      "label": "Zoom",
      "keys": [
        "z"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Wwwc"
      },
      "label": "Wwwc",
      "keys": [
        "w",
        "esc"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Magnify"
      },
      "label": "Magnify",
      "keys": [
        "m"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Pan"
      },
      "label": "Pan",
      "keys": [
        "p"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "StackScroll"
      },
      "label": "Stack Scroll",
      "keys": [
        "s"
      ]
    },
    {
      "commandName": "setActiveToolHotkey",
      "commandOptions": {
        "toolName": "Angle"
      },
      "label": "Angle",
      "keys": [
        "a"
      ]
    },
    {
      "commandName": "prevMeasureTool",
      "label": "Previous Measurement Tool",
      "keys": [
        "["
      ]
    },
    {
      "commandName": "nextMeasureTool",
      "label": "Next Measurement Tool",
      "keys": [
        "]"
      ]
    },
    {
      "commandName": "firstImage",
      "label": "First Image",
      "keys": [
        "home"
      ]
    },
    {
      "commandName": "lastImage",
      "label": "Last Image",
      "keys": [
        "end"
      ]
    },
    {
      "commandName": "nextTemporalSeries",
      "label": "Next Time",
      "keys": [
        "."
      ]
    },
    {
      "commandName": "previousTemporalSeries",
      "label": "Previous Time",
      "keys": [
        ","
      ]
    },
    {
      "commandName": "setFullDynamicWWWC",
      "label": "Full Dynamic W/L",
      "keys": [
        "0"
      ]
    },
    {
      "commandName": "windowLevelPreset1",
      "label": "W/L Preset 1",
      "keys": [
        "1"
      ]
    },
    {
      "commandName": "windowLevelPreset2",
      "label": "W/L Preset 2",
      "keys": [
        "2"
      ]
    },
    {
      "commandName": "windowLevelPreset3",
      "label": "W/L Preset 3",
      "keys": [
        "3"
      ]
    },
    {
      "commandName": "windowLevelPreset4",
      "label": "W/L Preset 4",
      "keys": [
        "4"
      ]
    },
    {
      "commandName": "windowLevelPreset5",
      "label": "W/L Preset 5",
      "keys": [
        "5"
      ]
    },
    {
      "commandName": "windowLevelPreset6",
      "label": "W/L Preset 6",
      "keys": [
        "6"
      ]
    },
    {
      "commandName": "windowLevelPreset7",
      "label": "W/L Preset 7",
      "keys": [
        "7"
      ]
    },
    {
      "commandName": "windowLevelPreset8",
      "label": "W/L Preset 8",
      "keys": [
        "8"
      ]
    },
    {
      "commandName": "windowLevelPreset9",
      "label": "W/L Preset 9",
      "keys": [
        "9"
      ]
    },
    {
      "commandName": "mpr2d",
      "label": "2D MPR",
      "keys": [
        "d"
      ]
    }
  ]
}

MouseActions

Property Description Value
toolname Tool from navigation bar to open Zoom
Pan
Rotate
StackScroll
Wwwc (ROI Window)
StackScrollMouseWheel
ZoomMouseWheel
Crosshair
RectangleRoi
EllipticalRoi
* FreehandRoi
Button part of mouse left
right
middle
wheel
These options depend on how you are viewing images. See the table below for more details
Button Tools available in 2D Tools available in 2D MPR
left Rotate
StackScroll
Zoom
Pan
Wwwc
ROI tools
Rotate
StackScroll
Zoom
Pan
Wwwc
* Crosshairs
right Pan
Zoom
Rotate
StackScroll
* Wwwc
Pan
Zoom
* Rotate
middle Pan
Zoom
Rotate
StackScroll
* Wwwc
Pan
Zoom
* Rotate
wheel StackScrollMouseWheel
ZoomMouseWheel
StackScrollMouseWheel
ZoomMouseWheel
Example
{
  "mouseActions": [
    {
      "toolName": "Zoom",
      "button": "middle"
    },
    {
      "toolName": "Pan",
      "button": "right"
    },
    {
      "toolName": "RectangleRoi",
      "button": "left"
    },
    {
      "toolName": "StackScrollMouseWheel",
      "button": "wheel"
    }
  ]
}

studyForm

The studyForm section is where you can create blind reader studies. These questions can conditional based on the previous answer and you can configure certain tools and labels to appear based on answers. An example of the questions can be viewed below.

StudyFormExample.png

Property Description Value Required
key Property name to save question to study Custom Information string (no special characters other than - and _) yes
values Choices for radio and selectboxes type questions. Array of objects with the following properties:
label: Text for question
value: Value to store if option is selected
excludeMeasurements: Don't render this option if the following measurements are selected
requireMeasurements: Render this option if the following measurements are selected
no
label Question text string yes
required Require an answer for this question boolean no
type The type of question options:
radio : radio buttons and labels for each option in values
text: DEPRECATED - See textarea
textarea : Text area with label
textfield : text input (single line) with label
selectboxes : Checkboxes and labels for each option in values
content**: HTML Content. for example, adding a header to separate questions into different categories (use the html html key instead of the label key when using this)
yes
conditional Condition under which to render this question. You can use the keys of other questions and values. Object with the following properties:
* json - The JSON Logic to determine if this component is conditionally available.
no
validate Conditions under which to validate this question. Object with the following properties:
required - If the field is required
custom** - A custom javascript based validation or a JSON object for using JSON Logic
no

Example

Below is an example of study form questions with conditional logic:

Example
{
"studyForm": {
    "components": [
      {
        "label": "Is the Study Interpretable?",
        "key": "interpretable",
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
        {
        "html": "<h4>A Header</h4>",
        "key": "header1",
        "type": "content",
        "conditional": {
          "json": {
            "==": [
              {
                "var": "next1"
              },
              "yes"
            ]
          }
        }
      },

      {
        "label": "-----------RETINAL LAYERS-----------",
        "key": "retinal_layers",
        "conditional": {
          "json": {
            "==": [
              {
                "var": "interpretable"
              },
              "yes"
            ]
          }
        },
        "required": false,
        "type": "radio",
        "values": []
      },
      {
        "label": "Is BM present?",
        "key": "pres_BM",
        "conditional": {
          "json": {
            "==": [
              {
                "var": "interpretable"
              },
              "yes"
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "BM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "BM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - BM?",
        "key": "pres_BM_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_BM"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_BM"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is SAP present?",
        "key": "pres_SAP",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_BM_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_BM_contour"
                  },
                  "possible"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_BM"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_BM"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "contourVisibility": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "SAP"
            ],
            "measurementTools": [
              "Length"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "SAP"
            ],
            "measurementTools": [
              "Length"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - SAP?",
        "key": "pres_SAP_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_SAP"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SAP"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is SML present?",
        "key": "pres_SML",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_SAP_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SAP_contour"
                  },
                  "possible"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SAP"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SAP"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "SML"
            ],
            "measurementTools": [
              "Bidirectional",
              "Angle"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "SML"
            ],
            "measurementTools": [
              "Bidirectional",
              "Angle"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - SML?",
        "key": "pres_SML_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_SML"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SML"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is RPE present?",
        "key": "pres_RPE",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_SML_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SML"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SML"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "contourVisibility": true,
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "RPE"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "RPE"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - RPE?",
        "key": "pres_RPE_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_RPE"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_RPE"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is EZ present?",
        "key": "pres_EZ",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_RPE_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_RPE"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_RPE"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "EZ"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "EZ"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - EZ?",
        "key": "pres_EZ_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_EZ"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_EZ"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is ELM present?",
        "key": "pres_ELM",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_EZ_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_EZ"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_EZ"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "ELM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "ELM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - ELM?",
        "key": "pres_ELM_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_ELM"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ELM"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is OPL-HFL present?",
        "key": "pres_OPLHFL",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_ELM_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ELM"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ELM"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "OPL-HFL"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "OPL-HFL"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - OPL HFL?",
        "key": "pres_OPLHFL_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_OPLHFL"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_OPLHFL"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is ILM present?",
        "key": "pres_ILM",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_OPLHFL"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_OPLHFL"
                  },
                  "ungradable"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_OPLHFL_contour"
                  },
                  "yes"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "ILM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "ILM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          },
          {
            "label": "Contour complete - ILM?",
            "key": "pres_ILM_contour",
            "required": true,
            "type": "radio",
            "values": [
              {
                "value": "yes",
                "label": "Yes"
              },
              {
                "value": "no",
                "label": "No"
              }
            ]
          }
        ]
      },
      {
        "label": "--------------PATHOLOGY--------------",
        "key": "pathology",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_ILM_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ILM"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ILM"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": false,
        "type": "radio",
        "values": []
      },
      {
        "label": "Is IRF present?",
        "key": "pres_path_IRF",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_ILM_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ILM"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_ILM"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "IRF"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "IRF"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - IRF?",
        "key": "pres_IRF_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_path_IRF"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_IRF"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is SRF present?",
        "key": "pres_path_SRF",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_IRF_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_IRF"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_IRF"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "SRF"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "SRF"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - SRF?",
        "key": "pres_SRF_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is SHRM present?",
        "key": "pres_path_SHRM",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_SRF_contour"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "no"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes",
            "requireMeasurements": [
              "SHRM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "possible",
            "label": "Possible",
            "requireMeasurements": [
              "SHRM"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Contour complete - SHRM?",
        "key": "pres_SHRM_contour",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_SRF"
                  },
                  "possible"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "label": "Is PED present?",
        "key": "pres_path_PED",
        "conditional": {
          "json": {
            "or": [
              {
                "==": [
                  {
                    "var": "pres_path_SHRM"
                  },
                  "yes"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_path_SHRM"
                  },
                  "possible"
                ]
              },
              {
                "==": [
                  {
                    "var": "pres_SHRM_contour"
                  },
                  "yes"
                ]
              }
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "label": "Which PED type?",
        "key": "pres_path_PED-type",
        "conditional": {
          "json": {
            "==": [
              {
                "var": "pres_path_PED"
              },
              "yes"
            ]
          }
        },
        "required": true,
        "type": "radio",
        "values": [
          {
            "value": "Fibrovascular",
            "label": "Fibrovascular (F)",
            "requireMeasurements": [
              "PED-F"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "serous",
            "label": "Serous (S)",
            "requireMeasurements": [
              "PED-S"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          },
          {
            "value": "drusenoid",
            "label": "Drusenoid (D)",
            "requireMeasurements": [
              "PED-D"
            ],
            "measurementTools": [
              "FreehandRoi"
            ]
          }
        ]
      },
      {
        "label": "Additional Notes",
        "key": "notes",
        "conditional": {
          "json": {
            "==": [
              {
                "var": "interpretable"
              },
              "yes"
            ]
          }
        },
        "required": false,
        "type": "text"
      }
    ]
  }
}