Package net.imglib2.type.numeric.real

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


  public static < T extends NativeType< T >> ArrayImgAWTScreenImage< T, ? > emptyScreenImage( final T type, final long[] dims )
  {

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

    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;
    }
View Full Code Here


  }

  @Override
  public CellImg< T, ByteArray, DefaultCell< ByteArray > > createByteInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return createInstance( new ByteArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

  }

  @Override
  public NativeImg< T, ByteArray > createByteInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return new PlanarImg< T, ByteArray >( new ByteArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

  }

  @Override
  public CellImg< T, CharArray, DefaultCell< CharArray > > createCharInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return createInstance( new CharArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

  }

  @Override
  public NativeImg< T, CharArray > createCharInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return new PlanarImg< T, CharArray >( new CharArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

      return ( ArrayImgAWTScreenImage ) container;
    }

    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;
    }
View Full Code Here

  }

  @Override
  public CellImg< T, DoubleArray, DefaultCell< DoubleArray > > createDoubleInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return createInstance( new DoubleArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

  }

  @Override
  public NativeImg< T, DoubleArray > createDoubleInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return new PlanarImg< T, DoubleArray >( new DoubleArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

      return ( ArrayImgAWTScreenImage ) container;
    }

    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;
    }
View Full Code Here

  }

  @Override
  public CellImg< T, FloatArray, DefaultCell< FloatArray > > createFloatInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return createInstance( new FloatArray( 1 ), dimensions, entitiesPerPixel );
  }
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.