use of net.imagej.ops.filter.pad.PadShiftKernelFFTMethods in project imagej-ops by imagej.
the class FFTTest method testPadShiftKernel.
@Test
@SuppressWarnings("unchecked")
public void testPadShiftKernel() {
long[] dims = new long[] { 1024, 1024 };
Img<ComplexDoubleType> test = ops.create().img(new FinalDimensions(dims), new ComplexDoubleType());
RandomAccessibleInterval<ComplexDoubleType> shift = (RandomAccessibleInterval<ComplexDoubleType>) ops.run(PadShiftKernel.class, test, new FinalDimensions(dims));
RandomAccessibleInterval<ComplexDoubleType> shift2 = (RandomAccessibleInterval<ComplexDoubleType>) ops.run(PadShiftKernelFFTMethods.class, test, new FinalDimensions(dims));
// assert there was no additional padding done by PadShiftKernel
assertEquals(1024, shift.dimension(0));
// assert that PadShiftKernelFFTMethods padded to the FFTMethods fast size
assertEquals(1120, shift2.dimension(0));
}
Aggregations