Class SplitAnnotationsPlugin<T>

java.lang.Object
qupath.lib.plugins.AbstractPlugin<T>
qupath.lib.plugins.AbstractInteractivePlugin<T>
qupath.lib.plugins.objects.SplitAnnotationsPlugin<T>
Type Parameters:
T -
All Implemented Interfaces:
PathInteractivePlugin<T>, PathPlugin<T>

public class SplitAnnotationsPlugin<T> extends AbstractInteractivePlugin<T>
Plugin to create new annotations by expanding the size of existing annotations.
Author:
Pete Bankhead
  • Constructor Details

    • SplitAnnotationsPlugin

      public SplitAnnotationsPlugin()
  • Method Details

    • getSupportedParentObjectClasses

      public Collection<Class<? extends PathObject>> 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:
    • getName

      public String 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

      public String 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

      public String 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:
    • getDefaultParameterList

      public ParameterList getDefaultParameterList(ImageData<T> imageData)
      Returns an empty ParameterList.
      Specified by:
      getDefaultParameterList in interface PathInteractivePlugin<T>
      Specified by:
      getDefaultParameterList in class AbstractInteractivePlugin<T>
      Parameters:
      imageData -
      Returns:
    • getParentObjects

      protected Collection<? extends PathObject> getParentObjects(ImageData<T> imageData)
      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 class AbstractPlugin<T>
      Parameters:
      imageData -
      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 class AbstractPlugin<T>
      Parameters:
      imageData -
      parentObject -
      tasks -
    • getTasks

      protected Collection<Runnable> getTasks(ImageData<T> imageData)
      Description copied from class: AbstractPlugin
      Get a collection of tasks to perform. This will be called from AbstractPlugin.runPlugin(TaskRunner, ImageData, String) after a call to AbstractPlugin.parseArgument(ImageData, String). The default implementation simply calls AbstractPlugin.getParentObjects(ImageData), then AbstractPlugin.addRunnableTasks(ImageData, PathObject, List) for every parent object that was returned.
      Overrides:
      getTasks in class AbstractPlugin<T>
      Parameters:
      imageData -
      Returns: