Class ImageJScriptRunner.ImageJScriptParameters

java.lang.Object
qupath.imagej.gui.scripts.ImageJScriptRunner.ImageJScriptParameters
Enclosing class:
ImageJScriptRunner

public static class ImageJScriptRunner.ImageJScriptParameters extends Object
Class to store parameters used to run ImageJ macros or scripts from QuPath.
  • Method Details

    • getChannels

      public List<ColorTransforms.ColorTransform> getChannels()
    • getText

      public String getText()
      Get the text of the macro or script.
      Returns:
    • getDownsample

      public DownsampleCalculator 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

      public String 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

      public ImageJScriptRunner.ApplyToObjects getApplyToObjects()
      Get the objects to which this script should be applied. By default this is ImageJScriptRunner.ApplyToObjects.SELECTED, but it is possible to request that the script is always applied to objects of a specific type.
      Returns:
    • getTaskRunner

      public TaskRunner 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

      public Function<ROI,PathObject> 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

      public Function<ROI,PathObject> getOverlayRoiToObjectFunction()
      Get a function to convert an ImageJ Roi on an Overlay into a QuPath object.
      Returns:
      See Also: