Package qupath.lib.scripting
Class ScriptParameters.Builder
java.lang.Object
qupath.lib.scripting.ScriptParameters.Builder
- Enclosing class:
ScriptParameters
Builder class for
ScriptParameters
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theScriptParameters
with the current options.doUpdateHierarchy
(boolean requestUpdate) Optionally request a hierarchy update event after running a script (default is true for scripts that operate on image data).Set optional string args to pass to the script.setBatchIndex
(int ind) Set the current image index for batch processing (default is 0).setBatchSaveResult
(boolean doSave) Specify whether the script that is running should save results or not.setBatchSize
(int batch) Set the batch size for batch processing (default is 1).setDefaultImports
(Collection<Class<?>> imports) setDefaultStaticImports
(Collection<Class<?>> imports) setErrorWriter
(Writer writer) Set the main error writer.setImageData
(ImageData<?> imageData) Set the current image data for the script.setProject
(Project<?> project) Set the current project for the script.Set the output and error writers to useSystem.out
andSystem.err
.Set the main output writer.useCompiled
(boolean useCompiled) Request that the script is compiled before being evaluated, or a previously compiled version is used where available.Set the output and error writers to append to the default logger.useLogWriters
(org.slf4j.Logger logger) Set the output and error writers to append to the specified logger.
-
Method Details
-
setDefaultImports
-
setDefaultStaticImports
-
setFile
-
setScript
-
setSystemWriters
Set the output and error writers to useSystem.out
andSystem.err
.- Returns:
-
useLogWriters
Set the output and error writers to append to the specified logger.- Parameters:
logger
-- Returns:
-
useLogWriters
Set the output and error writers to append to the default logger.- Returns:
-
setWriter
Set the main output writer.- Parameters:
writer
-- Returns:
-
setErrorWriter
Set the main error writer.- Parameters:
writer
-- Returns:
-
setBatchSize
Set the batch size for batch processing (default is 1).- Parameters:
batch
-- Returns:
-
setBatchIndex
Set the current image index for batch processing (default is 0).- Parameters:
ind
-- Returns:
-
setBatchSaveResult
Specify whether the script that is running should save results or not.- Parameters:
doSave
-- Returns:
-
setArgs
Set optional string args to pass to the script.- Parameters:
args
-- Returns:
-
setProject
Set the current project for the script.- Parameters:
project
-- Returns:
-
setImageData
Set the current image data for the script.- Parameters:
imageData
-- Returns:
-
doUpdateHierarchy
Optionally request a hierarchy update event after running a script (default is true for scripts that operate on image data).- Parameters:
requestUpdate
-- Returns:
-
useCompiled
Request that the script is compiled before being evaluated, or a previously compiled version is used where available.- Parameters:
useCompiled
-- Returns:
-
build
Build theScriptParameters
with the current options.- Returns:
- Throws:
IllegalArgumentException
- if neither file nor script are set
-