Package qupath.lib.gui.viewer
Class OverlayOptions
java.lang.Object
qupath.lib.gui.viewer.OverlayOptions
Default class for storing overlay display options.
- Author:
- Pete Bankhead
-
Property Summary
TypePropertyDescriptionProperty representing the currentOverlayOptions.DetectionDisplayMode
.Property representing the global opacity for overlay drawing. -
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Display modes for cells and other detections. -
Constructor Summary
ConstructorDescriptionConstructor, using default values.OverlayOptions
(OverlayOptions options) Constructor, initializing values based on an existingOverlayOptions
object. -
Method Summary
Modifier and TypeMethodDescriptionProperty representing the currentOverlayOptions.DetectionDisplayMode
.boolean
Get the currentOverlayOptions.DetectionDisplayMode
.boolean
boolean
float
float
Get the global opacity for overlay drawing.boolean
boolean
Query the currentOverlayOptions.DetectionDisplayMode
to see if cell boundary ROIs should be drawn.boolean
Query the currentOverlayOptions.DetectionDisplayMode
to see if nuclei ROIs should be drawn.boolean
boolean
boolean
boolean
boolean
boolean
boolean
float
getThickStrokeWidth
(double downsample) Get the requested stroke thickness to use when drawing ROIs that should be represented with 'thick' lines (annotations, TMA cores).boolean
isPathClassHidden
(PathClass pathClass) Query whether objects with a specified classification should be displayed or hidden.Get a property representing the timestamp of the last recorded change for any property.Property representing the global opacity for overlay drawing.void
Reset anyMeasurementMapper
, so that measurements are not used to determine object colors.void
Set the currentOverlayOptions.DetectionDisplayMode
.void
setFillAnnotations
(boolean fill) Show annotation objects 'filled' in viewers.void
setFillDetections
(boolean fill) Show detection objects 'filled' in viewers.void
setFontSize
(float size) Set the requested font size for the 'Show names' optionvoid
setGridLines
(GridLines gridLines) Set theGridLines
object that defines how a counting grid may be show in viewersvoid
Set theMeasurementMapper
that defines how detections should be color coded according to their measurement values in viewersvoid
setOpacity
(float opacity) Set global opacity for overlay drawing.void
setPathClassHidden
(PathClass pathClass, boolean hidden) Request that objects with a particular PathClass not be displayed.void
Control where pixel classifications should be calculated during live predictionvoid
setShowAnnotations
(boolean show) Show the annotations on the image.void
setShowConnections
(boolean show) Show connections between objects, if available.void
setShowDetections
(boolean show) Show the objects as an overlay on the image.void
setShowGrid
(boolean showGrid) Set whether a counting grid should be shown in viewersvoid
setShowNames
(boolean show) Show the object names on the image.void
setShowPixelClassification
(boolean show) Show pixel classification overlays.void
setShowTMACoreLabels
(boolean showTMALabels) Show TMA core names on top of the image.void
setShowTMAGrid
(boolean show) Show the TMA grid on the image, if present.
-
Property Details
-
opacity
Property representing the global opacity for overlay drawing.- See Also:
-
detectionDisplayMode
Property representing the currentOverlayOptions.DetectionDisplayMode
.- See Also:
-
showTMACoreLabels
- See Also:
-
showConnections
- See Also:
-
gridLines
- See Also:
-
measurementMapper
- See Also:
-
showAnnotations
- See Also:
-
showNames
- See Also:
-
fontSize
- See Also:
-
showTMAGrid
- See Also:
-
showPixelClassification
- See Also:
-
pixelClassificationFilterRegion
- See Also:
-
showDetections
- See Also:
-
fillDetections
- See Also:
-
fillAnnotations
- See Also:
-
showGrid
- See Also:
-
-
Constructor Details
-
OverlayOptions
public OverlayOptions()Constructor, using default values. -
OverlayOptions
Constructor, initializing values based on an existingOverlayOptions
object.- Parameters:
options
-
-
-
Method Details
-
lastChangeTimestamp
Get a property representing the timestamp of the last recorded change for any property.- Returns:
-
setOpacity
public void setOpacity(float opacity) Set global opacity for overlay drawing. Individual overlays may have their own opacity settings, but these should be concatenated with the global opacity.- Parameters:
opacity
- opacity value between 0 (completely transparent) and 1 (completely opaque).
-
getOpacity
public float getOpacity()Get the global opacity for overlay drawing.- Returns:
- opacity value between 0 (completely transparent) and 1 (completely opaque).
-
opacityProperty
Property representing the global opacity for overlay drawing.- Returns:
- opacity property, which should accept values between 0 and 1.
- See Also:
-
getDetectionDisplayMode
Get the currentOverlayOptions.DetectionDisplayMode
.- Returns:
- the current display mode
-
getShowCellNuclei
public boolean getShowCellNuclei()Query the currentOverlayOptions.DetectionDisplayMode
to see if nuclei ROIs should be drawn.- Returns:
- true if nuclei should be drawn, false otherwise
-
getShowCellBoundaries
public boolean getShowCellBoundaries()Query the currentOverlayOptions.DetectionDisplayMode
to see if cell boundary ROIs should be drawn.- Returns:
- true if nuclei should be drawn, false otherwise
-
setDetectionDisplayMode
Set the currentOverlayOptions.DetectionDisplayMode
.- Parameters:
mode
- the requested mode to set
-
detectionDisplayModeProperty
Property representing the currentOverlayOptions.DetectionDisplayMode
.- Returns:
- See Also:
-
getThickStrokeWidth
public float getThickStrokeWidth(double downsample) Get the requested stroke thickness to use when drawing ROIs that should be represented with 'thick' lines (annotations, TMA cores).- Parameters:
downsample
- downsample at which the annotations should be drawn- Returns:
- preferred stroke thickness to use
-
setShowTMAGrid
public void setShowTMAGrid(boolean show) Show the TMA grid on the image, if present.- Parameters:
show
-
-
setShowAnnotations
public void setShowAnnotations(boolean show) Show the annotations on the image.- Parameters:
show
-
-
setShowNames
public void setShowNames(boolean show) Show the object names on the image.- Parameters:
show
-
-
setFontSize
public void setFontSize(float size) Set the requested font size for the 'Show names' option- Parameters:
size
-
-
setShowDetections
public void setShowDetections(boolean show) Show the objects as an overlay on the image.- Parameters:
show
-
-
setShowPixelClassification
public void setShowPixelClassification(boolean show) Show pixel classification overlays.- Parameters:
show
-
-
setFillDetections
public void setFillDetections(boolean fill) Show detection objects 'filled' in viewers.- Parameters:
fill
-
-
setFillAnnotations
public void setFillAnnotations(boolean fill) Show annotation objects 'filled' in viewers.- Parameters:
fill
-
-
setShowConnections
public void setShowConnections(boolean show) Show connections between objects, if available.- Parameters:
show
-
-
setShowTMACoreLabels
public void setShowTMACoreLabels(boolean showTMALabels) Show TMA core names on top of the image.- Parameters:
showTMALabels
-
-
getShowTMACoreLabels
public boolean getShowTMACoreLabels()- Returns:
- true if TMA core labels should be shown in viewers, false otherwise
-
showTMACoreLabelsProperty
- Returns:
- boolean property indicating whether TMA core labels should be shown in the viewer
- See Also:
-
showConnectionsProperty
- Returns:
- boolean property indicating whether collections between objects should be shown (e.g. after Delaunay triangulation)
- See Also:
-
getShowPixelClassification
public boolean getShowPixelClassification()- Returns:
- true if the current active pixel classification should be shown, false otherwise
-
getShowAnnotations
public boolean getShowAnnotations()- Returns:
- true if annotations should be displayed in viewers, false otherwise
-
getShowNames
public boolean getShowNames()- Returns:
- true if annotation names should be displayed in viewers, false otherwise
-
getFontSize
public float getFontSize()- Returns:
- the requested font size for showing annotation names on the viewer
-
getShowTMAGrid
public boolean getShowTMAGrid()- Returns:
- true if any TMA grids should be displayed in viewers, false otherwise
-
getShowDetections
public boolean getShowDetections()- Returns:
- true if detections should be displayed in viewers, false otherwise
-
getShowConnections
public boolean getShowConnections()- Returns:
- true if any calculated connections between objects should be displayed in viewers, false otherwise
-
getFillDetections
public boolean getFillDetections()- Returns:
- true if detections should be displayed 'filled' in viewers, false otherwise
-
getFillAnnotations
public boolean getFillAnnotations()- Returns:
- true if annotations should be displayed 'filled' in viewers, false otherwise
-
setShowGrid
public void setShowGrid(boolean showGrid) Set whether a counting grid should be shown in viewers- Parameters:
showGrid
-- See Also:
-
getShowGrid
public boolean getShowGrid()- Returns:
- true if a counting grid should be displayed in viewers, false otherwise
- See Also:
-
getGridLines
- Returns:
- the
GridLines
object that defines how a counting grid may be show in viewers - See Also:
-
setGridLines
Set theGridLines
object that defines how a counting grid may be show in viewers- Parameters:
gridLines
-
-
gridLinesProperty
- Returns:
- an object property containing a
GridLines
object that defines how a counting grid may be show in viewers - See Also:
-
setMeasurementMapper
Set theMeasurementMapper
that defines how detections should be color coded according to their measurement values in viewers- Parameters:
mapper
-
-
getMeasurementMapper
- Returns:
- the
MeasurementMapper
object that defines how detections should be color coded according to their measurement values in viewers
-
measurementMapperProperty
- Returns:
- object property containing the current
MeasurementMapper
, if one has been set, or null otherwise - See Also:
-
resetMeasurementMapper
public void resetMeasurementMapper()Reset anyMeasurementMapper
, so that measurements are not used to determine object colors. -
getAllPathClassesVisible
public boolean getAllPathClassesVisible()- Returns:
- true if objects should be displayed regardless of classification (i.e. no classifications are 'hidden')
- See Also:
-
isPathClassHidden
Query whether objects with a specified classification should be displayed or hidden.- Parameters:
pathClass
- the classification to query- Returns:
- true if objects with the classification should be displayed, false if they should be hidden
-
setPathClassHidden
Request that objects with a particular PathClass not be displayed. This may be null, indicating that all unclassified objects should be hidden.- Parameters:
pathClass
-hidden
-
-
showAnnotationsProperty
- Returns:
- the boolean property indicating whether annotations should be displayed
- See Also:
-
showNamesProperty
- Returns:
- the boolean property indicating whether object labels should be displayed
- See Also:
-
fontSizeProperty
- Returns:
- the float property indicating the font size that should be used for displaying names
- See Also:
-
showTMAGridProperty
- Returns:
- the boolean property indicating whether any current TMA grid should be displayed
- See Also:
-
showPixelClassificationProperty
- Returns:
- the boolean property indicating whether any active pixel classification should be displayed
- See Also:
-
pixelClassificationFilterRegionProperty
- Returns:
- the filter used to determine whether a pixel classification should be computed for a specified region
-
setPixelClassificationRegionFilter
Control where pixel classifications should be calculated during live prediction- Parameters:
region
-
-
getPixelClassificationRegionFilter
- Returns:
- a filter used to determine whether a pixel classification should be computed for a specified region
-
showDetectionsProperty
- Returns:
- the boolean property indicating whether detections should be displayed
- See Also:
-
fillDetectionsProperty
- Returns:
- the boolean property indicating whether detections should be displayed 'filled'
- See Also:
-
fillAnnotationsProperty
- Returns:
- the boolean property indicating whether annotations should be displayed 'filled'
- See Also:
-
showGridProperty
- Returns:
- the boolean property indicating whether a counting grid should be shown over the viewer
- See Also:
-