本文整理汇总了Java中net.imglib2.view.Views.extend方法的典型用法代码示例。如果您正苦于以下问题:Java Views.extend方法的具体用法?Java Views.extend怎么用?Java Views.extend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.imglib2.view.Views
的用法示例。
在下文中一共展示了Views.extend方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIntegralImage
import net.imglib2.view.Views; //导入方法依赖的package包/类
/**
* Computes integral images of a given order and extends them such that
* {@link IntegralMean} et al work with them.
*
* @param input The RAI for which an integral image is computed
* @param order
* @return An extended integral image for the input RAI
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
private RandomAccessibleInterval<RealType> getIntegralImage(
final RandomAccessibleInterval<I> input, final int order)
{
ExtendedRandomAccessibleInterval<I, RandomAccessibleInterval<I>> extendedInput =
Views.extend(input, outOfBoundsFactory);
FinalInterval expandedInterval = Intervals.expand(input, shape.getSpan()-1);
IntervalView<I> offsetInterval2 = Views.offsetInterval(extendedInput, expandedInterval);
RandomAccessibleInterval<RealType> img = null;
switch (order) {
case 1:
img = (RandomAccessibleInterval) integralImgOp.calculate(offsetInterval2);
break;
case 2:
img = (RandomAccessibleInterval) squareIntegralImgOp.calculate(offsetInterval2);
break;
}
img = addLeadingZeros(img);
return img;
}
示例2: compute
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public void compute(final RandomAccessibleInterval<T> input,
final RandomAccessibleInterval<T> output)
{
if (outOfBounds == null) {
outOfBounds = new OutOfBoundsMirrorFactory<>(Boundary.SINGLE);
}
final RandomAccessible<FloatType> eIn = //
(RandomAccessible) Views.extend(input, outOfBounds);
try {
SeparableSymmetricConvolution.convolve(Gauss3.halfkernels(sigmas), eIn,
output, threads.getExecutorService());
}
catch (final IncompatibleTypeException e) {
throw new RuntimeException(e);
}
}
示例3: calculate
import net.imglib2.view.Views; //导入方法依赖的package包/类
@Override
public ExtendedRandomAccessibleInterval<T, F> calculate(F input) {
return Views.extend(input, factory);
}