@Override public C compute(T input1, V input2, C output) { output.setReal(input1.getRealDouble()); output.setImaginary(input2.getRealDouble()); return output; }
@Override public O compute(I z, O output) { output.setReal(z.getRealDouble()); output.setImaginary(z.getImaginaryDouble()); return output; }
@Override public C compute(T input1, V input2, C output) { output.setReal(input1.getRealDouble()); output.setImaginary(input2.getRealDouble()); return output; }
@Override public O compute(I z, O output) { output.setReal(z.getRealDouble()); output.setImaginary(z.getImaginaryDouble()); return output; }
@Override public void compute(long[] point, O output) { accessor.setPosition(point); output.setReal(accessor.get().getRealDouble()); output.setImaginary(accessor.get().getImaginaryDouble()); }
@Override public void compute(long[] point, O output) { accessor.setPosition(point); output.setReal(accessor.get().getRealDouble()); output.setImaginary(accessor.get().getImaginaryDouble()); }
cursor.get().setImaginary( GaussExp * Math.sin(freqPart) );
/** * Conditionally assigns pixels in the output region. */ public void assign() { final RandomAccess<U> accessor = img.randomAccess(); final V output = function.createOutput(); INPUT input = null; while (iter.hasNext()) { input = iter.next(input); boolean proceed = (condition == null) || (condition.isTrue(input)); if (proceed) { function.compute(input, output); accessor.setPosition(iter.getCurrentPoint()); accessor.get().setReal(output.getRealDouble()); accessor.get().setImaginary(output.getImaginaryDouble()); // FIXME // Note - for real datasets this imaginary assignment may waste cpu // cycles. Perhaps it can get optimized away by the JIT. But maybe not // since the type is not really known because this class is really // constructed from a raw type. We'd need to test how the JIT handles // this situation. Note that in past incarnations this class used // assigner classes. The complex version set R & I but the real // version just set R. We could adopt that approach once again. } } } }
/** * Conditionally assigns pixels in the output region. */ public void assign() { final RandomAccess<U> accessor = img.randomAccess(); final V output = function.createOutput(); INPUT input = null; while (iter.hasNext()) { input = iter.next(input); boolean proceed = (condition == null) || (condition.isTrue(input)); if (proceed) { function.compute(input, output); accessor.setPosition(iter.getCurrentPoint()); accessor.get().setReal(output.getRealDouble()); accessor.get().setImaginary(output.getImaginaryDouble()); // FIXME // Note - for real datasets this imaginary assignment may waste cpu // cycles. Perhaps it can get optimized away by the JIT. But maybe not // since the type is not really known because this class is really // constructed from a raw type. We'd need to test how the JIT handles // this situation. Note that in past incarnations this class used // assigner classes. The complex version set R & I but the real // version just set R. We could adopt that approach once again. } } } }
output.setImaginary(sumI);