Class ScriptAttributes

java.lang.Object
qupath.lib.scripting.ScriptAttributes

public class ScriptAttributes extends Object
Default attributes that can be set when running scripts. Script implementations should try to set these where possible using ScriptParameters.

The intention is that, where supported, scripts can then access the information, e.g. for Groovy


 var filePath = getProperty(ScriptAttributes.FILE_PATH)
 
Since:
v0.4.0
Author:
Pete Bankhead
  • Field Details

    • ARGS

      public static final String ARGS
      Optional string args passed to the script.
      See Also:
    • FILE_PATH

      public static final String FILE_PATH
      File path of the running script file.
      See Also:
    • BATCH_SIZE

      public static final String BATCH_SIZE
      Size of the current batch processing batch. Running a single script in isolation should be seen as batch processing with a batch size of 1.
      See Also:
    • BATCH_INDEX

      public static final String BATCH_INDEX
      Index of the current run when batch processing (starting at 0).
      See Also:
    • BATCH_LAST

      public static final String BATCH_LAST
      Boolean flag to indicate if the current script is the last in a batch.
      See Also:
    • BATCH_SAVE

      public static final String BATCH_SAVE
      Boolean flag to indicate whether changes to the image data should automatically be saved.
      See Also:
  • Constructor Details

    • ScriptAttributes

      public ScriptAttributes()