Class Results

java.lang.Object
qupath.ext.biop.utils.Results

public class Results extends Object
Convenience class to export results only for the selected objects.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static ij.measure.ResultsTable
    addMetadataToProject(qupath.lib.projects.Project<BufferedImage> project, File csvFile)
    Conveniently add a bunch of metadata to each entry in the project
    static qupath.lib.gui.measure.ObservableMeasurementTableData
    Returns all the measurements available in QuPath for the all pathObjects Then we can use things like getStringValue() and getDoubleValue()
    static qupath.lib.gui.measure.ObservableMeasurementTableData
    getAllMeasurements(List<qupath.lib.objects.PathObject> pathObjects)
    Creates an ObservableMeasurementTableData for the requested PathObjects
    static void
    sendResultsToFile(ArrayList<String> resultColumns, ArrayList<qupath.lib.objects.PathObject> objects)
     
    static void
    sendResultsToFile(ArrayList<String> resultColumns, ArrayList<qupath.lib.objects.PathObject> objects, File resultsFile)
    By making use of ObservableMeasurementTableData, we can query each result and get a string back Works, for area, PathClasses, parents, and of course any other measurement in the final table
    static void
    sendResultsToFile(ArrayList<qupath.lib.objects.PathObject> objects)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • um

      public static final String um
  • Constructor Details

    • Results

      public Results()
  • Method Details

    • sendResultsToFile

      public static void sendResultsToFile(ArrayList<String> resultColumns, ArrayList<qupath.lib.objects.PathObject> objects, File resultsFile)
      By making use of ObservableMeasurementTableData, we can query each result and get a string back Works, for area, PathClasses, parents, and of course any other measurement in the final table
      Parameters:
      resultColumns - a list of all the results we want to have, exactly the same names as in teh Measurement Results tables
      objects - the pathObjects we want to get the measurements from
      resultsFile - the file where this tool should write to. Note that if the file exists, it will be appended
      See Also:
      • ObservableMeasurementTableData
    • sendResultsToFile

      public static void sendResultsToFile(ArrayList<String> resultColumns, ArrayList<qupath.lib.objects.PathObject> objects)
    • sendResultsToFile

      public static void sendResultsToFile(ArrayList<qupath.lib.objects.PathObject> objects)
    • getAllMeasurements

      public static qupath.lib.gui.measure.ObservableMeasurementTableData getAllMeasurements()
      Returns all the measurements available in QuPath for the all pathObjects Then we can use things like getStringValue() and getDoubleValue()
      Returns:
      a class that you can use to access the results
      See Also:
      • ObservableMeasurementTableData
    • getAllMeasurements

      public static qupath.lib.gui.measure.ObservableMeasurementTableData getAllMeasurements(List<qupath.lib.objects.PathObject> pathObjects)
      Creates an ObservableMeasurementTableData for the requested PathObjects
      Parameters:
      pathObjects - a list of PathObjects to compute measurements from
      Returns:
      an object you can access the results getStringValue() and getDoubleValue()
      See Also:
      • ObservableMeasurementTableData
    • addMetadataToProject

      public static ij.measure.ResultsTable addMetadataToProject(qupath.lib.projects.Project<BufferedImage> project, File csvFile) throws IOException
      Conveniently add a bunch of metadata to each entry in the project
      Parameters:
      project - The project to update
      csvFile - the CSV file that will be opened by ImageJ's ResultsTable
      Throws:
      IOException - in case the project cannot be refreshed