Package qupath.imagej.gui
Class IJExtension
java.lang.Object
qupath.imagej.gui.IJExtension
- All Implemented Interfaces:
- QuPathExtension
QuPath extension & associated static helper methods used to support integration of ImageJ with QuPath.
- 
Property SummaryPropertiesTypePropertyDescriptionstatic StringPropertyProperty representing the path to a local ImageJ installation, or null if no path has been set.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classCommands to install with the ImageJ extension.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic OverlayextractOverlay(PathObjectHierarchy hierarchy, RegionRequest request, OverlayOptions options, Predicate<PathObject> filter) Extract an ImageJ overlay for the specified region.extractROI(ImageServer<BufferedImage> server, PathObject pathObject, RegionRequest request, boolean setROI) Similar toextractROI(ImageServer, ROI, RegionRequest, boolean), except that the title of the ImagePlus is set according to the parent object type (which is used to get the ROI).extractROI(ImageServer<BufferedImage> server, ROI pathROI, RegionRequest request, boolean setROI) Extract a region of interest from an image as an ImageJ ImagePlus.extractROIWithOverlay(ImageServer<BufferedImage> server, PathObject pathObject, PathObjectHierarchy hierarchy, RegionRequest request, boolean setROI, OverlayOptions options) Extract an image region as an ImagePlus, optionally setting ImageJ Rois corresponding to QuPath objects.A short description of the extension for displaying in the main GUI.static ImagegetImageJIcon(int width, int height) Try to read the ImageJ icon from its jar.static ImageJGet an instance of ImageJ, or start one, for interactive use (with GUI displayed).static StringGet the path for a local ImageJ installation, if set.getName()A readable name for the extension.Returns the version stored within this jar, because it is matched to the QuPath version.static StringPropertyProperty representing the path to a local ImageJ installation, or null if no path has been set.voidinstallExtension(QuPathGUI qupath) Install the extension for a QuPathGUI instance.static voidsetImageJPath(String path) Set the path for a local ImageJ installation, if required.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.lib.gui.extensions.QuPathExtensiongetVersion
- 
Property Details- 
imageJPathProperty representing the path to a local ImageJ installation, or null if no path has been set.- See Also:
 
 
- 
- 
Constructor Details- 
IJExtensionpublic IJExtension()
 
- 
- 
Method Details- 
setImageJPathSet the path for a local ImageJ installation, if required. This can be used to help load external ImageJ plugins.- Parameters:
- path-
 
- 
getImageJPathGet the path for a local ImageJ installation, if set.- Returns:
 
- 
imageJPathPropertyProperty representing the path to a local ImageJ installation, or null if no path has been set.- Returns:
- See Also:
 
- 
getImageJInstanceGet an instance of ImageJ, or start one, for interactive use (with GUI displayed).- Returns:
- an ImageJ instance, or null if ImageJ could not be started
 
- 
extractROIpublic static PathImage<ImagePlus> extractROI(ImageServer<BufferedImage> server, ROI pathROI, RegionRequest request, boolean setROI) throws IOException Extract a region of interest from an image as an ImageJ ImagePlus.- Parameters:
- server- the image
- pathROI-
- request-
- setROI- true if a ROI should be converted to the closest matching ImageJ- Roi& set on the image, false otherwise
- Returns:
- an ImagePluswrapped in aPathImageto give additional calibration information
- Throws:
- IOException
 
- 
extractROIpublic static PathImage<ImagePlus> extractROI(ImageServer<BufferedImage> server, PathObject pathObject, RegionRequest request, boolean setROI) throws IOException Similar toextractROI(ImageServer, ROI, RegionRequest, boolean), except that the title of the ImagePlus is set according to the parent object type (which is used to get the ROI). Specifically, if a TMA core is passed as a parent, then the core name will be included in the title.- Parameters:
- server-
- pathObject-
- request-
- setROI-
- Returns:
- Throws:
- IOException
- See Also:
 
- 
extractROIWithOverlaypublic static PathImage<ImagePlus> extractROIWithOverlay(ImageServer<BufferedImage> server, PathObject pathObject, PathObjectHierarchy hierarchy, RegionRequest request, boolean setROI, OverlayOptions options) throws IOException Extract an image region as an ImagePlus, optionally setting ImageJ Rois corresponding to QuPath objects.- Parameters:
- server- server from which pixels should be requested
- pathObject- the primary object, which may have its ROI set on the image
- hierarchy- object hierarchy containing objects whose ROIs should be added to the ImagePlus overlay
- request- the region being requested
- setROI- if true, the ROI of the pathObject will be set on the image as the 'main' ROI (i.e. not an overlay)
- options- options determining which kinds of objects will have ROIs added, to match with the display in the QuPath viewer
- Returns:
- Throws:
- IOException
 
- 
extractOverlaypublic static Overlay extractOverlay(PathObjectHierarchy hierarchy, RegionRequest request, OverlayOptions options, Predicate<PathObject> filter) Extract an ImageJ overlay for the specified region.- Parameters:
- hierarchy-
- request-
- options- options to control which objects are being displayed
- filter- optional additional filter used to determine which objects will be included (may be used in combination with options)
- Returns:
 
- 
getImageJIconTry to read the ImageJ icon from its jar.- Parameters:
- width-
- height-
- Returns:
 
- 
installExtensionDescription copied from interface:QuPathExtensionInstall 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. - Specified by:
- installExtensionin interface- QuPathExtension
- Parameters:
- qupath-
- See Also:
 
- 
getNameDescription copied from interface:QuPathExtensionA readable name for the extension.- Specified by:
- getNamein interface- QuPathExtension
- Returns:
 
- 
getDescriptionDescription copied from interface:QuPathExtensionA short description of the extension for displaying in the main GUI.This could also contain licensing information. - Specified by:
- getDescriptionin interface- QuPathExtension
- Returns:
 
- 
getQuPathVersionReturns the version stored within this jar, because it is matched to the QuPath version.- Specified by:
- getQuPathVersionin interface- QuPathExtension
- Returns:
- a semantic version corresponding to a QuPath version, e.g. "0.3.0".
- See Also:
 
 
-