本文整理了Java中net.imglib2.view.Views.moveAxis()
方法的一些代码示例,展示了Views.moveAxis()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Views.moveAxis()
方法的具体详情如下:
包路径:net.imglib2.view.Views
类名称:Views
方法名:moveAxis
[英]Create view with permuted axes. fromAxis is moved to toAxis. While the order of the other axes is preserved. If fromAxis=2 and toAxis=4, and axis order of image is XYCZT, then a view to the image with axis order XYZTC would be created.
[中]创建具有排列轴的视图。fromAxis被移动到toAxis。同时保留其他轴的顺序。如果fromAxis=2,toAxis=4,且图像的轴顺序为XYCZT,则将创建轴顺序为XYZTC的图像视图。
代码示例来源:origin: net.imglib2/imglib2
return Views.moveAxis( stacked, stacked.numDimensions() - 1, concatenationAxis );
代码示例来源:origin: imglib/imglib2
return Views.moveAxis( stacked, stacked.numDimensions() - 1, concatenationAxis );
代码示例来源:origin: imglib/imglib2
@Test
public void testMoveAxisDownForInteval() {
Img<?> img = ArrayImgs.bytes( 1, 2, 3, 4 );
RandomAccessibleInterval< ? > view = Views.moveAxis( img, 3, 1 );
assertArrayEquals( new long[]{ 1, 4, 2, 3 }, Intervals.dimensionsAsLongArray( view ) );
}
代码示例来源:origin: imglib/imglib2
@Test
public void testMoveAxisUpForInteval() {
Img<?> img = ArrayImgs.bytes( 1, 2, 3, 4 );
RandomAccessibleInterval< ? > view = Views.moveAxis( img, 1, 3 );
assertArrayEquals( new long[]{ 1, 3, 4, 2 }, Intervals.dimensionsAsLongArray( view ) );
}
代码示例来源:origin: imglib/imglib2
@Test
public void testMoveAxisDown() {
RandomAccessible< Localizable > input = Localizables.randomAccessible( 4 );
RandomAccessible< Localizable > view = Views.moveAxis( input, 3, 1 );
RandomAccess< Localizable > ra = view.randomAccess();
ra.setPosition( new long[] {1, 4, 2, 3} );
assertArrayEquals( new long[] {1, 2, 3, 4}, Localizables.asLongArray( ra.get() ) );
}
代码示例来源:origin: imglib/imglib2
@Test
public void testMoveAxisUp() {
RandomAccessible< Localizable > input = Localizables.randomAccessible( 4 );
RandomAccessible< Localizable > view = Views.moveAxis( input, 1, 3 );
RandomAccess< Localizable > ra = view.randomAccess();
ra.setPosition( new long[] {1, 3, 4, 2} );
assertArrayEquals( new long[] {1, 2, 3, 4}, Localizables.asLongArray( ra.get() ) );
}
内容来源于网络,如有侵权,请联系作者删除!