Package qupath.lib.gui.extensions
Interface QuPathExtension
public interface QuPathExtension
Simple interface for QuPath extensions.
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 qupath.lib.common.VersionGet a QuPath version for which this extension was written.default qupath.lib.common.VersionGet the version of the current extension.voidinstallExtension(QuPathGUI qupath) Install the extension for a QuPathGUI instance.
-
Method Details
-
installExtension
Install the extension for a QuPathGUI instance.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.
- Parameters:
qupath-- See Also:
- 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 qupath.lib.common.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.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
default qupath.lib.common.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.UNKNOWNif none can be found.
-