Package qupath.lib.gui.commands
Class SummaryMeasurementTableCommand
java.lang.Object
qupath.lib.gui.commands.SummaryMeasurementTableCommand
Show a summary table for an object of a particular type (annotation, detection, TMA core...)
- Author:
- Pete Bankhead
-
Constructor Summary
ConstructorDescriptionCommand to show a summary measurement table, for PathObjects of a specified type (e.g. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyTableContentsToClipboard
(PathTableData<?> model, Collection<String> excludeColumns) Get a single String representing the data in a table and copy it to the clipboard.static <T> String
getTableModelString
(PathTableData<T> model, String delim, Collection<String> excludeColumns) Get a single String representing the data in a table.getTableModelStrings
(PathTableData<T> model, String delim, Collection<String> excludeColumns) Get a list of Strings representing table data.static boolean
saveTableModel
(PathTableData<?> tableModel, File fileOutput, Collection<String> excludeColumns) Save the data from a table to a text file, using the default delimiter fromPathPrefs
.void
showTable
(ImageData<BufferedImage> imageData, Class<? extends PathObject> type) Show a measurement table for the specified image data.
-
Constructor Details
-
SummaryMeasurementTableCommand
Command to show a summary measurement table, for PathObjects of a specified type (e.g. annotation, detection).- Parameters:
qupath
-
-
-
Method Details
-
showTable
Show a measurement table for the specified image data.- Parameters:
imageData
- the image datatype
- the object type to show
-
getTableModelStrings
public static <T> List<String> getTableModelStrings(PathTableData<T> model, String delim, Collection<String> excludeColumns) Get a list of Strings representing table data.Each entry in the list corresponds to a row.
- Type Parameters:
T
- the data type for the table- Parameters:
model
-delim
-excludeColumns
-- Returns:
-
getTableModelString
public static <T> String getTableModelString(PathTableData<T> model, String delim, Collection<String> excludeColumns) throws IllegalArgumentException Get a single String representing the data in a table.Note: if the required String is too long (approximately Integer.MAX_VALUE characters), this will throw an IllegalArgumentException.
- Type Parameters:
T
- the data type for the items in the table- Parameters:
model
-delim
-excludeColumns
-- Returns:
- Throws:
IllegalArgumentException
-
copyTableContentsToClipboard
public static void copyTableContentsToClipboard(PathTableData<?> model, Collection<String> excludeColumns) Get a single String representing the data in a table and copy it to the clipboard.Note: this may not be possible if the String is too long, see
getTableModelString(PathTableData, String, Collection)
.- Parameters:
model
-excludeColumns
-
-
saveTableModel
public static boolean saveTableModel(PathTableData<?> tableModel, File fileOutput, Collection<String> excludeColumns) Save the data from a table to a text file, using the default delimiter fromPathPrefs
.- Parameters:
tableModel
- the data to exportfileOutput
- the file to write the text to; if null, a file chooser will be shownexcludeColumns
- headings for columns that should be excluded- Returns:
-