net.imglib2.util.Util.round()方法的使用及代码示例

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

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

Util.round介绍

暂无

代码示例

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

@Override
public void setReal( final float real )
{
  setInteger( Util.round( real ) );
}

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

/**
 * Create and integer packed representation of this ARGB value. Crop
 */
public int toARGBInt()
{
  final int a = ( int ) Math.max( 0, Math.min( 255, Util.round( getA() * 255 ) ) );
  final int r = ( int ) Math.max( 0, Math.min( 255, Util.round( getR() * 255 ) ) );
  final int g = ( int ) Math.max( 0, Math.min( 255, Util.round( getG() * 255 ) ) );
  final int b = ( int ) Math.max( 0, Math.min( 255, Util.round( getB() * 255 ) ) );
  return ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b;
}

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

/**
 * Create and integer packed representation of this ARGB value. Crop
 */
public int toARGBInt()
{
  final int a = ( int ) Math.max( 0, Math.min( 255, Util.round( getA() * 255 ) ) );
  final int r = ( int ) Math.max( 0, Math.min( 255, Util.round( getR() * 255 ) ) );
  final int g = ( int ) Math.max( 0, Math.min( 255, Util.round( getG() * 255 ) ) );
  final int b = ( int ) Math.max( 0, Math.min( 255, Util.round( getB() * 255 ) ) );
  return ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b;
}

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

@Override
public void setReal( final double real )
{
  setInteger( Util.round( real ) );
}

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

@Override
public void mul( final double c )
{
  set( ( int ) Util.round( get() * c ) );
}

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

@Override
public void mul( final double c )
{
  final short a = getShort();
  setShort( ( short ) Util.round( a * c ) );
}

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

@Override
public void mul( final float c )
{
  final byte a = getByte();
  setByte( ( byte ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  set( Util.round( ( get() * c ) ) );
}

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

@Override
public void mul( final float c )
{
  final short a = getShort();
  setShort( ( short ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  setLong( Util.round( getLong() * c ) );
}

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

@Override
public void mul( final float c )
{
  final short a = getShort();
  setShort( ( short ) Util.round( a * c ) );
}

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

@Override
public void mul( final float c )
{
  set( Util.round( ( double ) ( get() * c ) ) );
}

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

@Override
public void mul( final float c )
{
  set( Util.round( ( double ) ( get() * c ) ) );
}

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

@Override
public void mul( final double c )
{
  final int a = getInt();
  setInt( ( int ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  final byte a = getByte();
  setByte( ( byte ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  setLong( Util.round( getLong() * c ) );
}

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

@Override
public void mul( final double c )
{
  final int a = getInt();
  setInt( ( int ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  final short a = getShort();
  setShort( ( short ) Util.round( a * c ) );
}

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

@Override
public void mul( final double c )
{
  final long a = getUnsignedInt( getInt() );
  setInt( getCodedSignedInt( ( int ) Util.round( a * c ) ) );
}

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

@Override
public void mul( final float c )
{
  final long a = getUnsignedInt( getInt() );
  setInt( getCodedSignedInt( Util.round( a * c ) ) );
}

相关文章