Package qupath.lib.analysis.features
Class ObjectMeasurements
java.lang.Object
qupath.lib.analysis.features.ObjectMeasurements
Experimental class to generate object measurements.
May very well be moved, removed or refactored in a future release...
- Author:
- Pete Bankhead
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Cell compartments.static enum
Requested intensity measurements.static enum
Standard measurements that may be computed from shapes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addIntensityMeasurements
(ImageServer<BufferedImage> server, PathObject pathObject, double downsample, Collection<ObjectMeasurements.Measurements> measurements, Collection<ObjectMeasurements.Compartments> compartments) Measure all channels of an image for one individual object or cell.static void
addShapeMeasurements
(Collection<? extends PathObject> pathObjects, PixelCalibration cal, ObjectMeasurements.ShapeFeatures... features) Add shape measurements for multiple objects.static void
addShapeMeasurements
(PathObject pathObject, PixelCalibration cal, ObjectMeasurements.ShapeFeatures... features) Add shape measurements for one object.
-
Constructor Details
-
ObjectMeasurements
public ObjectMeasurements()
-
-
Method Details
-
addShapeMeasurements
public static void addShapeMeasurements(PathObject pathObject, PixelCalibration cal, ObjectMeasurements.ShapeFeatures... features) Add shape measurements for one object. If this is a cell, measurements will be made for both the nucleus and cell boundary where possible.- Parameters:
pathObject
- the object for which measurements should be addedcal
- pixel calibration, used to determine units and scalingfeatures
- specific features to add; if empty, all available shape features will be added
-
addShapeMeasurements
public static void addShapeMeasurements(Collection<? extends PathObject> pathObjects, PixelCalibration cal, ObjectMeasurements.ShapeFeatures... features) Add shape measurements for multiple objects. If any of these objects is a cell, measurements will be made for both the nucleus and cell boundary where possible.- Parameters:
pathObjects
- the objects for which measurements should be addedcal
- pixel calibration, used to determine units and scalingfeatures
- specific features to add; if empty, all available shape features will be added
-
addIntensityMeasurements
public static void addIntensityMeasurements(ImageServer<BufferedImage> server, PathObject pathObject, double downsample, Collection<ObjectMeasurements.Measurements> measurements, Collection<ObjectMeasurements.Compartments> compartments) throws IOException Measure all channels of an image for one individual object or cell. All compartments are measured where possible (nucleus, cytoplasm, membrane and full cell).Note: This implementation is likely to change in the future, to enable neighboring cells to be measured more efficiently.
- Parameters:
server
- the server containing the pixels (and channels) to be measuredpathObject
- the cell to measure (theMeasurementList
will be updated)downsample
- resolution at which to request pixelsmeasurements
- requested measurements to makecompartments
- the cell compartments to measure; ignored if the object is not a cell- Throws:
IOException
-