net.imglib2.type.Type.set()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(150)

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

Type.set介绍

[英]Sets the value of another Type.
[中]设置其他类型的值。

代码示例

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

@Override
  public void convert( final T input, final T output )
  {
    output.set( input );
  }
}

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

@Override
  public void convert( final T input, final T output )
  {
    output.set( input );
  }
}

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

@Override
public void setValue( final T value )
{
  this.value.set( value );
}

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

@Override
public void setValue( final T value )
{
  this.value.set( value );
}

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

@Override
  public void compute(final T output) {
    output.set(constant);
  }
}

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

@Override
public void setValue( final T value )
{
  this.value.set( value );
}

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

@Override
public void setValue( final T value )
{
  this.value.set( value );
}

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

@Override
  public void write( final T source, final T target )
  {
    target.set( source );
  }
}

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

@Override
public void convert( A input, T output )
{
  output.set( input.get( i ) );
}

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

/**
   * Sets the possibly converted value at the current location
   * 
   * @param type
   *            - the value
   */
  public void set( final T type )
  {
    randomAccess.get().set( type );
  }
}

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

@Override
public void convert( A input, T output )
{
  output.set( input.get( i ) );
}

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

/**
   * Sets the possibly converted value at the current location
   * 
   * @param type - the value
   */
  public void set( final T type )
  {
    randomAccess.get().set( type );
  }
}

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

@Override
public void compute(final I input, final O output) {
  if (!input.get()) output.set(defaultVal);
}

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

private BoundaryPixel createBoundaryPixel( final Localizable position, final T value, final int nextNeighborIndex )
{
  if ( reusableBoundaryPixels.isEmpty() )
    return new BoundaryPixel( position, value, nextNeighborIndex );
  final BoundaryPixel p = reusableBoundaryPixels.pop();
  p.setPosition( position );
  p.value.set( value );
  p.nextNeighborIndex = nextNeighborIndex;
  return p;
}

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

private BoundaryPixel createBoundaryPixel( final Localizable position, final T value, final int nextNeighborIndex )
{
  if ( reusableBoundaryPixels.isEmpty() )
    return new BoundaryPixel( position, value, nextNeighborIndex );
  else
  {
    final BoundaryPixel p = reusableBoundaryPixels.pop();
    p.setPosition( position );
    p.value.set( value );
    p.nextNeighborIndex = nextNeighborIndex;
    return p;
  }
}

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

protected void integrateLine( final int d, final RandomAccess< T > cursor, final T sum, final long size )
{
  // init sum on first pixel that is not zero
  sum.set( cursor.get() );
  for ( int i = 2; i < size; ++i )
  {
    cursor.fwd( d );
    sum.add( cursor.get() );
    cursor.get().set( sum );
  }
}

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

@Override
public T get()
{
  t.set( source.get() );
  t.mul( scalingFunction.applyAsDouble( source ) );
  return t;
}

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

private void writeLine()
  {
    final int max = buflen - k1k1;
    for ( int i = k1k1; i < max; ++i )
    {
      b1.updateIndex( i );
      out.get().set( b1 );
      out.fwd( d );
    }
  }
}

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

private static < A extends Type< A > > ListImg< A > copyWithType( final ListImg< A > img )
{
  final ListImg< A > copy = new ListImg< A >( img.dimension, img.firstElement().createVariable() );
  final ListCursor< A > source = img.cursor();
  final ListCursor< A > target = copy.cursor();
  while ( source.hasNext() )
    target.next().set( source.next() );
  return copy;
}

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

private static < A extends Type< A > > ListImg< A > copyWithType( final ListImg< A > img )
{
  final ListImg< A > copy = new ListImg< A >( img.dimension, img.firstElement().createVariable() );
  final ListCursor< A > source = img.cursor();
  final ListCursor< A > target = copy.cursor();
  while ( source.hasNext() )
    target.next().set( source.next() );
  return copy;
}

相关文章

微信公众号

最新文章

更多