You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -95,9 +95,9 @@ Using this ``engine.convert`` Op, SciJava Ops can match our ``filter.convolve``
95
95
Img<DoubleType> in =...
96
96
// 3x3 averaging kernel
97
97
double[][] kernel = { //
98
-
{ 1/9, 1/9, 1/9}, //
99
-
{ 1/9, 1/9, 1/9}, //
100
-
{ 1/9, 1/9, 1/9} //
98
+
{ 1/9d, 1/9d, 1/9d}, //
99
+
{ 1/9d, 1/9d, 1/9d}, //
100
+
{ 1/9d, 1/9d, 1/9d} //
101
101
};
102
102
103
103
// Ideal case - no need to wrap to Img
@@ -165,9 +165,9 @@ Now, imagine that the user wished to execute the Op using **only** ``double[][]`
165
165
double[][] in =...
166
166
// 3x3 averaging kernel
167
167
double[][] kernel = { //
168
-
{ 1/9, 1/9, 1/9}, //
169
-
{ 1/9, 1/9, 1/9}, //
170
-
{ 1/9, 1/9, 1/9} //
168
+
{ 1/9d, 1/9d, 1/9d}, //
169
+
{ 1/9d, 1/9d, 1/9d}, //
170
+
{ 1/9d, 1/9d, 1/9d} //
171
171
};
172
172
173
173
double[][] result = ops.op("filter.convolve") //
@@ -240,9 +240,9 @@ Suppose that again the user wants to call this Op using *only* ``double[][]``\ s
240
240
double[][] in =...
241
241
// 3x3 averaging kernel
242
242
double[][] kernel = { //
243
-
{ 1/9, 1/9, 1/9}, //
244
-
{ 1/9, 1/9, 1/9}, //
245
-
{ 1/9, 1/9, 1/9} //
243
+
{ 1/9d, 1/9d, 1/9d}, //
244
+
{ 1/9d, 1/9d, 1/9d}, //
245
+
{ 1/9d, 1/9d, 1/9d} //
246
246
};
247
247
double[][] result =newdouble[in.length][in[0].length];
248
248
@@ -290,4 +290,4 @@ All in all, you can enable parameter conversion from type ``A`` to type ``B`` by
290
290
291
291
Note that, in the process of creating your ``engine.convert`` ``Function`` Ops, you'll likely want to write some ``engine.create`` Ops that could produce objects of type ``B``. In addition to making your ``engine.convert`` Ops more granular by using them as Op dependencies, but they'll additionally help enable features like Op adaptation.
292
292
293
-
Beyond this, it would also be helpful to ensure that an ``engine.copy(converted_output: A, user_buffer: A)`` Op exists, such that users can also call *your* ``Computer`` and ``Inplace`` Ops using objects of type ``A``.
293
+
Beyond this, it would also be helpful to ensure that an ``engine.copy(converted_output: A, user_buffer: A)`` Op exists, such that users can also call *your* ``Computer`` and ``Inplace`` Ops using objects of type ``A``.
0 commit comments