- java.lang.Object
-
- org.scijava.ops.tutorial.OpParallelization
-
- All Implemented Interfaces:
OpCollection
public class OpParallelization extends Object implements OpCollection
SciJava Ops includes a mechanism for automatically introducing concurrency to Ops. Developers can utilize this mechanism by writing their Ops on the smallest element of the computation, be that a single pixel, or aNeighborhood. SciJava Ops will then "lift" these Ops, creating parallelized Ops that run on an entireRandomAccessibleIntervalThis tutorial showcases these lifting mechanisms.- Author:
- Gabriel Selzer
-
-
Constructor Summary
Constructors Constructor Description OpParallelization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaverageNeighborhood(Neighborhood<UnsignedByteType> input, UnsignedByteType output)This Op, which computes some algorithm over a neighborhood, also lets the framework assume the burden of parallelizationstatic voidinvertOp(UnsignedByteType input, UnsignedByteType output)This Op, which is really just a computation on a single pixel, lets the framework assume the burden of parallelizationstatic voidmain(String... args)
-
-
-
Method Detail
-
invertOp
public static void invertOp(UnsignedByteType input, UnsignedByteType output)
This Op, which is really just a computation on a single pixel, lets the framework assume the burden of parallelization- Parameters:
input- the input pixeloutput- the preallocated output pixel (container)- Implementation Note:
- op names="tutorial.invertPerPixel"
-
averageNeighborhood
public static void averageNeighborhood(Neighborhood<UnsignedByteType> input, UnsignedByteType output)
This Op, which computes some algorithm over a neighborhood, also lets the framework assume the burden of parallelization- Parameters:
input- the input pixeloutput- the preallocated output pixel (container)- Implementation Note:
- op names="tutorial.neighborhoodAverage"
-
main
public static void main(String... args)
-
-