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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this returns true, then a prompt is requested every time the command is run - even if there are valid parent objects already selected.abstract ParameterListgetDefaultParameterList(ImageData<T> imageData) This should return a default ParameterList containing any information that is needed to repeat the task exactly.protected ParameterListgetLoggableParameters(ImageData<T> imageData) Get a copy of the current parameter list (with empty parameters removed) suitable for logging.protected ParameterListgetParameterList(ImageData<T> imageData) Get a reference to a ParameterList stored internally, and which will be used for analysis.protected booleanparseArgument(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, runPluginMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.lib.plugins.PathInteractivePlugin
getSupportedParentObjectClassesMethods 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:
getDefaultParameterListin interfacePathInteractivePlugin<T>- Parameters:
imageData-- Returns:
-
alwaysPromptForObjects
public boolean alwaysPromptForObjects()Description copied from interface:PathInteractivePluginIf 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:
alwaysPromptForObjectsin 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:AbstractPluginParse 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:
parseArgumentin 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:
-