Package qupath.lib.algorithms
Class IntensityFeaturesPlugin
java.lang.Object
qupath.lib.plugins.AbstractPlugin<BufferedImage>
qupath.lib.plugins.AbstractInteractivePlugin<BufferedImage>
qupath.lib.algorithms.IntensityFeaturesPlugin
- All Implemented Interfaces:
PathInteractivePlugin<BufferedImage>
,PathPlugin<BufferedImage>
Plugin for calculating intensity-based features, including Haralick textures, within or around detections or tiles.
The ROIs of the detections can be used directly as masks, or else the textures can alternatively be calculated within square or circular regions around the object centroids. This latter option makes it possible to calculate a high density of tiles (for example), and then to compute textures at different resolutions independently of the tile size.
- Author:
- Pete Bankhead
-
Field Summary
Fields inherited from class qupath.lib.plugins.AbstractInteractivePlugin
params
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRunnableTasks
(ImageData<BufferedImage> imageData, PathObject parentObject, List<Runnable> tasks) For a specified parent object, generate a task to run.boolean
If this returns true, then a prompt is requested every time the command is run - even if there are valid parent objects already selected.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
<PathObject> getParentObjects
(ImageData<BufferedImage> imageData) Get a collection of objects to process, based on the contents of the PluginRunner.Collection
<Class<? extends PathObject>> Get a collection of possible parent objects that the plugin could have.boolean
runPlugin
(TaskRunner taskRunner, ImageData<BufferedImage> imageData, String arg) Run the plugin.Methods inherited from class qupath.lib.plugins.AbstractInteractivePlugin
getLoggableParameters, getParameterList, parseArgument
Methods inherited from class qupath.lib.plugins.AbstractPlugin
addWorkflowStep, getTasks, postprocess, preprocess, rearrangeByStride, requestHierarchyUpdate
-
Constructor Details
-
IntensityFeaturesPlugin
public IntensityFeaturesPlugin()
-
-
Method Details
-
runPlugin
Description copied from interface:PathPlugin
Run the plugin. A PluginRunner may be provided that this plugin can use to update the user on its progress.Note: This command should block until it has completed processing.
- Specified by:
runPlugin
in interfacePathPlugin<BufferedImage>
- Overrides:
runPlugin
in classAbstractPlugin<BufferedImage>
- Parameters:
taskRunner
-arg
-- Returns:
-
addRunnableTasks
protected void addRunnableTasks(ImageData<BufferedImage> imageData, PathObject parentObject, List<Runnable> tasks) Description copied from class:AbstractPlugin
For a specified parent object, generate a task to run. In practice, this method can be overridden to return anything/nothing if getTasks is overridden instead.- Specified by:
addRunnableTasks
in classAbstractPlugin<BufferedImage>
- Parameters:
imageData
-parentObject
-tasks
-
-
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:
-
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:
-
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:AbstractPlugin
Get a collection of objects to process, based on the contents of the PluginRunner. This could (for example) return the selected object, the root object, all detection objects... depending upon what the plugin does. Each object this returns will be passed to addRunnableTasks to create a task to run. In practice, this method can be overridden to return anything/nothing if getTasks is overridden instead.- Specified by:
getParentObjects
in classAbstractPlugin<BufferedImage>
- Parameters:
imageData
-- Returns:
-
getSupportedParentObjectClasses
Description copied from interface:PathInteractivePlugin
Get a collection of possible parent objects that the plugin could have. This may be used, for example, to specified that analysis may be applied to any/all TMA cores or annotations. If no parent objects are required, PathRootObject.class should be returned in the list.- Returns:
-
alwaysPromptForObjects
public boolean alwaysPromptForObjects()Description copied from interface:PathInteractivePlugin
If this returns true, then a prompt is requested every time the command is run - even if there are valid parent objects already selected.- Specified by:
alwaysPromptForObjects
in interfacePathInteractivePlugin<BufferedImage>
- Overrides:
alwaysPromptForObjects
in classAbstractInteractivePlugin<BufferedImage>
- Returns:
-