Skip to content

Commit 97f7de5

Browse files
committed
ScriptingInFiji: make various minor improvements
1 parent a747966 commit 97f7de5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎docs/ops/doc/ScriptingInFiji.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Scripts provide a simple, familiar interface for accessing SciJava Ops and allow
44

55
## Obtaining an OpEnvironment
66

7-
To run Ops we always start with an `OpEnvironment`. The easiest way to obtain an `OpEnvironment` with all available Ops is to declare an `OpEnvironment` as a [script parameter](https://imagej.net/scripting/parameters):
7+
To run Ops we always start with an `OpEnvironment`. Within Fiji, the easiest way to obtain an `OpEnvironment` is to declare it as a [script parameter](https://imagej.net/scripting/parameters):
88

99
```text
1010
#@ OpEnvironment ops
1111
```
1212

1313
## Setting inputs and outputs
1414

15-
A good starting point is to declare script parameters that match your desired Op's parameters. When performing image processing we are modifying an existing image, so we also want to create an output image in the script so our result will be shown. The following lines use SciJava's script parameters to obtain the active image as an input along with a user-defined sigma, while establishing our output.
15+
A good starting point is to declare script parameters that match your desired Op's parameters. When performing image processing, we are operating on an existing image; we also want to create an output image in the script so that our result will be shown. The following lines use SciJava script parameters to obtain the active image as an input along with a user-defined sigma, while establishing our output.
1616

1717
```text
1818
#@ Img imgInput
@@ -22,14 +22,14 @@ A good starting point is to declare script parameters that match your desired Op
2222

2323
## Calling Ops
2424

25-
The [OpBuilder syntax](CallingOps) should be used to retrieve and execute Ops from the `OpEnvironment`. The following line executes a Gaussian Blur on an input image using a `filter.gauss` Op:
25+
The [OpBuilder syntax](CallingOps) should be used to retrieve and execute Ops from the `OpEnvironment`. The following line executes a Gaussian blur on an input image using a `filter.gauss` Op:
2626
```text
2727
out = ops.op("filter.gauss").input(imgInput, sigma).apply()
2828
```
2929

3030
## Putting it all together
3131

32-
The below script can be pasted into the Script Editor. **Ensure that the Script Editor is configured to run a Groovy script**.
32+
The below script can be pasted into the Script Editor. **Ensure that the Script Editor is configured to run a Groovy script** (*Language → Groovy* in the Script Editor menu).
3333

3434
```text
3535
#@ OpEnvironment ops
@@ -43,10 +43,10 @@ out = ops.op("filter.gauss").input(imgInput, sigma).apply()
4343

4444
## Add your Op to the menu
4545

46-
If you want to re-use an Op outside of the script editor: good news! All SciJava scripts are ImageJ plugins and can be [installed](https://imagej.net/plugins/index#installing-plugins-manually) into your Fiji installation. For example, if we create a new `Ops` folder in our `Fiji.app/plugins/` directory and save our script there as `FilterGauss_.groovy` (or similar - just don't forget the `_`!) then after re-starting Fiji we can run our Op from the `Plugins > Ops` menu, and it will also show up in the [search bar](https://imagej.net/learn/#the-search-bar).
46+
If you want to reuse an Op outside of the script editor: good news! All SciJava scripts are runnable as ImageJ commands, and can be [installed](https://imagej.net/plugins/index#installing-plugins-manually) into your Fiji installation. For example, suppose we create new nested folders in our `Fiji.app/scripts` directory: first a `Plugins` folder (if it does not already exist), and then inside of that, a new `Ops` folder. If we then save our script there as `Filter_Gauss.groovy` (or similar—just don't forget the `_`!) then after re-starting Fiji we can run our Op from the *Plugins → Ops* menu, which matches the folder structure we created. The command will also be accessible from the [search bar](https://imagej.net/learn/#the-search-bar).
4747

4848
## Next steps
4949

5050
Check out the How-To Guides for important information like how to [explore the available Ops](SearchingForOps).
5151

52-
Check out some examples such as [image deconvolution](examples/deconvolution.rst) or [FLIM analysis](examples/flim_analysis.rst) to see more complete cases of Ops being used in the Script editor!
52+
Check out some examples such as [image deconvolution](examples/deconvolution.rst) or [FLIM analysis](examples/flim_analysis.rst) to see more complete cases of Ops being used in the Script Editor!

0 commit comments

Comments
 (0)