Package qupath.imagej.gui.scripts
Class ImageJScriptRunner.ImageJScriptParameters
java.lang.Object
qupath.imagej.gui.scripts.ImageJScriptRunner.ImageJScriptParameters
- Enclosing class:
ImageJScriptRunner
Class to store parameters used to run ImageJ macros or scripts from QuPath.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Query whether the script should be logged in the history of the ImageData.boolean
Request that any lingering open images are closed after the script has run.boolean
Query whether child objects should be removed from the parent object after the script is complete.boolean
Query whether the Overlay should be set when an image is passed to ImageJ.boolean
doSetRoi()
Query whether the Roi should be set when an image is passed to ImageJ.Get a function to convert an ImageJ active Roi into a QuPath object.Get the objects to which this script should be applied.Get the calculator used to determine how much to downsample image regions that will be send to ImageJ.Get a function to convert an ImageJ Roi on an Overlay into a QuPath object.int
Get the padding to add around the ROI.Get the name of the script engine to use, or null if no script engine is specified.Get a task runner for running script tasks.getText()
Get the text of the macro or script.
-
Method Details
-
getChannels
-
getText
Get the text of the macro or script.- Returns:
-
getDownsample
Get the calculator used to determine how much to downsample image regions that will be send to ImageJ.- Returns:
-
getPadding
public int getPadding()Get the padding to add around the ROI.- Returns:
-
doSetRoi
public boolean doSetRoi()Query whether the Roi should be set when an image is passed to ImageJ. If true, the Roi represents the QuPath parent object.- Returns:
- See Also:
-
doSetOverlay
public boolean doSetOverlay()Query whether the Overlay should be set when an image is passed to ImageJ. If true, the Overlay contains any QuPath objects within the field of view being sent (excluding the parent object).- Returns:
- See Also:
-
doRemoveChildObjects
public boolean doRemoveChildObjects()Query whether child objects should be removed from the parent object after the script is complete.This is useful when adding new objects from the ImageJ Roi or Overlay, to ensure that existing objects are removed first.
- Returns:
-
doAddToWorkflow
public boolean doAddToWorkflow()Query whether the script should be logged in the history of the ImageData.This is useful if the macro should be run as part of a batch processing script in the future.
- Returns:
-
doCloseOpenImages
public boolean doCloseOpenImages()Request that any lingering open images are closed after the script has run.- Returns:
-
getScriptEngineName
Get the name of the script engine to use, or null if no script engine is specified.By default, it is assumed that any script represents an ImageJ macro. However, it is possible to use other JSR 223 script engines, if available.
- Returns:
-
getApplyToObjects
Get the objects to which this script should be applied. By default this isImageJScriptRunner.ApplyToObjects.SELECTED
, but it is possible to request that the script is always applied to objects of a specific type.- Returns:
-
getTaskRunner
Get a task runner for running script tasks. Note that this is a transient property - it is not retained if the parameters are saved.- Returns:
-
getActiveRoiToObjectFunction
Get a function to convert an ImageJ active Roi into a QuPath object.Note that only one Roi may be active at the end of the script. If multiple Rois need to be returned, these should be added to an Overlay instead.
- Returns:
- See Also:
-
getOverlayRoiToObjectFunction
Get a function to convert an ImageJ Roi on an Overlay into a QuPath object.- Returns:
- See Also:
-