net.imglib2.view.Views.concatenate()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中net.imglib2.view.Views.concatenate()方法的一些代码示例,展示了Views.concatenate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Views.concatenate()方法的具体详情如下:
包路径:net.imglib2.view.Views
类名称:Views
方法名:concatenate

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

  1. @Override
  2. public RandomAccessibleInterval< T > calculate( final List< ? extends RandomAccessibleInterval< T > > input )
  3. {
  4. return Views.concatenate( concatenationAxis, stackAccessMode, input );
  5. }

代码示例来源:origin: imagej/imagej-ops

  1. @Override
  2. public RandomAccessibleInterval< T > calculate( final List< ? extends RandomAccessibleInterval< T > > input )
  3. {
  4. return Views.concatenate( concatenationAxis, input );
  5. }

代码示例来源:origin: net.imglib2/imglib2

  1. /**
  2. * Concatenate a list of {@link RandomAccessibleInterval} along the provided
  3. * <code>concatenationAxis</code>. The random access behaves as defined by
  4. * {@link StackView.StackAccessMode#DEFAULT}.
  5. *
  6. * @param concatenationAxis
  7. * Concatenate along this axis.
  8. * @param sources
  9. * {@link RandomAccessibleInterval}s to be concatenated.
  10. * @return {@link RandomAccessibleInterval} of concatenated sources.
  11. */
  12. public static < T > RandomAccessibleInterval< T > concatenate(
  13. final int concatenationAxis,
  14. final List< ? extends RandomAccessibleInterval< T > > sources )
  15. {
  16. return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
  17. }

代码示例来源:origin: imglib/imglib2

  1. /**
  2. * Concatenate a list of {@link RandomAccessibleInterval} along the provided
  3. * <code>concatenationAxis</code>. The random access behaves as defined by
  4. * {@link StackView.StackAccessMode#DEFAULT}.
  5. *
  6. * @param concatenationAxis
  7. * Concatenate along this axis.
  8. * @param sources
  9. * {@link RandomAccessibleInterval}s to be concatenated.
  10. * @return {@link RandomAccessibleInterval} of concatenated sources.
  11. */
  12. public static < T > RandomAccessibleInterval< T > concatenate(
  13. final int concatenationAxis,
  14. final List< ? extends RandomAccessibleInterval< T > > sources )
  15. {
  16. return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
  17. }

代码示例来源:origin: net.imglib2/imglib2

  1. /**
  2. *
  3. * Concatenate an array of {@link RandomAccessibleInterval} along the
  4. * provided <code>concatenationAxis</code>. The random access behaves as
  5. * defined by {@link StackView.StackAccessMode#DEFAULT}.
  6. *
  7. * @param concatenationAxis
  8. * Concatenate along this axis.
  9. * @param sources
  10. * {@link RandomAccessibleInterval}s to be concatenated.
  11. * @return {@link RandomAccessibleInterval} of concatenated sources.
  12. */
  13. @SafeVarargs
  14. public static < T > RandomAccessibleInterval< T > concatenate(
  15. final int concatenationAxis,
  16. final RandomAccessibleInterval< T >... sources )
  17. {
  18. return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
  19. }

代码示例来源:origin: imglib/imglib2

  1. /**
  2. *
  3. * Concatenate an array of {@link RandomAccessibleInterval} along the
  4. * provided <code>concatenationAxis</code>. The random access behaves as
  5. * defined by {@link StackView.StackAccessMode#DEFAULT}.
  6. *
  7. * @param concatenationAxis
  8. * Concatenate along this axis.
  9. * @param sources
  10. * {@link RandomAccessibleInterval}s to be concatenated.
  11. * @return {@link RandomAccessibleInterval} of concatenated sources.
  12. */
  13. @SafeVarargs
  14. public static < T > RandomAccessibleInterval< T > concatenate(
  15. final int concatenationAxis,
  16. final RandomAccessibleInterval< T >... sources )
  17. {
  18. return concatenate( concatenationAxis, StackView.StackAccessMode.DEFAULT, sources );
  19. }

代码示例来源:origin: net.imglib2/imglib2

  1. /**
  2. * Concatenate an array of {@link RandomAccessibleInterval} along the
  3. * provided <code>concatenationAxis</code>. See
  4. * {@link StackView.StackAccessMode} for behaviors of {@link RandomAccess}.
  5. *
  6. * @param concatenationAxis
  7. * Concatenate along this axis.
  8. * @param mode
  9. * Defines how random accesses are moved. See
  10. * {@link StackView.StackAccessMode} for behaviors of
  11. * {@link RandomAccess}.
  12. * @param sources
  13. * {@link RandomAccessibleInterval}s to be concatenated.
  14. * @return {@link RandomAccessibleInterval} of concatenated sources.
  15. */
  16. @SafeVarargs
  17. public static < T > RandomAccessibleInterval< T > concatenate(
  18. final int concatenationAxis,
  19. final StackView.StackAccessMode mode,
  20. final RandomAccessibleInterval< T >... sources )
  21. {
  22. return concatenate( concatenationAxis, mode, Arrays.asList( sources ) );
  23. }

代码示例来源:origin: imglib/imglib2

  1. /**
  2. * Concatenate an array of {@link RandomAccessibleInterval} along the
  3. * provided <code>concatenationAxis</code>. See
  4. * {@link StackView.StackAccessMode} for behaviors of {@link RandomAccess}.
  5. *
  6. * @param concatenationAxis
  7. * Concatenate along this axis.
  8. * @param mode
  9. * Defines how random accesses are moved. See
  10. * {@link StackView.StackAccessMode} for behaviors of
  11. * {@link RandomAccess}.
  12. * @param sources
  13. * {@link RandomAccessibleInterval}s to be concatenated.
  14. * @return {@link RandomAccessibleInterval} of concatenated sources.
  15. */
  16. @SafeVarargs
  17. public static < T > RandomAccessibleInterval< T > concatenate(
  18. final int concatenationAxis,
  19. final StackView.StackAccessMode mode,
  20. final RandomAccessibleInterval< T >... sources )
  21. {
  22. return concatenate( concatenationAxis, mode, Arrays.asList( sources ) );
  23. }

代码示例来源:origin: imglib/imglib2

  1. private static void testConcatenateImpl( long[] dim, int axis, long divider )
  2. {
  3. // setup
  4. final Img< ByteType > img = createRandomImage( dim );
  5. final List< RandomAccessibleInterval< ByteType > > parts = splitImage( img, axis, divider );
  6. // process
  7. final RandomAccessibleInterval< ByteType > concatenated = Views.concatenate( axis, parts );
  8. // test
  9. assertImageEquals( img, concatenated );
  10. }

代码示例来源:origin: imagej/imagej-ops

  1. @Test
  2. public void defaultConcatenateTest() {
  3. final List< RandomAccessibleInterval< ByteType > > intervals = createIntervals( img, divider, axis );
  4. final RandomAccessibleInterval< ByteType > cat1 = Views.concatenate( axis, intervals );
  5. final RandomAccessibleInterval< ByteType > cat2 = ops.transform().concatenateView( intervals, axis );
  6. testEqual( cat1, cat2 );
  7. }

代码示例来源:origin: imglib/imglib2

  1. @Test
  2. public void testConcatenateSimple() {
  3. // setup
  4. Img<ByteType> a = ArrayImgs.bytes( new byte[]{ 1, 2, 3, 4 }, 2, 2 );
  5. Img<ByteType> b = ArrayImgs.bytes( new byte[]{ 7, 8 }, 1, 2 );
  6. Img<ByteType> expected = ArrayImgs.bytes( new byte[]{ 1, 2, 7, 3, 4, 8 }, 3, 2 );
  7. // process
  8. RandomAccessibleInterval< ByteType > result = Views.concatenate( 0, a, b );
  9. // test
  10. assertImageEquals( expected, result );
  11. }

代码示例来源:origin: imagej/imagej-ops

  1. @Test
  2. public void concatenateWithAccessModeTest() {
  3. final List< RandomAccessibleInterval< ByteType > > intervals = createIntervals( img, divider, axis );
  4. for ( final StackAccessMode mode : StackAccessMode.values() )
  5. {
  6. final RandomAccessibleInterval< ByteType > cat1 = Views.concatenate( axis, mode, intervals );
  7. final RandomAccessibleInterval< ByteType > cat2 = ops.transform().concatenateView( intervals, axis, mode );
  8. testEqual( cat1, cat2 );
  9. }
  10. }

相关文章