Interface Options¶
Set user interface default options:
# Default kinetic drag setting omero config set omero.web.pathviewer.option.kinetic_drag true # Default setting for shape label visibility omero config set omero.web.pathviewer.option.hide_shape_labels true # Default setting for zoom center option omero config set omero.web.pathviewer.option.zoom_at_cursor true
Set minimum tile size below which PathViewer will not open images (Default: 128):
# Set minimum tile size omero config set omero.web.pathviewer.min_tile_size 256
Set system-wide predefined ROI styles:
# Set predefined styles to an empty array. omero config set omero.web.pathviewer.styles '[]' # Add a predefined style to the list. omero config append omero.web.pathviewer.styles '{"label": "Red1", "fillcolor": "rgba(255,0,0,0.5)", "strokecolor": "rgba(255,0,0,1.0)", "fontcolor": "rgba(255,0,0,1.0)", "labelPosition": "left", "strokedash": "none", "fontsize": "12px"}'
Predefined Style
Setting
Type
Example
Description
name
string
Stroma
Name of predefined style. If unset, the roiName or label value will be used to identify the predefined style.
restrictTo
string
Ellipse,Rectangle
If set, restricts predefined style to these comma-separated ROI types. Valid types are Line, LineString, FreehandPolyline, Polygon, Rectangle, Ellipse, FreehandPolygon, Point, Label.
defaultFor
string
Line,LineString
If set, selects this predefined style as the default option for the given comma-separated ROI types.
Style
Type
Example
Description
label
string
Red ROI
Label text for ROI. Can be any string. Note: On creation, ROI name will be set to this value as well if no roiName is set.
roiName
string
Red ROI
Name for ROI. Can be any string. Note: On creation, if this is not set, ROI name will be set to the label value.
fillcolor
string
rgba(255,0,0,0.8)
ROI shaped fill color. Must be an rgba string.
strokecolor
string
rgba(255,0,0,1.0)
Border color of ROI shape. Must be an rgba string.
fontcolor
string
red
Color used for label text. Can be a string of any valid css color string.
labelPosition
string
center
ROI label position, one of “default”, “center”, “above”, “below”, “left”, “right”.
strokedash
string
2 5
Style of ROI border, one of “none”, “2 5”, “5”, “1 0”, “5 5 2 5”.
fontsize
string
12px
Font size of ROI label, one of “12px”, “24px”, “36px”.
markerStart
string
Arrow
Adds an arrow at the start of the line (applies to lines only).
markerEnd
string
(empty string)
Adds an arrow at the end of the line (applies to lines only).
rgba opacities must be a float. Also, the ones and tenths position must not be blank. e.g. 1.0 and 0.25
ROI Dashed Stroke Key:
none ==> --------------- 2 5 ==> · · · · · · · · · · · · · 5 ==> - - - - - - - - - - 10 ==> — — — — 5 5 2 5 ==> - · - · - · - · - · -
Example:
{ "label": "Green ROI", "fillcolor": "rgba(0,255,0,0.5)", "strokecolor": "rgba(0,255,0,1.0)", "fontcolor": "rgba(0,255,0,1.0)", "labelPosition": "center", "strokedash": "5", "fontsize": "24px", "markerStart": "Arrow", "markerEnd": "" }
# Enforce system-wide predefined ROI styles:
# Disable enforcement omero config set omero.web.pathviewer.enforce_styles null # Enforce predefined style for all properties omero config set omero.web.pathviewer.enforce_styles '["roiName", "label", "fillcolor", "strokecolor", "fontcolor", "labelPosition", "strokedash", "fontsize", "markerStart", "markerEnd"]'
Dataset-level predefined ROI styles:
Predefined styles can also be set at the dataset level via annotations on the dataset. Note that the annotation must be readable by the current user to be applied. If multiple annotations are present, annotations by the current user are preferred over ones owned by the dataset owner, followed by any other users. If there are still multiple annotations, the newest is selected.
Annotations can be managed via the omero obj command line tool.
Example:
# Create new dataset-level predefined style and enforcement # Note that both the "styles" and "enforce" keys must be present, but "enforce" can be set to `null` or `[]` if enforcement is not desired dataset=123 ann=$(omero obj new XmlAnnotation ns=glencoesoftware.com/pathviewer/predefinedstyle textValue='{ "styles": [{"name": "From Dataset", "label": "Red1", "fillcolor": "rgba(255,0,0,0.5)", "strokecolor": "rgba(255,0,0,1.0)", "fontcolor": "rgba(255,0,0,1.0)", "labelPosition": "left", "strokedash": "none", "fontsize": "12px"}], "enforce": ["roiName", "label", "fillcolor", "strokecolor", "fontcolor", "labelPosition", "strokedash", "fontsize", "markerStart", "markerEnd"] }' ) omero obj new DatasetAnnotationLink parent=Dataset:$dataset child=$ann # List existing annotations dataset=123 omero hql --all "select ann.id from Dataset as ds inner join ds.annotationLinks as link inner join link.child as ann where ann.ns='glencoesoftware.com/pathviewer/predefinedstyle' and ds.id=$dataset" # Display existing annotation ann=1234 omero obj get XmlAnnotation:$ann
Set default ROI locking:
# Disable automatic ROI locking (the default) omero config set omero.web.pathviewer.roi_locking off # Lock all ROIs on load (does not apply to newly drawn ROIs) omero config set omero.web.pathviewer.roi_locking onload # Lock all ROIs on drawing (does not apply to loaded ROIs) omero config set omero.web.pathviewer.roi_locking ondraw # Lock all ROIs on load and on draw omero config set omero.web.pathviewer.roi_locking always
Hide ROIs on load
# Set visibility of all ROIs to hidden on load omero config set omero.web.pathviewer.roi_hide_on_load true