Package qupath.ext.biop.utils
Class Results
- java.lang.Object
-
- qupath.ext.biop.utils.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 ij.measure.ResultsTable
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 projectstatic 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 PathObjectsstatic 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 tablestatic void
sendResultsToFile(java.util.ArrayList<qupath.lib.objects.PathObject> objects)
-
-
-
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 tablesobjects
- the pathObjects we want to get the measurements fromresultsFile
- 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 ij.measure.ResultsTable 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 updatecsvFile
- the CSV file that will be opened by ImageJ's ResultsTable- Throws:
java.io.IOException
- in case the project cannot be refreshed
-
-