Class MeasurementExporter

java.lang.Object
qupath.lib.gui.tools.MeasurementExporter

public class MeasurementExporter extends Object
Helper class for exporting the measurements of one or more entries in a project.
Author:
Melvin Gelbard
  • Constructor Details

    • MeasurementExporter

      public MeasurementExporter()
  • Method Details

    • exportType

      public MeasurementExporter exportType(Class<? extends PathObject> type)
      Specify what type of object should be exported. Default: image (root object).
      Parameters:
      type -
      Returns:
      this exporter
    • includeOnlyColumns

      public MeasurementExporter includeOnlyColumns(String... includeOnlyColumns)
      Specify the columns that will be included in the export. The column names are case sensitive.
      Parameters:
      includeOnlyColumns -
      Returns:
      this exporter
    • excludeColumns

      public MeasurementExporter excludeColumns(String... excludeColumns)
      Specify the columns that will be excluded during the export. The column names are case sensitive.
      Parameters:
      excludeColumns -
      Returns:
      this exporter
    • separator

      public MeasurementExporter separator(String sep)
      Specify the separator used between measurement values. To avoid unexpected behavior, it is recommended to use either tab (\t), comma (,) or semicolon (;).
      Parameters:
      sep -
      Returns:
      this exporter
    • imageList

      public MeasurementExporter imageList(List<ProjectImageEntry<BufferedImage>> imageList)
      Specify the list of images (ProjectImageEntry) to export.
      Parameters:
      imageList -
      Returns:
      this exporter
    • filter

      public MeasurementExporter filter(Predicate<PathObject> filter)
      Filter the PathObjects before export (objects returning true for the predicate will be exported).
      Parameters:
      filter -
      Returns:
      this exporter
      Since:
      v0.3.2
    • getImageList

      public List<ProjectImageEntry<BufferedImage>> getImageList()
      Returns the list of images (ProjectImageEntry).
      Returns:
      imageList
    • getExcludeColumns

      public List<String> getExcludeColumns()
      Returns the list of columns to exclude from export.
      Returns:
      list of column names
    • getIncludeColumns

      public List<String> getIncludeColumns()
      Returns the list of columns to include in the export.
      Returns:
      list of column names
    • getSeparator

      public String getSeparator()
      Returns the separator used in between measurements.
      Returns:
      separator
    • getType

      public Class<? extends PathObject> getType()
      Returns the type of path objects used in the export.
      Returns:
      path object
    • exportMeasurements

      public void exportMeasurements(File file)
      Exports the measurements of one or more entries in the project. This function first opens all the images in the project to store all the column names and values of the measurements. Then, it loops through the maps containing the values to write them to the given output file.
      Parameters:
      file -
    • exportMeasurements

      public void exportMeasurements(OutputStream stream)
      Exports the measurements of one or more entries in the project. This function first opens all the images in the project to store all the column names and values of the measurements. Then, it loops through the maps containing the values to write them to the given output stream.
      Parameters:
      stream -