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
Copy file name to clipboardExpand all lines: src/main/java/net/imglib2/algorithm/math/Compute.java
+78-5Lines changed: 78 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -253,8 +253,20 @@ public final void convert( final C comp, final C out) {
253
253
254
254
returntarget;
255
255
}
256
-
257
256
257
+
/**
258
+
* View the result of the computations as a {@code RandomAccessibleInterval}, i.e. there is no target image,
259
+
* instead any pixel can be viewed as the result of the computation applied to it, dynamically.
260
+
*
261
+
* See also {@code ViewableFunction} and methods below related to {@code Compute#randomAccess()} and {@code Compute#cursor()}.
262
+
* The key difference is that, here, the computation and the output type can be different.
263
+
*
264
+
* @param inConverter_ To convert input images into the {@code computingType}. Can be null, defaults to a {@code Util#genericRealTypeConverter()}.
265
+
* @param computingType The {@code Type} that defines the math to use.
266
+
* @param outputType The @{code Type} of the constructed and returned {@code RandomAccessibleInterval}.
267
+
* @param outConverter_ To convert from the {@code computingType} to the {@code outputType}. Can be null, defaults to a {@code Util#genericRealTypeConverter()}.
268
+
* @return
269
+
*/
258
270
@SuppressWarnings("unchecked")
259
271
public < OextendsRealType< O >, CextendsRealType< C > > RandomAccessibleInterval< O > asRandomAccessibleInterval(
260
272
finalConverter< RealType< ? >, C > inConverter_,
@@ -343,20 +355,38 @@ public RandomAccess< O > randomAccess( final Interval interval )
343
355
returnnewRandomAccessIntervalCompute();
344
356
}
345
357
358
+
/**
359
+
* Compute the result multithreaded into an {@code ArrayImg} of the same {@code Type} as the first image found,
360
+
* with mathematical operations using that same {@code Type}.
361
+
*/
346
362
public < OextendsRealType< O > & NativeType< O > > RandomAccessibleInterval< O >
* Compute the result multithreaded into an {@code ArrayImg} of the given {@code Type}.
421
+
* Uses generic {@code RealType} converters where appropriate as provided by {@code Util#genericRealTypeConverter()}.
422
+
*
423
+
* @param target To store the result of the computation, with its {@code Type} defining both the output {@code Type} and the {@code Type} used for computations.
424
+
*/
425
+
public < OextendsRealType< O > > RandomAccessibleInterval< O >
0 commit comments