Skip to content

Commit f2f193c

Browse files
committed
SearchingForOps: make various minor improvements
1 parent 97f7de5 commit f2f193c

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

docs/ops/doc/SearchingForOps.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Searching for Ops in the Environment
22

3-
The first step when workin with Ops is always to obtain an `OpEnvironment`: your gateway to all Ops functionality.
3+
The first step when working with Ops is always to obtain an `OpEnvironment`: your gateway to all Ops functionality.
44

55
If you're working in a [Fiji script](ScriptingInFiji) then this is done with a script parameter:
66

@@ -15,17 +15,17 @@ import org.scijava.ops.api.OpEnvironment
1515
ops = OpEnvironment.build()
1616
```
1717

18-
Typically we would only want to do this once per application, to avoid diverging environments and recurring the performance cost of the build. All code examples in this section will assume we have created an `OpEnvironment` named `ops`.
18+
Typically we would only want to do this once per application, to avoid diverging environments and reincurring the performance cost of the build. All code examples in this section will assume we have created an `OpEnvironment` named `ops`.
1919

2020
As the `OpEnvironment` is fully extensible, different `OpEnvironment`s might contain different Ops, so it is important to be able to query an `OpEnvironment` about its available Ops. We also need to be able to get information about the usage of these Ops, to know what parameters may be required.
2121

2222
The `OpEnvironment.help()` API is your window into the `OpEnvironment`. In the following sections we cover the different types of information that can be obtained. **Note that the exact printouts from the help API may be different from the Ops available in *your* environment**.
2323

2424
## Listing Namespaces
2525

26-
The no-argument method `OpEnvironment.help()` is designed to give you a broad overview over the *categories* (namespaces) of Ops available within the `OpEnvironment`:
26+
The no-argument method `ops.help()` is designed to give you a broad overview over the *categories* (namespaces) of Ops available within the `OpEnvironment`:
2727

28-
```
28+
```python
2929
print(ops.help())
3030
```
3131

@@ -64,7 +64,8 @@ These namespace categories can then be interrogated further to explore the parti
6464
## Querying a Namespace
6565

6666
You can choose one of the above namespaces, and `ops.help()` will give you information about the algorithms contained within:
67-
```
67+
68+
```python
6869
print(ops.help("filter"))
6970
```
7071

@@ -111,9 +112,9 @@ Names:
111112

112113
## Querying Op Signatures
113114

114-
Finally, you can use `OpEnvironment.help()` on any Op name to see the list of signatures:
115+
Finally, you can use `ops.help()` on any Op name to see the list of signatures:
115116

116-
```
117+
```python
117118
print(ops.help("filter.gauss"))
118119
```
119120

@@ -127,7 +128,7 @@ filter.gauss:
127128

128129
## In-depth Op Information
129130

130-
The basic descriptions from `OpEnvironment.help()` are intentionally simplified to avoid providing overwhelming amounts of information. However, you can obtain more complete descriptions, including documentation (if available), from `OpEnvironment.helpVerbose()`:
131+
The basic descriptions from `ops.help()` are intentionally simplified to avoid providing overwhelming amounts of information. However, you can obtain more complete descriptions, including documentation (if available), from `ops.helpVerbose()`:
131132

132133
```
133134
print(ops.helpVerbose("filter.gauss"))
@@ -159,4 +160,4 @@ filter.gauss:
159160
the preallocated output image
160161
```
161162

162-
`OpEnvironment.helpVerbose()` can be used interchangeably whenever you would use `OpEnvironment.help()`, as needed.
163+
The `ops.helpVerbose()` method can be used interchangeably whenever you would use `ops.help()`, as needed.

0 commit comments

Comments
 (0)