Class OverlayOptions
-
Property Summary
PropertiesTypePropertyDescriptionProperty representing the currentOverlayOptions.DetectionDisplayMode.Property representing the global opacity for overlay drawing.Request that only exact matches to classes inselectedClassesProperty()should be hidden.Get the predicate used to determine whether an object should be displayed or hidden.Property to control whether entries inselectedClassesProperty()should be used exactly, or should also include all related classes (i.e. -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumVisibility modes for classes.static enumDisplay modes for cells and other detections. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor, using default values.OverlayOptions(OverlayOptions options) Constructor, initializing values based on an existingOverlayOptionsobject. -
Method Summary
Modifier and TypeMethodDescriptionProperty representing the currentOverlayOptions.DetectionDisplayMode.booleanGet the currentOverlayOptions.DetectionDisplayMode.booleanbooleanfloatfloatGet the global opacity for overlay drawing.Get the value ofselectedClassVisibilityModeProperty().static OverlayOptionsGet a shared OverlayOptions instance that makes some properties persistent.booleanbooleanQuery the currentOverlayOptions.DetectionDisplayModeto see if cell boundary ROIs should be drawn.booleanQuery the currentOverlayOptions.DetectionDisplayModeto see if nuclei ROIs should be drawn.booleanbooleanbooleanbooleanGet the value ofshowObjectPredicateProperty().booleanbooleanbooleanfloatgetThickStrokeWidth(double downsample) Get the requested stroke thickness to use when drawing ROIs that should be represented with 'thick' lines (annotations, TMA cores).booleanbooleanisHidden(PathObject pathObject) Query whether an object should be hidden.booleanisPathClassHidden(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.voidReset anyMeasurementMapper, so that measurements are not used to determine object colors.voidReset the value ofshowObjectPredicateProperty().Request that only exact matches to classes inselectedClassesProperty()should be hidden.voidSet the currentOverlayOptions.DetectionDisplayMode.voidsetFillAnnotations(boolean fill) Show annotation objects 'filled' in viewers.voidsetFillDetections(boolean fill) Show detection objects 'filled' in viewers.voidsetFontSize(float size) Set the requested font size for the 'Show names' optionvoidsetGridLines(GridLines gridLines) Set theGridLinesobject that defines how a counting grid may be show in viewersvoidSet theMeasurementMapperthat defines how detections should be color coded according to their measurement values in viewersvoidsetOpacity(float opacity) Set global opacity for overlay drawing.voidsetPathClassHidden(PathClass pathClass, boolean hidden) Request that objects with a particular PathClass not be displayed.voidControl where pixel classifications should be calculated during live predictionvoidSet the value ofselectedClassVisibilityModeProperty().voidsetShowAnnotations(boolean show) Show the annotations on the image.voidsetShowConnections(boolean show) Show connections between objects, if available.voidsetShowDetections(boolean show) Show the objects as an overlay on the image.voidsetShowGrid(boolean showGrid) Set whether a counting grid should be shown in viewersvoidsetShowNames(boolean show) Show the object names on the image.voidsetShowObjectPredicate(Predicate<PathObject> pathObjectPredicate) Set the value ofshowObjectPredicateProperty().voidsetShowPixelClassification(boolean show) Show pixel classification overlays.voidsetShowTMACoreLabels(boolean showTMALabels) Show TMA core names on top of the image.voidsetShowTMAGrid(boolean show) Show the TMA grid on the image, if present.voidsetUseExactSelectedClasses(boolean useExact) Set the value ofuseExactSelectedClassesProperty()Get the predicate used to determine whether an object should be displayed or hidden.Property to control whether entries inselectedClassesProperty()should be used exactly, or should also include all related classes (i.e.
-
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:
-
showObjectPredicate
Get the predicate used to determine whether an object should be displayed or hidden. Note that this is applied in addition to any values inselectedClassesProperty()and the individual show/hide options for different object types.Usually the value should be
null, but it exists to allow more complex filtering of objects that cannot be achieved using any of the other methods.- Since:
- v0.6.0
- See Also:
-
selectedClasses
- See Also:
-
useExactSelectedClasses
Property to control whether entries inselectedClassesProperty()should be used exactly, or should also include all related classes (i.e. classes that are supersets of the selected class).- See Also:
-
selectedClassVisibilityMode
Request that only exact matches to classes inselectedClassesProperty()should be hidden. This influences the result ofisPathClassHidden(PathClass).If false, then any object with a classification that is a superset of a hidden classification will also be hidden. For example, if
"CD3"is hidden then"CD3: CD8"will also be hidden.- Since:
- v0.6.0
- 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 existingOverlayOptionsobject.- 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.DetectionDisplayModeto see if nuclei ROIs should be drawn.- Returns:
- true if nuclei should be drawn, false otherwise
-
getShowCellBoundaries
public boolean getShowCellBoundaries()Query the currentOverlayOptions.DetectionDisplayModeto 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
GridLinesobject that defines how a counting grid may be show in viewers - See Also:
-
setGridLines
Set theGridLinesobject that defines how a counting grid may be show in viewers- Parameters:
gridLines-
-
gridLinesProperty
- Returns:
- an object property containing a
GridLinesobject that defines how a counting grid may be show in viewers - See Also:
-
setMeasurementMapper
Set theMeasurementMapperthat defines how detections should be color coded according to their measurement values in viewers- Parameters:
mapper-
-
getMeasurementMapper
- Returns:
- the
MeasurementMapperobject 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:
-
isHidden
Query whether an object should be hidden. This could be for one of 3 reasons:- It is of a type that should be hidden (e.g. detections, annotations, TMA cores)
- It is rejected by
showObjectPredicateProperty() - It has a classification that should be hidden
- Parameters:
pathObject- the object to test- Returns:
- true if the object should be hidden, false if it can be shown
-
showObjectPredicateProperty
Get the predicate used to determine whether an object should be displayed or hidden. Note that this is applied in addition to any values inselectedClassesProperty()and the individual show/hide options for different object types.Usually the value should be
null, but it exists to allow more complex filtering of objects that cannot be achieved using any of the other methods.- Returns:
- the predicate used to determine whether an object should be displayed or hidden
- Since:
- v0.6.0
- See Also:
-
resetShowObjectPredicate
public void resetShowObjectPredicate()Reset the value ofshowObjectPredicateProperty().- Since:
- v0.6.0
-
setShowObjectPredicate
Set the value ofshowObjectPredicateProperty().If the intention is to show all objects, either pass
nullor callresetShowObjectPredicate()- do not pass a predicate that always returnstrue, because this will be less efficient.- Parameters:
pathObjectPredicate- the predicate to use, ornullnull if no predicate should be used- Since:
- v0.6.0
- See Also:
-
getShowObjectPredicate
Get the value ofshowObjectPredicateProperty().- Returns:
- the value of the predicate
- Since:
- v0.6.0
-
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-
-
selectedClassesProperty
- Returns:
- an observable set containing classifications for which the corresponding objects should not be displayed
-
useExactSelectedClassesProperty
Property to control whether entries inselectedClassesProperty()should be used exactly, or should also include all related classes (i.e. classes that are supersets of the selected class).- Returns:
- See Also:
-
setUseExactSelectedClasses
public void setUseExactSelectedClasses(boolean useExact) Set the value ofuseExactSelectedClassesProperty()- Parameters:
useExact-
-
getUseExactSelectedClasses
public boolean getUseExactSelectedClasses()- Returns:
- the value of
useExactSelectedClassesProperty()
-
selectedClassVisibilityModeProperty
Request that only exact matches to classes inselectedClassesProperty()should be hidden. This influences the result ofisPathClassHidden(PathClass).If false, then any object with a classification that is a superset of a hidden classification will also be hidden. For example, if
"CD3"is hidden then"CD3: CD8"will also be hidden.- Returns:
- Since:
- v0.6.0
- See Also:
-
getSelectedClassVisibilityMode
Get the value ofselectedClassVisibilityModeProperty().- Returns:
- Since:
- v0.6.0
-
setSelectedClassVisibilityMode
Set the value ofselectedClassVisibilityModeProperty().- Parameters:
value- the new value- Since:
- v0.6.0
-
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: