Class Results


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String um  
    • Constructor Summary

      Constructors 
      Constructor Description
      Results()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addMetadataToProject​(qupath.lib.projects.Project<java.awt.image.BufferedImage> project, java.io.File csvFile)
      Conveniently add a bunch of metadata to each entry in the project
      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()
      static qupath.lib.gui.measure.ObservableMeasurementTableData getAllMeasurements​(java.util.List<qupath.lib.objects.PathObject> pathObjects)
      Creates an ObservableMeasurementTableData for the requested PathObjects
      static void sendResultsToFile​(java.util.ArrayList<java.lang.String> resultColumns, java.util.ArrayList<qupath.lib.objects.PathObject> objects)  
      static void sendResultsToFile​(java.util.ArrayList<java.lang.String> resultColumns, java.util.ArrayList<qupath.lib.objects.PathObject> objects, java.io.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​(java.util.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 Detail

      • um

        public static final java.lang.String um
    • Constructor Detail

      • Results

        public Results()
    • Method Detail

      • sendResultsToFile

        public static void sendResultsToFile​(java.util.ArrayList<java.lang.String> resultColumns,
                                             java.util.ArrayList<qupath.lib.objects.PathObject> objects,
                                             java.io.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​(java.util.ArrayList<java.lang.String> resultColumns,
                                             java.util.ArrayList<qupath.lib.objects.PathObject> objects)
      • sendResultsToFile

        public static void sendResultsToFile​(java.util.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​(java.util.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 void addMetadataToProject​(qupath.lib.projects.Project<java.awt.image.BufferedImage> project,
                                                java.io.File csvFile)
                                         throws java.io.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:
        java.io.IOException - in case the project cannot be refreshed