|Op Finder (ImageJ)|
|Maintainer||Mark Hiner, Ctrueden|
|Initial release||April 2016|
|Latest version||April 2016|
The Op Finder is a utility for browsing, learning about and running all available Ops. Because Ops are plugins and can be dynamically extended and specialized for particular inputs, it is not practical to have static documentation on a given Op. By using the Op Finder, you explore the actual list of Ops available in your installation. The purpose of this guide is to familiarize you with the basic capabilities of the Op Finder, to enable you to learn and experiment with Ops.
There are two ways to start up the Op Finder:
- Using the shortcut: ⇧ Shift+L
- Using the menu path: › ›
Parts of the Op Finder
- Search bar for filtering the list of Ops.
- Toggle button to change between a user and developer view.
- Play button for running the selected Op.
- Copy button to copy the selected cell contents.
- Help button to open up the Wiki reference page in your browser.
- Status area showing success/failure notifications e.g., for copying or running Ops.
- Namespaces and Op types: these can be expanded to explore the tree-based organization of Ops.
- Op implementation: the leaves of this tree tell us what parameter options are available for each Op type. We interpret this particular example as "There is an Add Op in the Math namespace, that operates on an image and a numeric value".
- Progress area showing progress when performing lengthy operations, such as filtering the Ops.
- Details pane toggle. Click this button to show/hide a pane containing additional information about the currently selected Op.
- Hover your mouse over any part of the Op Finder to get a descriptive tool-tip.
- Double-click any cell to copy its contents to your clipboard.
There is a lot of information surrounding Ops. One goal of the Op Finder is to present this information in a way that can be easily understood. To facilitate this, multiple views are available, tailoring the content of the Op Finder to a particular audience.
Ops in this view are focused on answering the question "What can I do right now with Ops?" The following guidelines are used to create this list:
- Only Ops directly involving images are displayed
- Parameter types are generalized
- Optional parameters are hidden
- Details pane open by default
- Precise Op signature
- Optional parameters are shown
- Referring class is shown
Things to do
TODO fuzzy, no namespaces
TODO how does the play button work?
TODO take a code snippet and turn it into a script, step-by-step
1. The first thing to do is find an Op of interest. In this case, we start from the User view and see that there is a Convolve Op we want to try:
2. In the Script Editor, we need to add a reference to the
OpService which will be our entry point for Op usage:
# @OpService ops
Note: this guide is written in Python but any scripting language will work
# @OpService ops ops.run("filter.convolve", Img, Img, RandomAccessibleInterval, long, OutOfBoundsFactory, OutOfBoundsFactory, RealType, ImgFactory)
- Add a OpService to our script (see: parameterized scripts)
- Switch over to Developer View
- Copy the code call and paste it into our script
- Lots of Ops have optional parameters. Look at the Op viewer to check, along with the return type.
- Remove unwanted parameters
- Create @Parameters as needed
- Create @OUTPUTs as needed