Class SLICSuperpixelsPlugin
- All Implemented Interfaces:
PathInteractivePlugin<BufferedImage>
,PathPlugin<BufferedImage>
This largely follows the description at:
Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine SüsstrunkIt doesn't follow the code made available by the authors, and differs in some details.
SLIC Superpixels Compared to State-of-the-art Superpixel Methods
IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, num. 11, p. 2274 - 2282, May 2012.
For example, the 'spacing' parameter is also used to determine the resolution at which the superpixel computation is performed, and a Gaussian filter is used to help reduce textures in advance. It is also possible to use color deconvolved images, rather than transforming RGB to CIELAB.
- Author:
- Pete Bankhead
-
Field Summary
Fields inherited from class qupath.lib.plugins.AbstractInteractivePlugin
params
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectDetector
<BufferedImage> createDetector
(ImageData<BufferedImage> imageData, ParameterList params) Create a new ObjectDetector, compatible with the specified ImageData and ParameterList.getDefaultParameterList
(ImageData<BufferedImage> imageData) This should return a default ParameterList containing any information that is needed to repeat the task exactly.Get a brief description of the plugin's purpose & operation.(Optional) short one-line description of the results, e.g.getName()
Get the name of the plugin for display.protected Collection
<? extends PathObject> getParentObjects
(ImageData<BufferedImage> imageData) Get all selected objects that are instances of a supported class.protected double
getPreferredPixelSizeMicrons
(ImageData<BufferedImage> imageData, ParameterList params) Get the preferred pixel size that would be used for the specified ImageData and ParameterList.protected int
getTileOverlap
(ImageData<BufferedImage> imageData, ParameterList params) Get an appropriate overlap, in pixels, if analysis of the specified ImageData will be tiled.Methods inherited from class qupath.lib.plugins.AbstractTileableDetectionPlugin
addRunnableTasks
Methods inherited from class qupath.lib.plugins.AbstractDetectionPlugin
getSupportedParentObjectClasses
Methods inherited from class qupath.lib.plugins.AbstractInteractivePlugin
alwaysPromptForObjects, getLoggableParameters, getParameterList, parseArgument
Methods inherited from class qupath.lib.plugins.AbstractPlugin
addWorkflowStep, getTasks, postprocess, preprocess, rearrangeByStride, requestHierarchyUpdate, runPlugin
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface qupath.lib.plugins.PathPlugin
runPlugin
-
Constructor Details
-
SLICSuperpixelsPlugin
public SLICSuperpixelsPlugin()
-
-
Method Details
-
getName
Description copied from interface:PathPlugin
Get the name of the plugin for display.This should be descriptive and, above all, short - as it may be used for menu item names & dialog box titles.
- Returns:
-
getLastResultsDescription
Description copied from interface:PathPlugin
(Optional) short one-line description of the results, e.g. to say how many objects detected. GUIs may choose to display this on a label during interactive processing.- Returns:
-
getPreferredPixelSizeMicrons
protected double getPreferredPixelSizeMicrons(ImageData<BufferedImage> imageData, ParameterList params) Description copied from class:AbstractTileableDetectionPlugin
Get the preferred pixel size that would be used for the specified ImageData and ParameterList.This is useful in deciding whether to break large regions into smaller, parallelizable tiles.
- Specified by:
getPreferredPixelSizeMicrons
in classAbstractTileableDetectionPlugin<BufferedImage>
- Parameters:
imageData
-params
-- Returns:
-
createDetector
protected ObjectDetector<BufferedImage> createDetector(ImageData<BufferedImage> imageData, ParameterList params) Description copied from class:AbstractTileableDetectionPlugin
Create a new ObjectDetector, compatible with the specified ImageData and ParameterList.- Specified by:
createDetector
in classAbstractTileableDetectionPlugin<BufferedImage>
- Parameters:
imageData
-params
-- Returns:
-
getTileOverlap
Description copied from class:AbstractTileableDetectionPlugin
Get an appropriate overlap, in pixels, if analysis of the specified ImageData will be tiled.If the overlap is 0, then tile boundaries are likely to be visible in the results.
If the overlap is > 0, then the overlap should also be > the expected largest size of a detected object - otherwise objects may be lost of trimmed when overlaps are resolved. This is because (currently) the resolution of overlapping detections involves taking the largest one, rather than (for example) merging them.
(Merging may be permitted in later versions, but only where measurements are not made by the plugin - since merged objects may require different measurements, e.g. for area or mean than can be easily computed in a general way from the individual objects being merged).
- Specified by:
getTileOverlap
in classAbstractTileableDetectionPlugin<BufferedImage>
- Parameters:
imageData
-params
-- Returns:
- The overlap size in pixels, or 0 if overlapped tiles are not supported.
-
getDefaultParameterList
Description copied from class:AbstractInteractivePlugin
This should return a default ParameterList containing any information that is needed to repeat the task exactly.- Specified by:
getDefaultParameterList
in interfacePathInteractivePlugin<BufferedImage>
- Specified by:
getDefaultParameterList
in classAbstractInteractivePlugin<BufferedImage>
- Parameters:
imageData
-- Returns:
-
getDescription
Description copied from interface:PathPlugin
Get a brief description of the plugin's purpose & operation.If no description is provided, this may return null.
- Returns:
-
getParentObjects
Description copied from class:AbstractDetectionPlugin
Get all selected objects that are instances of a supported class.- Overrides:
getParentObjects
in classAbstractDetectionPlugin<BufferedImage>
- Parameters:
imageData
-- Returns:
-