Package net.imglib2.img.basictypeaccess.array

Examples of net.imglib2.img.basictypeaccess.array.ShortArray


  // this is the constructor if you want it to be a variable
  public GenericShortType( final short value )
  {
    img = null;
    dataAccess = new ShortArray( 1 );
    setValue( value );
  }
View Full Code Here


  }

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

  }

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

  @Override
  public ArrayImg< T, ShortArray > createShortInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    final int numEntities = numEntitiesRangeCheck( dimensions, entitiesPerPixel );

    return new ArrayImg< T, ShortArray >( new ShortArray( numEntities ), dimensions, entitiesPerPixel );
  }
View Full Code Here

   * Creates an {@link ArrayImg}<{@link UnsignedShortType}, {@link ShortArray}
   * > 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

   * Creates an {@link ArrayImg}<{@link ShortType}, {@link ShortArray}>
   * 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

  }

  @Test
  public void testShortConstruction()
  {
    testConstruction( new ShortArray( 1 ) );
  }
View Full Code Here

        }

        if ( optimizable )
        {
//          System.out.println( "interval = " + Util.printInterval( interval ) );
          final Interval sliceInterval = t.transform( new BoundingBox( interval ) ).getInterval();
//          System.out.println( "transformed interval = " + Util.printInterval( sliceInterval ) );
          if ( iterableSource.supportsOptimizedCursor( sliceInterval ) )
          {
            // check for FlatIterationOrder
            boolean flat = FlatIterationOrder.class.isInstance( iterableSource.subIntervalIterationOrder( sliceInterval ) );
View Full Code Here

      else
      {
        component[ e ] = e;
      }
    }
    final MixedTransform t = new MixedTransform( n, n );
    t.setComponentMapping( component );
    t.setComponentInversion( inv );
    return new MixedTransformView< T >( randomAccessible, t );
  }
View Full Code Here

    final int[] component = new int[ n ];
    for ( int e = 0; e < n; ++e )
      component[ e ] = e;
    component[ fromAxis ] = toAxis;
    component[ toAxis ] = fromAxis;
    final MixedTransform t = new MixedTransform( n, n );
    t.setComponentMapping( component );
    return new MixedTransformView< T >( randomAccessible, t );
  }
View Full Code Here

TOP

Related Classes of net.imglib2.img.basictypeaccess.array.ShortArray

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.