本文整理汇总了Java中net.imglib2.view.Views.collapse方法的典型用法代码示例。如果您正苦于以下问题:Java Views.collapse方法的具体用法?Java Views.collapse怎么用?Java Views.collapse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.imglib2.view.Views
的用法示例。
在下文中一共展示了Views.collapse方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: compute
import net.imglib2.view.Views; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void compute(final RandomAccessibleInterval<I> input,
final IterableInterval<BitType> output)
{
final List<RandomAccessibleInterval<RealType>> listOfIntegralImages =
new ArrayList<>();
for (final int order : requiredIntegralImages()) {
final RandomAccessibleInterval<RealType> requiredIntegralImg =
getIntegralImage(input, order);
listOfIntegralImages.add(requiredIntegralImg);
}
// Composite image of integral images of order 1 and 2
final RandomAccessibleInterval<RealType> stacked = Views.stack(
listOfIntegralImages);
final RandomAccessibleInterval<? extends Composite<RealType>> compositeRAI =
Views.collapse(stacked);
final RandomAccessibleInterval<? extends Composite<RealType>> extendedCompositeRAI =
removeLeadingZeros(compositeRAI);
final NeighborhoodsIterableInterval<? extends Composite<RealType>> neighborhoods =
shape.neighborhoodsSafe(extendedCompositeRAI);
if (map == null) {
map = (BinaryComputerOp) ops().op(Map.class, out(), in(), neighborhoods,
filterOp);
}
map.compute(input, neighborhoods, output);
}
示例2: defaultCollapseTest
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Test
public void defaultCollapseTest() {
Img<DoubleType> img = new ArrayImgFactory<DoubleType>().create(new int[] { 10, 10 },
new DoubleType());
CompositeIntervalView<DoubleType, ? extends GenericComposite<DoubleType>> il2 = Views
.collapse(img);
CompositeIntervalView<DoubleType, ? extends GenericComposite<DoubleType>> opr = ops.transform()
.collapseView(img);
assertEquals(il2.numDimensions(), opr.numDimensions());
}
示例3: calculate
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public CompositeIntervalView<T, ? extends GenericComposite<T>> calculate(RandomAccessibleInterval<T> input) {
return Views.collapse(input);
}
示例4: calculate
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public CompositeView<T, ? extends GenericComposite<T>> calculate(RandomAccessible<T> input) {
return Views.collapse(input);
}
示例5: collapseRATest
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Test
public void collapseRATest() {
Img<DoubleType> img = new ArrayImgFactory<DoubleType>().create(new int[] { 10, 10, 10 }, new DoubleType());
CompositeView<DoubleType, ? extends GenericComposite<DoubleType>> il2 = Views
.collapse((RandomAccessible<DoubleType>) img);
CompositeView<DoubleType, ? extends GenericComposite<DoubleType>> opr = ops.transform()
.collapseView((RandomAccessible<DoubleType>) img);
assertEquals(il2.numDimensions(), opr.numDimensions());
}
示例6: collapseRAITest
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Test
public void collapseRAITest() {
Img<DoubleType> img = new ArrayImgFactory<DoubleType>().create(new int[] { 10, 10, 10 }, new DoubleType());
CompositeIntervalView<DoubleType, ? extends GenericComposite<DoubleType>> il2 = Views
.collapse((RandomAccessibleInterval<DoubleType>) img);
CompositeIntervalView<DoubleType, ? extends GenericComposite<DoubleType>> opr = ops.transform()
.collapseView((RandomAccessibleInterval<DoubleType>) img);
assertEquals(il2.numDimensions(), opr.numDimensions());
}