Package qupath.lib.gui.measure
Class ObservableMeasurementTableData
java.lang.Object
qupath.lib.gui.measure.ObservableMeasurementTableData
- All Implemented Interfaces:
PathTableData<PathObject>
A table data model to supply observable measurements of PathObjects.
This includes dynamically-calculated summaries.
- Author:
- Pete Bankhead
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNumericMeasurement(PathObject pathObject, String column) Deprecated.createStringMeasurement(PathObject pathObject, String column) Deprecated.Return an ordered list of all names, including both numeric measurements andStringvalues.Access the underlying entries, for which getEntries provides a filtered view.double[]getDoubleValues(String column) Get all double values for all items.getItems()Get internal list of the items used to provide measurements.Get the names of all numeric measurements.Get the names of all columns corresponding to metadata (String) values.doublegetNumericValue(PathObject pathObject, String column) Get the numeric value from an object for the specific measurement.static ImageServer<BufferedImage>getPixelLayer(ImageData<?> imageData) Request the pixel layer from anImageData.getStringValue(PathObject pathObject, String column) Get a string representation of the value.getStringValue(PathObject pathObject, String column, int decimalPlaces) Get a string value, converting to a fixed number of decimal places if the column is numeric.booleanisNumericMeasurement(String name) Query whether a named measurement returns a numeric value only.booleanisStringMeasurement(String name) Query whether a named measurement returns aStringvalue only.voidRefresh the measurement values.voidsetImageData(ImageData<?> imageData, Collection<? extends PathObject> pathObjects) Set theImageDataand a collection of objects to measure.static voidsetPixelLayer(ImageData<BufferedImage> imageData, ImageServer<BufferedImage> layerServer) Set anImageServeras a property in theImageData.voidsetPredicate(Predicate<? super PathObject> predicate) Set a predicate used to filter the rows of the table.voidUpdate the entire measurement list for the current objects.
-
Field Details
-
NAME_OBJECT_ID
The name used for the Object ID column- See Also:
-
-
Constructor Details
-
ObservableMeasurementTableData
public ObservableMeasurementTableData()
-
-
Method Details
-
setImageData
Set theImageDataand a collection of objects to measure.- Parameters:
imageData- theImageData, required to determine many dynamic measurementspathObjects- the objects to measure ('rows' in the table)
-
setPixelLayer
public static void setPixelLayer(ImageData<BufferedImage> imageData, ImageServer<BufferedImage> layerServer) Set anImageServeras a property in theImageData. This is intended for use as a temporary (non-persistent) property, used byObservableMeasurementTableDatato create live measurements.Note that this method is subject to change (in location and behavior).
- Parameters:
imageData-layerServer- server to return the pixel layer data; if null, the property will be removed
-
getPixelLayer
Request the pixel layer from anImageData.Note that this method is subject to change (in location and behavior).
- Parameters:
imageData-- Returns:
-
updateMeasurementList
public void updateMeasurementList()Update the entire measurement list for the current objects.- See Also:
-
setPredicate
Set a predicate used to filter the rows of the table.- Parameters:
predicate-
-
refreshEntries
public void refreshEntries()Refresh the measurement values. -
createNumericMeasurement
Deprecated.Create a specific numeric measurement.Warning! This binding is not guaranteed to update its value automatically upon changes to the underlying object or data.
- Parameters:
pathObject-column-- Returns:
-
createStringMeasurement
Deprecated.Create a specific String measurement.Warning! This binding is not guaranteed to update its value automatically upon changes to the underlying object or data.
- Parameters:
pathObject-column-- Returns:
-
isStringMeasurement
Query whether a named measurement returns aStringvalue only.- Parameters:
name- the measurement name- Returns:
- true if the measurement returns a String (only), false otherwise
-
isNumericMeasurement
Query whether a named measurement returns a numeric value only.- Parameters:
name- the measurement name- Returns:
- true if the measurement returns a number, false otherwise
-
getMeasurementNames
Description copied from interface:PathTableDataGet the names of all numeric measurements.- Specified by:
getMeasurementNamesin interfacePathTableData<PathObject>- Returns:
-
getDoubleValues
Description copied from interface:PathTableDataGet all double values for all items.- Specified by:
getDoubleValuesin interfacePathTableData<PathObject>- Returns:
-
getNumericValue
Description copied from interface:PathTableDataGet the numeric value from an object for the specific measurement.- Specified by:
getNumericValuein interfacePathTableData<PathObject>- Returns:
-
getItems
Description copied from interface:PathTableDataGet internal list of the items used to provide measurements.- Specified by:
getItemsin interfacePathTableData<PathObject>- Returns:
-
getBackingListEntries
Access the underlying entries, for which getEntries provides a filtered view.- Returns:
-
getAllNames
Description copied from interface:PathTableDataReturn an ordered list of all names, including both numeric measurements andStringvalues.- Specified by:
getAllNamesin interfacePathTableData<PathObject>- Returns:
-
getStringValue
Description copied from interface:PathTableDataGet a string representation of the value. For this method, numbers should be formatted according to theLocale.- Specified by:
getStringValuein interfacePathTableData<PathObject>- Returns:
-
getStringValue
Description copied from interface:PathTableDataGet a string value, converting to a fixed number of decimal places if the column is numeric.- Specified by:
getStringValuein interfacePathTableData<PathObject>- Returns:
-
getMetadataNames
Get the names of all columns corresponding to metadata (String) values.- Returns:
-