Package qupath.imagej.gui.scripts
Class ImageJScriptRunner
java.lang.Object
qupath.imagej.gui.scripts.ImageJScriptRunner
Class to run ImageJ macros and scripts.
- Since:
- v0.6.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the objects that the script should be applied to.static classstatic classClass to store parameters used to run ImageJ macros or scripts from QuPath.static enum
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ImageJScriptRunner.Builderbuilder()Create a new builder for an instance ofImageJScriptRunner.static ImageJScriptRunner.BuilderCreate a new builder for an instance ofImageJScriptRunner, initializing using the provided parameters.static PathObjectstatic ImageJScriptRunnerCreate a script runner from a JSON representation ofImageJScriptRunner.ImageJScriptParameters.static ImageJScriptRunnerCreate a script runner from a map representation ofImageJScriptRunner.ImageJScriptParameters.static ImageJScriptRunnerCreate a script runner from the specified parameters.static List<PathObject> getObjectsToProcess(PathObjectHierarchy hierarchy, ImageJScriptRunner.ApplyToObjects applyTo) Query which objects in a hierarchy would be used with the specifiedImageJScriptRunner.ApplyToObjectsvalue.static voidExample program to log a script.voidrun()Run the script for the 'current' image data, as requested fromQP.voidrun(ImageData<BufferedImage> imageData) Run the script for the specified image data.voidtest()Test the script for the 'current' image data, as requested fromQP.voidtest(ImageData<BufferedImage> imageData) Test the script for the specified image data.
- 
Constructor Details- 
ImageJScriptRunner
 
- 
- 
Method Details- 
fromParamsCreate a script runner from the specified parameters.- Parameters:
- params-
- Returns:
 
- 
fromJsonCreate a script runner from a JSON representation ofImageJScriptRunner.ImageJScriptParameters.- Parameters:
- json-
- Returns:
 
- 
fromMapCreate a script runner from a map representation ofImageJScriptRunner.ImageJScriptParameters.This method is mostly available for convenience when writing a Groovy script. - Parameters:
- paramMap-
- Returns:
 
- 
runpublic void run()Run the script for the 'current' image data, as requested fromQP.- See Also:
 
- 
runRun the script for the specified image data.- See Also:
 
- 
testpublic void test()Test the script for the 'current' image data, as requested fromQP.- See Also:
 
- 
testTest the script for the specified image data.Testing will run the script for no more than one parent object, and show the images within ImageJ. This is different from calling run(ImageData), which can process multiple parent objects and does not show images by default.- See Also:
 
- 
getObjectsToProcesspublic static List<PathObject> getObjectsToProcess(PathObjectHierarchy hierarchy, ImageJScriptRunner.ApplyToObjects applyTo) Query which objects in a hierarchy would be used with the specifiedImageJScriptRunner.ApplyToObjectsvalue.- Parameters:
- hierarchy-
- applyTo-
- Returns:
- a list of all objects that are compatible with the type
 
- 
mainExample program to log a script.- Parameters:
- args-
 
- 
createDetectionOrPointAnnotationFunction to create an annotation object from anyPointsROI, and detection object from any otherROI.- Parameters:
- roi- the input ROI (must not be null)
- Returns:
- a new object with the specified ROI
 
- 
builderCreate a new builder for an instance ofImageJScriptRunner.- Returns:
 
- 
builderCreate a new builder for an instance ofImageJScriptRunner, initializing using the provided parameters.- Returns:
 
 
-