Package qupath.lib.plugins.objects
Class SmoothFeaturesPlugin<T>
java.lang.Object
qupath.lib.plugins.AbstractPlugin<T>
qupath.lib.plugins.AbstractInteractivePlugin<T>
qupath.lib.plugins.objects.SmoothFeaturesPlugin<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
PathInteractivePlugin<T>
,PathPlugin<T>
Plugin to supplement the measurements for detection objects with the weighted sum of measurements
from nearby objects, using weights derived from a 2D Gaussian function.
This effectively adds in some contextual information.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRunnableTasks
(ImageData<T> imageData, PathObject parentObject, List<Runnable> tasks) For a specified parent object, generate a task to run.getDefaultParameterList
(ImageData<T> 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<T> 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.static void
smoothMeasurements
(List<PathObject> pathObjects, List<String> measurements, double fwhmPixels, String fwhmString, boolean withinClass, boolean useLegacyNames) Using the centroids of the ROIs within PathObjects, 'smooth' measurements by summing up the corresponding measurements of nearby objects, weighted by centroid distance.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
-
SmoothFeaturesPlugin
public SmoothFeaturesPlugin()Default constructor.
-
-
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:
-
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:
-
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:
-
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:
-
addRunnableTasks
protected void addRunnableTasks(ImageData<T> 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<T>
- Parameters:
imageData
-parentObject
-tasks
-
-
smoothMeasurements
public static void smoothMeasurements(List<PathObject> pathObjects, List<String> measurements, double fwhmPixels, String fwhmString, boolean withinClass, boolean useLegacyNames) Using the centroids of the ROIs within PathObjects, 'smooth' measurements by summing up the corresponding measurements of nearby objects, weighted by centroid distance.- Parameters:
pathObjects
-measurements
-fwhmPixels
-fwhmString
-withinClass
-useLegacyNames
-
-
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<T>
- Specified by:
getDefaultParameterList
in classAbstractInteractivePlugin<T>
- Parameters:
imageData
-- 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<T>
- Parameters:
imageData
-- Returns:
-