Package net.imglib2.img.basictypeaccess.array

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


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

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


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

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

  }

  public NativeARGBDoubleType( final double a, final double r, final double g, final double b )
  {
    img = null;
    dataAccess = new DoubleArray( 4 );
    set( a, r, g, b );
  }
View Full Code Here

  }

  @Test
  public void testDoubleConstruction()
  {
    testConstruction( new DoubleArray( 1 ) );
  }
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

  }

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

  // this is the constructor if you want it to be a variable
  public ComplexFloatType( final float r, final float i )
  {
    img = null;
    dataAccess = new FloatArray( 2 );
    set( r, i );
  }
View Full Code Here

   * Create an {@link Image} with {@code data}. Writing to the {@code data}
   * array will update the {@link Image}.
   */
  public ARGBScreenImage( final int width, final int height, final int[] data )
  {
    super( new IntArray( data ), new long[]{ width, height }, new Fraction() );
    setLinkedType( new ARGBType( this ) );
    this.data = data;

    final SampleModel sampleModel = ARGB_COLOR_MODEL.createCompatibleWritableRaster( 1, 1 ).getSampleModel()
        .createCompatibleSampleModel( width, height );
View Full Code Here

TOP

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

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.