Java Code Examples for net.imglib2.view.Views#collapseNumeric()
The following examples show how to use
net.imglib2.view.Views#collapseNumeric() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollapseNumericViewTest.java From imagej-ops with BSD 2-Clause "Simplified" License | 6 votes |
@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()); }
Example 2
Source File: DefaultCollapseNumeric2CompositeIntervalView.java From imagej-ops with BSD 2-Clause "Simplified" License | 4 votes |
@Override public CompositeIntervalView<T, NumericComposite<T>> calculate(RandomAccessibleInterval<T> input) { return Views.collapseNumeric(input); }
Example 3
Source File: DefaultCollapseNumeric2CompositeView.java From imagej-ops with BSD 2-Clause "Simplified" License | 4 votes |
@Override public CompositeView<T, NumericComposite<T>> calculate(RandomAccessible<T> input) { return Views.collapseNumeric(input, numChannels); }