@Override public DoubleArray createArray( final int numEntities ) { return new DoubleArray( numEntities ); } }
@Override public DoubleArray createArray( final int numEntities ) { return new DoubleArray( numEntities ); } }
@Override public DoubleArray emptyArray(final int entities) { return new DoubleArray(entities); }
@Override public DoubleArray emptyArray(final int entities) { return new DoubleArray(entities); }
@Override public NativeImg< T, DoubleArray > createDoubleInstance( long[] dimensions, final int entitiesPerPixel ) { if ( dimensions.length > 5 ) throw new RuntimeException( "Unsupported dimensionality: " + dimensions.length ); return new ImagePlusImg< T, DoubleArray >( new DoubleArray( 1 ), dimensions, entitiesPerPixel ); }
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 ); }
/** * 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 ) { return complexDoubles( new DoubleArray( array ), dim ); }
public ComplexDoubleType( final double r, final double i ) { img = null; dataAccess = new DoubleArray( 2 ); set( r, i ); }
/** * 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 ) { return complexDoubles( new DoubleArray( array ), dim ); }
/** * 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 ) { return doubles( new DoubleArray( array ), dim ); }
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 ); }
/** * 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 ) { return doubles( new DoubleArray( array ), dim ); }
@Override public DoubleArray wrap( final A access ) { return new DoubleArray( ( double[] ) access.getCurrentStorageArray() ); }
@Override public DoubleArray load( final ByteBuffer bytes, final int numElements ) { return new DoubleArray( loadData( bytes, numElements ) ); } }
public DoubleType( final double value ) { img = null; dataAccess = new DoubleArray( 1 ); set( value ); }
public DoubleType( final double value ) { img = null; dataAccess = new DoubleArray( 1 ); set( value ); }
public ComplexDoubleType( final double r, final double i ) { img = null; dataAccess = new DoubleArray( 2 ); set( r, i ); }
public DoubleImage(final long[] dim, final double[] pixels) { super(new DoubleArray(pixels), dim, new Fraction()); setLinkedType(new DoubleType(this)); } }
/** * Wraps the given primitive array in an {@link ArrayDataAccess} object of the * proper type. */ private ArrayDataAccess<?> createArrayDataAccess(final Object newPlane) { if (newPlane instanceof byte[]) { return new ByteArray((byte[]) newPlane); } else if (newPlane instanceof short[]) { return new ShortArray((short[]) newPlane); } else if (newPlane instanceof int[]) { return new IntArray((int[]) newPlane); } else if (newPlane instanceof float[]) { return new FloatArray((float[]) newPlane); } else if (newPlane instanceof long[]) { return new LongArray((long[]) newPlane); } else if (newPlane instanceof double[]) { return new DoubleArray((double[]) newPlane); } return null; }
/** * Wraps the given primitive array in an {@link ArrayDataAccess} object of the * proper type. */ private ArrayDataAccess<?> createArrayDataAccess(final Object newPlane) { if (newPlane instanceof byte[]) { return new ByteArray((byte[]) newPlane); } else if (newPlane instanceof short[]) { return new ShortArray((short[]) newPlane); } else if (newPlane instanceof int[]) { return new IntArray((int[]) newPlane); } else if (newPlane instanceof float[]) { return new FloatArray((float[]) newPlane); } else if (newPlane instanceof long[]) { return new LongArray((long[]) newPlane); } else if (newPlane instanceof double[]) { return new DoubleArray((double[]) newPlane); } return null; }