当前位置: 首页>>代码示例>>Java>>正文


Java Views.collapse方法代码示例

本文整理汇总了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);
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:33,代码来源:LocalThresholdIntegral.java

示例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());
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:13,代码来源:CollapseViewTest.java

示例3: calculate

import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public CompositeIntervalView<T, ? extends GenericComposite<T>> calculate(RandomAccessibleInterval<T> input) {
	return Views.collapse(input);
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:5,代码来源:DefaultCollapse2CompositeIntervalView.java

示例4: calculate

import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public CompositeView<T, ? extends GenericComposite<T>> calculate(RandomAccessible<T> input) {
	return Views.collapse(input);
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:5,代码来源:DefaultCollapse2CompositeView.java

示例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());
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:14,代码来源:CollapseViewTest.java

示例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());
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:14,代码来源:CollapseViewTest.java


注:本文中的net.imglib2.view.Views.collapse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。