|
47 | 47 |
|
48 | 48 | /** |
49 | 49 | * Convenience class for looking up and/or executing ops using a builder |
50 | | - * pattern. The general order of specification: |
51 | | - * <ol> |
52 | | - * <li>The op name</li> |
53 | | - * <li>The number of input(s)</li> |
54 | | - * <li>The type or value(s) of input(s)</li> |
55 | | - * <li>One of: |
56 | | - * <ul> |
57 | | - * <li>The type or value of the output</li> |
58 | | - * <li>Which input should be modified in-place</li> |
59 | | - * </ul> |
60 | | - * </li> |
61 | | - * </ol> |
62 | | - * The first two steps are required, at a minimum. The choices you make will |
63 | | - * determine the <i>type</i> of Op that is matched: |
64 | | - * <ul> |
65 | | - * <li>No inputs → <code>Producer</code> or <code>Computer</code></li> |
66 | | - * <li>Inputs with an output <i>value</i> → <code>Computer</code></li> |
67 | | - * <li>Inputs with an output <i>type</i> → <code>Computer</code> or <code>Function</code></li> |
68 | | - * <li>Inputs with no output → <code>Inplace</code> or <code>Function</code> with unknown (<code>Object</code>) return</li> |
69 | | - * </ul> |
| 50 | + * pattern. Typical entry point is through {@code OpEnvironment.op(String)} |
| 51 | + * - which contains full usage information. |
70 | 52 | * <br/> |
71 | | - * <p> |
72 | 53 | * Note that the intermediate builder steps use the following acronyms: |
73 | 54 | * <ul> |
74 | 55 | * <li><b>IV/OV:</b> Input/Output Value. Indicates instances will be used for matching; ideal if you want to directly run the matched Op, e.g. via <code>apply</code>, <code>compute</code>, <code>mutate</code> or <code>create</code> methods.</li> |
75 | 56 | * <li><b>IT/OT:</b> Input/Output Types. Indicates {@code Classes} will be used for matching; matching will produce an Op instance that can then be (re)used. There are two "Type" options: raw types or {@code Nil}s. If you are matching using a parameterized type use the {@code Nil} option to preserve the type parameter.</li> |
76 | 57 | * <li><b>OU:</b> Output Unknown. Indicates an output type/value has not been specified to the builder yet. The output, if any, will simply be an {@code Object}</li> |
77 | 58 | * </ul> |
78 | 59 | * </p> |
79 | | - * <p> |
80 | | - * Examples: |
81 | | - * {@code OpEnvironment env = new DefaultOpEnvironment();} |
82 | | - * <ul> |
83 | | - * <li>{@code env.op("create").arity0().outType(DoubleType.class).create();} — run an Op creating an instance of the ImgLib2 {@code DoubleType}</li> |
84 | | - * <li>{@code env.op("create").arity0().outType(Img.class).create();} — run an Op creating a raw instance of an ImgLib2 {@code Img}.</li> |
85 | | - * <li>{@code env.op("create").arity0().outType(new Nil<Img<DoubleType>>(){}).create();} — run an Op creating an instance of an ImgLib2 {@code Img<DoubleType>}.</li> |
86 | | - * <li>{@code env.op("math.add").arity2().inType(Integer.class, Integer.class).function();} — get an instance of an Op to add two integers together. Return type will be {@code Object}.</li> |
87 | | - * <li>{@code env.op("math.add").arity2().input(1, 1).outType(Double.class).apply();} — run an Op combining two integers. Return type will be {@code Double}.</li> |
88 | | - * <li>{@code env.op("math.add").arity2().input(img1, img2).output(result).compute();} — run an Op combining two images and storing the result in a pre-allocated image.</li> |
89 | | - * <li>{@code env.op("filter.addPoissonNoise").arity1().input(img1).mutate();} — run an Op adding poisson noise to an input image.</li> |
90 | | - * </ul> |
91 | | - * </p> |
92 | 60 | * |
93 | 61 | * @author Curtis Rueden |
94 | 62 | * @author Gabriel Selzer |
|
0 commit comments