Package qupath.lib.experimental.pixels
Class MeasurementProcessor
java.lang.Object
qupath.lib.experimental.pixels.MeasurementProcessor
Create
PixelProcessor
instances that make measurements from objects.
Important! This class is intended to simplify making measurements where all pixel values can fit into a single double array. It is not suitable for large images or tiling.
It is also not very efficient if the same channel is used multiple times, since the channel will be extracted each time.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for calculating one custom measurement from an image, usingParameters
.static class
Functions for calculating measurements from an array of pixels.static class
Methods to create custom measurements. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PixelProcessor.Builder
<BufferedImage, BufferedImage, Map<String, ? extends Number>> builder
(Collection<? extends MeasurementProcessor.CustomMeasurement<BufferedImage, BufferedImage>> measurements) Create a new builder for aPixelProcessor
that can make custom measurements for an image object.createProcessor
(Collection<? extends MeasurementProcessor.CustomMeasurement<S, T>> measurements) Create a processor that can make custom measurements for an image object.createProcessor
(MeasurementProcessor.CustomMeasurement<S, T>... measurement) Create a processor that can make custom measurements for an image object.
-
Constructor Details
-
MeasurementProcessor
public MeasurementProcessor()
-
-
Method Details
-
createProcessor
public static <S,T> Processor<S,T, createProcessorMap<String, ? extends Number>> (MeasurementProcessor.CustomMeasurement<S, T>... measurement) Create a processor that can make custom measurements for an image object.Note that it assumes that all pixels can fit in memory, therefore it is not suitable for large images or tiling.
- Type Parameters:
S
-T
-- Parameters:
measurement
-- Returns:
-
createProcessor
public static <S,T> Processor<S,T, createProcessorMap<String, ? extends Number>> (Collection<? extends MeasurementProcessor.CustomMeasurement<S, T>> measurements) Create a processor that can make custom measurements for an image object.Note that it assumes that all pixels can fit in memory, therefore it is not suitable for large images or tiling.
- Type Parameters:
S
-T
-- Parameters:
measurements
-- Returns:
-
builder
public static PixelProcessor.Builder<BufferedImage,BufferedImage, builderMap<String, ? extends Number>> (Collection<? extends MeasurementProcessor.CustomMeasurement<BufferedImage, BufferedImage>> measurements) Create a new builder for aPixelProcessor
that can make custom measurements for an image object. The builder is ready to use, but can also be further customized if required (e.g. to set the resolution).- Parameters:
measurements
-- Returns:
-