Search in sources :

Example 1 with NumericComposite

use of net.imglib2.view.composite.NumericComposite in project imagej-ops by imagej.

the class CollapseNumericViewTest method defaultCollapseNumericTest.

@Test
public void defaultCollapseNumericTest() {
    Img<NativeARGBDoubleType> img = new ArrayImgFactory<NativeARGBDoubleType>().create(new int[] { 10, 10 }, new NativeARGBDoubleType());
    CompositeIntervalView<NativeARGBDoubleType, NumericComposite<NativeARGBDoubleType>> il2 = Views.collapseNumeric((RandomAccessibleInterval<NativeARGBDoubleType>) img);
    CompositeIntervalView<NativeARGBDoubleType, NumericComposite<NativeARGBDoubleType>> opr = ops.transform().collapseNumericView((RandomAccessibleInterval<NativeARGBDoubleType>) img);
    assertEquals(il2.numDimensions(), opr.numDimensions());
    CompositeView<NativeARGBDoubleType, NumericComposite<NativeARGBDoubleType>> il2_2 = Views.collapseNumeric((RandomAccessible<NativeARGBDoubleType>) img, 1);
    CompositeView<NativeARGBDoubleType, NumericComposite<NativeARGBDoubleType>> opr_2 = ops.transform().collapseNumericView((RandomAccessible<NativeARGBDoubleType>) img, 1);
    assertEquals(il2_2.numDimensions(), opr_2.numDimensions());
}
Also used : NumericComposite(net.imglib2.view.composite.NumericComposite) NativeARGBDoubleType(net.imglib2.type.numeric.NativeARGBDoubleType) AbstractOpTest(net.imagej.ops.AbstractOpTest) Test(org.junit.Test)

Aggregations

AbstractOpTest (net.imagej.ops.AbstractOpTest)1 NativeARGBDoubleType (net.imglib2.type.numeric.NativeARGBDoubleType)1 NumericComposite (net.imglib2.view.composite.NumericComposite)1 Test (org.junit.Test)1