Package qupath.lib.classifiers.pixel
Interface PixelClassifier
public interface PixelClassifier
Interface defining a pixel classifier.
 
Pixel classifiers can be applied directly to an image, typically using colors and textures.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringDefault location to use when storing object classifiers in a project.
- 
Method SummaryModifier and TypeMethodDescriptionapplyClassification(ImageData<BufferedImage> server, RegionRequest request) Apply pixel classifier to a specified region of an image.Get metadata that describes how the classifier should be called, and the kind of output it provides.booleansupportsImage(ImageData<BufferedImage> imageData) Query whether the classifier supports a particular image.
- 
Field Details- 
PROJECT_LOCATIONDefault location to use when storing object classifiers in a project.- See Also:
 
 
- 
- 
Method Details- 
supportsImageQuery whether the classifier supports a particular image. It may not if the number of channels (for example) is incompatible.- Parameters:
- imageData-
- Returns:
 
- 
applyClassificationBufferedImage applyClassification(ImageData<BufferedImage> server, RegionRequest request) throws IOException Apply pixel classifier to a specified region of an image.An ImageDataandRegionRequestare supplied, rather than aBufferedImagedirectly, because there may be a need to adapt to the image resolution and/or incorporate padding to reduce boundary effects.There is no guarantee that the returned BufferedImagewill be the same size as the input region (after downsampling), but rather that it should contain the full classification information for the specified region.Practically, this means that there may be fewer pixels in the output because the classification inherently involves downsampling. - Parameters:
- server-
- request-
- Returns:
- a BufferedImagerepresenting the pixel classifications as separate bands.
- Throws:
- IOException- if unable to read pixels from- server
 
- 
getMetadataPixelClassifierMetadata getMetadata()Get metadata that describes how the classifier should be called, and the kind of output it provides.- Returns:
 
 
-