Class SummaryMeasurementTableCommand

java.lang.Object
qupath.lib.gui.commands.SummaryMeasurementTableCommand

public class SummaryMeasurementTableCommand extends Object
Show a summary table for an object of a particular type (annotation, detection, TMA core...)
Author:
Pete Bankhead
  • Constructor Details

    • SummaryMeasurementTableCommand

      public SummaryMeasurementTableCommand(QuPathGUI qupath)
      Command to show a summary measurement table, for PathObjects of a specified type (e.g. annotation, detection).
      Parameters:
      qupath -
  • Method Details

    • showTable

      public void showTable(ImageData<BufferedImage> imageData, Class<? extends PathObject> type)
      Show a measurement table for the specified image data.
      Parameters:
      imageData - the image data
      type - 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 from PathPrefs.
      Parameters:
      tableModel - the data to export
      fileOutput - the file to write the text to; if null, a file chooser will be shown
      excludeColumns - headings for columns that should be excluded
      Returns: