Interface QuPathExtension

All Known Implementing Classes:
BioFormatsOptionsExtension, IJExtension, OpenSlideExtension, ProcessingExtension, RichScriptEditorExtension, SvgExtension

public interface QuPathExtension
Simple interface for QuPath extensions.

This allows dynamic discovery of new extensions.

  • Method Summary

    Modifier and Type
    Method
    Description
    A short description of the extension for displaying in the main GUI.
    A readable name for the extension.
    default Version
    Get a QuPath version for which this extension was written.
    default Version
    Get the version of the current extension.
    void
    Install the extension for a QuPathGUI instance.
    default void
    Install the extension in headless mode.
  • Method Details

    • installExtension

      void installExtension(QuPathGUI qupath)
      Install the extension for a QuPathGUI instance. This function is only called if the graphical user interface is used.

      This generally involves adding new commands to appropriate menus.

      Note that if an extension is only expected to be compatible with a specific QuPath version, this method provides an opportunity to test version compatibility before making any changes.

      See installHeadless() for installing the extension in headless mode.

      Parameters:
      qupath -
      See Also:
      Implementation Note
      When multiple extensions are present, the order in which they will be installed is undefined.
    • installHeadless

      default void installHeadless()
      Install the extension in headless mode. This function is only called if QuPath is run without the user interface.

      See installExtension(QuPathGUI) for installing the extension when the graphical user interface is used.

      Implementation Note
      When multiple extensions are present, the order in which they will be installed is undefined.
    • getName

      String getName()
      A readable name for the extension.
      Returns:
    • getDescription

      String getDescription()
      A short description of the extension for displaying in the main GUI.

      This could also contain licensing information.

      Returns:
    • getQuPathVersion

      default Version getQuPathVersion()
      Get a QuPath version for which this extension was written.

      This is used to provide an explanation if the extension could not be loaded. It has a default implementation that returns Version.UNKNOWN to allow backwards compatibility, however it strongly recommended to return the actual QuPath version against which the extension was developed and tested.

      Returns:
      a semantic version corresponding to a QuPath version, e.g. "0.3.0".
      See Also:
    • getVersion

      default Version getVersion()
      Get the version of the current extension.
      Returns:
      See Also:
      Implementation Note
      the default implementation looks for any package version associated with the implementing class, returning Version.UNKNOWN if none can be found.