Package net.imglib2.type.numeric.integer

Examples of net.imglib2.type.numeric.integer.LongType


   */
  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


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

    { 5, 4, 3 },
    { 2, 1, 0 }
    } };
    for ( int i = 0; i < offsets.length; i++ )
    {
      final Img< LongType > img = new ArrayImgFactory< LongType >().create( new long[] { 3, 3 }, new LongType() );
      ImgUtil.copy( input, offsets[ i ], strides[ i ], img );
      final RandomAccess< LongType > ra = img.randomAccess();
      final long[] location = new long[ 2 ];
      for ( int x = 0; x < 3; x++ )
      {
View Full Code Here

    final long[][] expected = {
        { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
        { 0, 3, 6, 1, 4, 7, 2, 5, 8 },
        { 8, 7, 6, 5, 4, 3, 2, 1, 0 } };
    final long[] output = new long[ 9 ];
    final Img< LongType > img = new ArrayImgFactory< LongType >().create( new long[] { 3, 3 }, new LongType() );
    final RandomAccess< LongType > ra = img.randomAccess();
    final long[] location = new long[ 2 ];
    for ( int x = 0; x < 3; x++ )
    {
      location[ 0 ] = x;
View Full Code Here

    final int[][] expected = {
        { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
        { 0, 3, 6, 1, 4, 7, 2, 5, 8 },
        { 8, 7, 6, 5, 4, 3, 2, 1, 0 } };
    final int[] output = new int[ 9 ];
    final Img< LongType > img = new ArrayImgFactory< LongType >().create( new long[] { 3, 3 }, new LongType() );
    final RandomAccess< LongType > ra = img.randomAccess();
    final long[] location = new long[ 2 ];
    for ( int x = 0; x < 3; x++ )
    {
      location[ 0 ] = x;
View Full Code Here

    }

    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

TOP

Related Classes of net.imglib2.type.numeric.integer.LongType

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.