Package net.imglib2.util

Examples of net.imglib2.util.Fraction


  @Override
  public NativeImg< UnsignedByteType, ? extends ByteAccess > createSuitableNativeImg( final NativeImgFactory< UnsignedByteType > storageFactory, final long dim[] )
  {
    // create the container
    final NativeImg<UnsignedByteType, ? extends ByteAccess> container = storageFactory.createByteInstance( dim, new Fraction() );

    // create a Type that is linked to the container
    final UnsignedByteType linkedType = new UnsignedByteType( container );

    // pass it to the NativeContainer
View Full Code Here


   * reusing a passed byte[] array.
   */
  final public static ArrayImg< UnsignedByteType, ByteArray > unsignedBytes( final byte[] array, final long... dim )
  {
    final ByteArray access = new ByteArray( array );
    final ArrayImg< UnsignedByteType, ByteArray > img = new ArrayImg< UnsignedByteType, ByteArray >( access, dim, new Fraction() );
    final UnsignedByteType t = new UnsignedByteType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * a passed byte[] array.
   */
  final public static ArrayImg< ByteType, ByteArray > bytes( final byte[] array, final long... dim )
  {
    final ByteArray access = new ByteArray( array );
    final ArrayImg< ByteType, ByteArray > img = new ArrayImg< ByteType, ByteArray >( access, dim, new Fraction() );
    final ByteType t = new ByteType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * > reusing a passed short[] array.
   */
  final public static ArrayImg< UnsignedShortType, ShortArray > unsignedShorts( final short[] array, final long... dim )
  {
    final ShortArray access = new ShortArray( array );
    final ArrayImg< UnsignedShortType, ShortArray > img = new ArrayImg< UnsignedShortType, ShortArray >( access, dim, new Fraction() );
    final UnsignedShortType t = new UnsignedShortType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * reusing a passed short[] array.
   */
  final public static ArrayImg< ShortType, ShortArray > shorts( final short[] array, final long... dim )
  {
    final ShortArray access = new ShortArray( array );
    final ArrayImg< ShortType, ShortArray > img = new ArrayImg< ShortType, ShortArray >( access, dim, new Fraction() );
    final ShortType t = new ShortType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * reusing a passed int[] array.
   */
  final public static ArrayImg< UnsignedIntType, IntArray > unsignedInts( final int[] array, final long... dim )
  {
    final IntArray access = new IntArray( array );
    final ArrayImg< UnsignedIntType, IntArray > img = new ArrayImg< UnsignedIntType, IntArray >( access, dim, new Fraction() );
    final UnsignedIntType t = new UnsignedIntType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * passed int[] array.
   */
  final public static ArrayImg< IntType, IntArray > ints( final int[] array, final long... dim )
  {
    final IntArray access = new IntArray( array );
    final ArrayImg< IntType, IntArray > img = new ArrayImg< IntType, IntArray >( access, dim, new Fraction() );
    final IntType t = new IntType( img )
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * a passed long[] array.
   */
  final public static ArrayImg< LongType, LongArray > longs( final long[] array, final long... dim )
  {
    final LongArray access = new LongArray( array );
    final ArrayImg< LongType, LongArray > img = new ArrayImg< LongType, LongArray >( access, dim, new Fraction() );
    final LongType t = new LongType( img )
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

   * reusing a passed float[] array.
   */
  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

   * reusing a passed double[] array.
   */
  final public static ArrayImg< DoubleType, DoubleArray > doubles( final double[] array, final long... dim )
  {
    final DoubleArray access = new DoubleArray( array );
    final ArrayImg< DoubleType, DoubleArray > img = new ArrayImg< DoubleType, DoubleArray >( access, dim, new Fraction() );
    final DoubleType t = new DoubleType( img )
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

TOP

Related Classes of net.imglib2.util.Fraction

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.