本文整理了Java中net.imglib2.util.Util.asDoubleArray()
方法的一些代码示例,展示了Util.asDoubleArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.asDoubleArray()
方法的具体详情如下:
包路径:net.imglib2.util.Util
类名称:Util
方法名:asDoubleArray
[英]Returns the content of Iterable as array of doubles.
[中]以双精度数组的形式返回Iterable的内容。
代码示例来源:origin: net.imglib2/imglib2
/**
* Returns the pixels of an image of RealType as array of doubles.
* The pixels are sorted in flat iteration order.
*/
public static double[] asDoubleArray( final Img< ? extends RealType< ? > > image )
{
return asDoubleArray( ( RandomAccessibleInterval< ? extends RealType< ? > > ) image );
}
代码示例来源:origin: imglib/imglib2
/**
* Returns the pixels of an image of RealType as array of doubles.
* The pixels are sorted in flat iteration order.
*/
public static double[] asDoubleArray( final Img< ? extends RealType< ? > > image )
{
return asDoubleArray( ( RandomAccessibleInterval< ? extends RealType< ? > > ) image );
}
代码示例来源:origin: imglib/imglib2
/**
* Returns the pixels of an RandomAccessibleInterval of RealType as array of doubles.
* The pixels are sorted in flat iteration order.
*/
public static double[] asDoubleArray( final RandomAccessibleInterval< ? extends RealType< ? > > rai )
{
return asDoubleArray( Views.flatIterable( rai ) );
}
代码示例来源:origin: net.imglib2/imglib2
/**
* Returns the pixels of an RandomAccessibleInterval of RealType as array of doubles.
* The pixels are sorted in flat iteration order.
*/
public static double[] asDoubleArray( final RandomAccessibleInterval< ? extends RealType< ? > > rai )
{
return asDoubleArray( Views.flatIterable( rai ) );
}
代码示例来源:origin: imglib/imglib2
@Test
public void testAsDoubleArray()
{
double[] expected = { 1, 2, 3, 4 };
Img< DoubleType > img = ArrayImgs.doubles( expected, 2, 2 );
double[] result = Util.asDoubleArray( img );
assertArrayEquals( expected, result, 0.0 );
}
内容来源于网络,如有侵权,请联系作者删除!