Package net.imglib2.type.numeric.real

Examples of net.imglib2.type.numeric.real.FloatType


    }

    if ( ShortType.class.isAssignableFrom( type.getClass() ) )
    {
      final ShortArray array = new ShortArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< ShortType, ShortArray > container = new ShortAWTScreenImage( new ShortType( array ), array, dims );
      container.setLinkedType( new ShortType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( UnsignedShortType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here


    }

    if ( UnsignedByteType.class.isAssignableFrom( type.getClass() ) )
    {
      final ByteArray array = new ByteArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< UnsignedByteType, ByteArray > container = new UnsignedByteAWTScreenImage( new UnsignedByteType( array ), array, dims );
      container.setLinkedType( new UnsignedByteType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( ShortType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( UnsignedIntType.class.isAssignableFrom( type.getClass() ) )
    {
      final IntArray array = new IntArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< UnsignedIntType, IntArray > container = new UnsignedIntAWTScreenImage( new UnsignedIntType( array ), array, dims );
      container.setLinkedType( new UnsignedIntType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( FloatType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( UnsignedShortType.class.isAssignableFrom( type.getClass() ) )
    {
      final ShortArray array = new ShortArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< UnsignedShortType, ShortArray > container = new UnsignedShortAWTScreenImage( new UnsignedShortType( array ), array, dims );
      container.setLinkedType( new UnsignedShortType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( IntType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( DoubleType.class.isAssignableFrom( type.getClass() ) )
    {
      final DoubleArray array = new DoubleArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< DoubleType, DoubleArray > container = new DoubleAWTScreenImage( new DoubleType( array ), array, dims );
      container.setLinkedType( new DoubleType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    throw new IllegalArgumentException( "Can't find AWTScreenImage for type " + type.toString() + "!" );
  }
View Full Code Here

public final class RealDoubleSamplerConverter< R extends RealType< R > > implements SamplerConverter< R, DoubleType >
{
  @Override
  public DoubleType convert( final Sampler< ? extends R > sampler )
  {
    return new DoubleType( new RealConvertingDoubleAccess< R >( sampler ) );
  }
View Full Code Here

    }

    if ( FloatType.class.isAssignableFrom( type.getClass() ) )
    {
      final FloatArray array = new FloatArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< FloatType, FloatArray > container = new FloatAWTScreenImage( new FloatType( array ), array, dims );
      container.setLinkedType( new FloatType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( DoubleType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

   * Create an {@link ArrayImg}<{@link FloatType}, {@link FloatArray}>.
   */
  @SuppressWarnings( "unchecked" )
  final static public ArrayImg< FloatType, FloatArray > floats( final long... dim )
  {
    return ( ArrayImg< FloatType, FloatArray > ) new ArrayImgFactory< FloatType >().create( dim, new FloatType() );
  }
View Full Code Here

   */
  final public static ArrayImg< FloatType, FloatArray > floats( final float[] array, final long... dim )
  {
    final FloatArray access = new FloatArray( array );
    final ArrayImg< FloatType, FloatArray > img = new ArrayImg< FloatType, FloatArray >( access, dim, new Fraction() );
    final FloatType t = new FloatType( img )
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * Create an {@link PlanarImg}<{@link FloatType}, {@link FloatArray}>.
   */
  @SuppressWarnings( "unchecked" )
  final static public PlanarImg< FloatType, FloatArray > floats( final long... dim )
  {
    return ( PlanarImg< FloatType, FloatArray > ) new PlanarImgFactory< FloatType >().create( dim, new FloatType() );
  }
View Full Code Here

TOP

Related Classes of net.imglib2.type.numeric.real.FloatType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.