Class AbstractInteractivePlugin<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
PathInteractivePlugin<T>
,PathPlugin<T>
- Direct Known Subclasses:
AbstractDetectionPlugin
,CoherenceFeaturePlugin
,DelaunayClusteringPlugin
,DilateAnnotationPlugin
,FillAnnotationHolesPlugin
,FindConvexHullDetectionsPlugin
,HaralickFeaturesPlugin
,IntensityFeaturesPlugin
,LocalBinaryPatternsPlugin
,RefineAnnotationsPlugin
,ShapeFeaturesPlugin
,SmoothFeaturesPlugin
,SplitAnnotationsPlugin
,SubcellularDetection
,TMADearrayerPluginIJ
- Author:
- Pete Bankhead
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If this returns true, then a prompt is requested every time the command is run - even if there are valid parent objects already selected.abstract ParameterList
getDefaultParameterList
(ImageData<T> imageData) This should return a default ParameterList containing any information that is needed to repeat the task exactly.protected ParameterList
getLoggableParameters
(ImageData<T> imageData) Get a copy of the current parameter list (with empty parameters removed) suitable for logging.protected ParameterList
getParameterList
(ImageData<T> imageData) Get a reference to a ParameterList stored internally, and which will be used for analysis.protected boolean
parseArgument
(ImageData<T> imageData, String arg) Parse the input argument, returning 'true' if the argument is valid and it's possible to run the plugin.Methods inherited from class qupath.lib.plugins.AbstractPlugin
addRunnableTasks, addWorkflowStep, getParentObjects, 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.PathInteractivePlugin
getSupportedParentObjectClasses
Methods inherited from interface qupath.lib.plugins.PathPlugin
getDescription, getLastResultsDescription, getName, runPlugin
-
Field Details
-
params
-
-
Constructor Details
-
AbstractInteractivePlugin
public AbstractInteractivePlugin()
-
-
Method Details
-
getDefaultParameterList
This should return a default ParameterList containing any information that is needed to repeat the task exactly.- Specified by:
getDefaultParameterList
in interfacePathInteractivePlugin<T>
- Parameters:
imageData
-- 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<T>
- Returns:
-
getParameterList
Get a reference to a ParameterList stored internally, and which will be used for analysis.If there is no list presently available, getDefaultParameterList will be called.
If there is a list available, it will be returned.
The reason for needing this in addition to getDefaultParameterList, is that parseArgument could modify the internal ParameterList that will actually be used, while getDefaultParameterList is useful when creating GUIs and ensuring that there is always a sensible starting point.
- Parameters:
imageData
- image data for which the parameters should be generated. This may influence which parameters are shown.- Returns:
-
parseArgument
Description copied from class:AbstractPlugin
Parse the input argument, returning 'true' if the argument is valid and it's possible to run the plugin.This is called from within runPlugin. If it returns 'true', getTasks will be called and then runTasks will submit these to the plugin runner to run. If it returns 'false', runPlugin will immediately abort and return false as well. Since this could result in some internal variables changed (e.g. a ParameterList), implementing classes can't be assumed to be thread-safe; plugins should be created and called from a single thread, although they may use multiple threads (via a PluginRunner) to complete their tasks.
- Specified by:
parseArgument
in classAbstractPlugin<T>
- Parameters:
imageData
-arg
-- Returns:
-
getLoggableParameters
Get a copy of the current parameter list (with empty parameters removed) suitable for logging. Subclasses might choose to append extra parameters here, which aren't part of the main list (e.g. because they shouldn't be included in any automatically created dialog box)- Parameters:
imageData
-- Returns:
-