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.
- 
Field SummaryFieldsFields inherited from interface qupath.lib.gui.measure.PathTableDataDEFAULT_DECIMAL_PLACES, DEFAULT_DELIMITER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn an ordered list of all names, including both numeric measurements andStringvalues.Access all the objects used to generate the table.Deprecated.double[]getDoubleValues(String column) Get all double values for all items.getHelpText(String column) Get help text for a measurement if available, or null if no help text is found.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 item 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.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.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.lib.gui.measure.PathTableDatagetRowStrings, getRowStrings, getRowStrings
- 
Field Details- 
NAME_OBJECT_IDThe name used for the Object ID column
 
- 
- 
Constructor Details- 
ObservableMeasurementTableDatapublic ObservableMeasurementTableData()
 
- 
- 
Method Details- 
setImageDataSet theImageDataand a collection of objects to measure.- Parameters:
- imageData- the- ImageData, required to determine many dynamic measurements
- pathObjects- the objects to measure ('rows' in the table)
 
- 
setPixelLayerpublic 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
 
- 
getPixelLayerRequest the pixel layer from anImageData.Note that this method is subject to change (in location and behavior). - Parameters:
- imageData-
- Returns:
 
- 
updateMeasurementListpublic void updateMeasurementList()Update the entire measurement list for the current objects.- See Also:
 
- 
setPredicateSet a predicate used to filter the rows of the table. This effectively filters the contents ofgetBackingList()when returninggetItems().- Parameters:
- predicate- the filter to apply
 
- 
isStringMeasurementQuery whether a named measurement returns aStringvalue only.- Parameters:
- name- the measurement name
- Returns:
- true if the measurement returns a String (only), false otherwise
 
- 
isNumericMeasurementQuery whether a named measurement returns a numeric value only.- Parameters:
- name- the measurement name
- Returns:
- true if the measurement returns a number, false otherwise
 
- 
getMeasurementNamesDescription copied from interface:PathTableDataGet the names of all numeric measurements.- Specified by:
- getMeasurementNamesin interface- PathTableData<PathObject>
- Returns:
- See Also:
 
- 
getDoubleValuesDescription copied from interface:PathTableDataGet all double values for all items.- Specified by:
- getDoubleValuesin interface- PathTableData<PathObject>
- Parameters:
- column-
- Returns:
 
- 
getNumericValueDescription copied from interface:PathTableDataGet the numeric value from an item for the specific measurement.- Specified by:
- getNumericValuein interface- PathTableData<PathObject>
- Parameters:
- pathObject-
- column-
- Returns:
 
- 
getItemsDescription copied from interface:PathTableDataGet internal list of the items used to provide measurements.- Specified by:
- getItemsin interface- PathTableData<PathObject>
- Returns:
 
- 
getBackingListEntriesDeprecated.v0.6.0 use insteadgetBackingList()Access the underlying entries, for which getEntries provides a filtered view.- Returns:
- a list of all objects used to create the table
 
- 
getBackingListAccess all the objects used to generate the table. This contains all the objects passed tosetImageData(ImageData, Collection)and may be longer than the list returned bygetItems()if a predicate has been applied.- Returns:
- the list of objects
- Since:
- v0.6.0
 
- 
getAllNamesDescription copied from interface:PathTableDataReturn an ordered list of all names, including both numeric measurements andStringvalues.- Specified by:
- getAllNamesin interface- PathTableData<PathObject>
- Returns:
- See Also:
 
- 
getStringValueDescription copied from interface:PathTableDataGet a string representation of the value.For this method, numbers should be formatted according to the Locale.- Specified by:
- getStringValuein interface- PathTableData<PathObject>
- Parameters:
- pathObject-
- column-
- Returns:
 
- 
getHelpTextGet help text for a measurement if available, or null if no help text is found.- Parameters:
- column-
- Returns:
 
- 
getStringValueDescription copied from interface:PathTableDataGet a string value, converting to a fixed number of decimal places if the column is numeric.- Specified by:
- getStringValuein interface- PathTableData<PathObject>
- Parameters:
- pathObject-
- column-
- decimalPlaces-
- Returns:
 
- 
getMetadataNamesGet the names of all columns corresponding to metadata (String) values.- Returns:
 
 
- 
getBackingList()