Class 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 a Neighborhood. SciJava Ops will then "lift" these Ops, creating parallelized Ops that run on an entire RandomAccessibleInterval This tutorial showcases these lifting mechanisms.
    Author:
    Gabriel Selzer
    • Constructor Detail

      • OpParallelization

        public OpParallelization()
    • 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 pixel
        output - 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 pixel
        output - the preallocated output pixel (container)
        Implementation Note:
        op names="tutorial.neighborhoodAverage"
      • main

        public static void main​(String... args)