本文整理了Java中net.imglib2.view.Views.concatenate()
方法的一些代码示例,展示了Views.concatenate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Views.concatenate()
方法的具体详情如下:
包路径:net.imglib2.view.Views
类名称:Views
方法名:concatenate
[英]Concatenate a list of RandomAccessibleInterval along the provided concatenationAxis
. The random access behaves as defined by StackView.StackAccessMode#DEFAULT.
[中]沿着提供的concatenationAxis
链接一个随机访问Interval列表。随机访问的行为符合StackView的定义。StackAccessMode#默认值。
代码示例来源:origin: imagej/imagej-ops
@Override
public RandomAccessibleInterval< T > calculate( final List< ? extends RandomAccessibleInterval< T > > input )
{
return Views.concatenate( concatenationAxis, stackAccessMode, input );
}
代码示例来源:origin: imagej/imagej-ops
@Override
public RandomAccessibleInterval< T > calculate( final List< ? extends RandomAccessibleInterval< T > > input )
{
return Views.concatenate( concatenationAxis, input );
}
代码示例来源:origin: net.imglib2/imglib2
/**
* Concatenate a list of {@link RandomAccessibleInterval} along the provided
* <code>concatenationAxis</code>. The random access behaves as defined by
* {@link StackView.StackAccessMode#DEFAULT}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final List< ? extends RandomAccessibleInterval< T > > sources )
{
return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
}
代码示例来源:origin: imglib/imglib2
/**
* Concatenate a list of {@link RandomAccessibleInterval} along the provided
* <code>concatenationAxis</code>. The random access behaves as defined by
* {@link StackView.StackAccessMode#DEFAULT}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final List< ? extends RandomAccessibleInterval< T > > sources )
{
return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
}
代码示例来源:origin: net.imglib2/imglib2
/**
*
* Concatenate an array of {@link RandomAccessibleInterval} along the
* provided <code>concatenationAxis</code>. The random access behaves as
* defined by {@link StackView.StackAccessMode#DEFAULT}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
@SafeVarargs
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final RandomAccessibleInterval< T >... sources )
{
return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
}
代码示例来源:origin: imglib/imglib2
/**
*
* Concatenate an array of {@link RandomAccessibleInterval} along the
* provided <code>concatenationAxis</code>. The random access behaves as
* defined by {@link StackView.StackAccessMode#DEFAULT}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
@SafeVarargs
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final RandomAccessibleInterval< T >... sources )
{
return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
}
代码示例来源:origin: net.imglib2/imglib2
/**
* Concatenate an array of {@link RandomAccessibleInterval} along the
* provided <code>concatenationAxis</code>. See
* {@link StackView.StackAccessMode} for behaviors of {@link RandomAccess}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param mode
* Defines how random accesses are moved. See
* {@link StackView.StackAccessMode} for behaviors of
* {@link RandomAccess}.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
@SafeVarargs
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final StackView.StackAccessMode mode,
final RandomAccessibleInterval< T >... sources )
{
return concatenate( concatenationAxis, mode, Arrays.asList( sources ) );
}
代码示例来源:origin: imglib/imglib2
/**
* Concatenate an array of {@link RandomAccessibleInterval} along the
* provided <code>concatenationAxis</code>. See
* {@link StackView.StackAccessMode} for behaviors of {@link RandomAccess}.
*
* @param concatenationAxis
* Concatenate along this axis.
* @param mode
* Defines how random accesses are moved. See
* {@link StackView.StackAccessMode} for behaviors of
* {@link RandomAccess}.
* @param sources
* {@link RandomAccessibleInterval}s to be concatenated.
* @return {@link RandomAccessibleInterval} of concatenated sources.
*/
@SafeVarargs
public static < T > RandomAccessibleInterval< T > concatenate(
final int concatenationAxis,
final StackView.StackAccessMode mode,
final RandomAccessibleInterval< T >... sources )
{
return concatenate( concatenationAxis, mode, Arrays.asList( sources ) );
}
代码示例来源:origin: imglib/imglib2
private static void testConcatenateImpl( long[] dim, int axis, long divider )
{
// setup
final Img< ByteType > img = createRandomImage( dim );
final List< RandomAccessibleInterval< ByteType > > parts = splitImage( img, axis, divider );
// process
final RandomAccessibleInterval< ByteType > concatenated = Views.concatenate( axis, parts );
// test
assertImageEquals( img, concatenated );
}
代码示例来源:origin: imagej/imagej-ops
@Test
public void defaultConcatenateTest() {
final List< RandomAccessibleInterval< ByteType > > intervals = createIntervals( img, divider, axis );
final RandomAccessibleInterval< ByteType > cat1 = Views.concatenate( axis, intervals );
final RandomAccessibleInterval< ByteType > cat2 = ops.transform().concatenateView( intervals, axis );
testEqual( cat1, cat2 );
}
代码示例来源:origin: imglib/imglib2
@Test
public void testConcatenateSimple() {
// setup
Img<ByteType> a = ArrayImgs.bytes( new byte[]{ 1, 2, 3, 4 }, 2, 2 );
Img<ByteType> b = ArrayImgs.bytes( new byte[]{ 7, 8 }, 1, 2 );
Img<ByteType> expected = ArrayImgs.bytes( new byte[]{ 1, 2, 7, 3, 4, 8 }, 3, 2 );
// process
RandomAccessibleInterval< ByteType > result = Views.concatenate( 0, a, b );
// test
assertImageEquals( expected, result );
}
代码示例来源:origin: imagej/imagej-ops
@Test
public void concatenateWithAccessModeTest() {
final List< RandomAccessibleInterval< ByteType > > intervals = createIntervals( img, divider, axis );
for ( final StackAccessMode mode : StackAccessMode.values() )
{
final RandomAccessibleInterval< ByteType > cat1 = Views.concatenate( axis, mode, intervals );
final RandomAccessibleInterval< ByteType > cat2 = ops.transform().concatenateView( intervals, axis, mode );
testEqual( cat1, cat2 );
}
}
内容来源于网络,如有侵权,请联系作者删除!