Interface QuPathExtension
- All Known Implementing Classes:
BioFormatsOptionsExtension, IJExtension, OpenSlideExtension, ProcessingExtension, RichScriptEditorExtension, SvgExtension
This allows dynamic discovery of new extensions.
-
Method Summary
Modifier and TypeMethodDescriptionA short description of the extension for displaying in the main GUI.getName()A readable name for the extension.default VersionGet a QuPath version for which this extension was written.default VersionGet the version of the current extension.voidinstallExtension(QuPathGUI qupath) Install the extension for a QuPathGUI instance.default voidInstall the extension in headless mode.
-
Method Details
-
installExtension
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
-
getDescription
String getDescription()A short description of the extension for displaying in the main GUI.This could also contain licensing information.
- Returns:
-
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.UNKNOWNto 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
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.UNKNOWNif none can be found.
-