Package qupath.lib.experimental.pixels
Class ImageJProcessor
java.lang.Object
qupath.lib.experimental.pixels.ImageJProcessor
Class to generate a
PixelProcessor
when using ImageJ for the primary image representation.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate aPixelProcessor.Builder
for an ImageJImagePlus
.Create anOutputHandler.OutputToObjectConverter
that attempts to convert the output into annotation objects.static OutputHandler
<ImagePlus, ImagePlus, Object> Create anOutputHandler
that attempts to convert the output into annotation objects.Create anOutputHandler.OutputToObjectConverter
that attempts to convert the output into detection objects.static OutputHandler
<ImagePlus, ImagePlus, Object> Create anOutputHandler
that attempts to convert the output into detection objects.static ImageSupplier
<ImagePlus> Create anImageSupplier
that returns an ImageJImagePlus
.static MaskSupplier
<ImagePlus, ImagePlus> Create aMaskSupplier
that returns an ImageJByteProcessor
.static <U> OutputHandler.OutputToObjectConverter
<ImagePlus, ImagePlus, U> createObjectConverter
(Class<U> cls, Function<ROI, PathObject> creator) Create anOutputHandler.OutputToObjectConverter
for one specify type.createObjectConverter
(Function<ROI, PathObject> creator) Create anOutputHandler.OutputToObjectConverter
that attempts to convert a range of output types into objects.
-
Constructor Details
-
ImageJProcessor
public ImageJProcessor()
-
-
Method Details
-
createImagePlusImageSupplier
Create anImageSupplier
that returns an ImageJImagePlus
.- Returns:
-
createImagePlusMaskSupplier
Create aMaskSupplier
that returns an ImageJByteProcessor
.- Returns:
-
createDetectionOutputHandler
Create anOutputHandler
that attempts to convert the output into detection objects.- Returns:
-
createAnnotationOutputHandler
Create anOutputHandler
that attempts to convert the output into annotation objects.- Returns:
-
createAnnotationConverter
public static OutputHandler.OutputToObjectConverter<ImagePlus,ImagePlus, createAnnotationConverter()Object> Create anOutputHandler.OutputToObjectConverter
that attempts to convert the output into annotation objects.- Returns:
-
createDetectionConverter
public static OutputHandler.OutputToObjectConverter<ImagePlus,ImagePlus, createDetectionConverter()Object> Create anOutputHandler.OutputToObjectConverter
that attempts to convert the output into detection objects.- Returns:
-
createObjectConverter
public static OutputHandler.OutputToObjectConverter<ImagePlus,ImagePlus, createObjectConverterObject> (Function<ROI, PathObject> creator) Create anOutputHandler.OutputToObjectConverter
that attempts to convert a range of output types into objects.The behavior depends upon whatever the
Processor
return. For example, the converter is able to generate one or more objects from- an ImageJ
Roi
, or list or array ofRoi
objects - an ImageJ
Overlay
- a
BinaryProcessor
(creating a single object) - a
ByteProcessor
orShortProcessor
(treated as a labeled image, to create 0 or more objects) - another
ImageProcessor
with a threshold set (handled similar to a binary image) - an
ImagePlus
, after extracting theImageProcessor
- Parameters:
creator
- the creator function to determine the type of object (e.g. detection, annotation)- Returns:
- the converter
- an ImageJ
-
createObjectConverter
public static <U> OutputHandler.OutputToObjectConverter<ImagePlus,ImagePlus, createObjectConverterU> (Class<U> cls, Function<ROI, PathObject> creator) Create anOutputHandler.OutputToObjectConverter
for one specify type. See #createObjectConverter(Function) for more details; this method reduces ambiguity by handling only one possible kind of output.- Type Parameters:
U
-- Parameters:
cls
- the class to handlecreator
- the creator function to determine the type of object (e.g. detection, annotation)- Returns:
- the converter
-
builder
public static PixelProcessor.Builder<ImagePlus,ImagePlus, builderObject> (Processor<ImagePlus, ImagePlus, Object> processor) Create aPixelProcessor.Builder
for an ImageJImagePlus
. By default, this will attempt to convert any output to detection objects - but the builder may be further customized to override this behavior before building the processor.- Parameters:
processor
-- Returns:
-