Package net.imglib2.type.numeric.real

Examples of net.imglib2.type.numeric.real.FloatType


  /**
   * Generate a test image
   */
  protected Img< FloatType > makeSinglePixel3D( final long cubeLength, final long x, final long y, final long z )
  {
    return makeImage( new FloatType(), new SinglePixel3D( x, y, z ), new long[] { cubeLength, cubeLength, cubeLength } );
  }
View Full Code Here


  }

  @Test
  public void testFloatDefaultCellSize()
  {
    testDefaultCellSize( new FloatType() );
  }
View Full Code Here

  }

  @Test
  public void testFloatDefaultCellDimensions()
  {
    testDefaultCellDimensions( new FloatType() );
  }
View Full Code Here

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

    final float[][] 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 float[] output = new float[ 9 ];
    final Img< FloatType > img = new ArrayImgFactory< FloatType >().create( new long[] { 3, 3 }, new FloatType() );
    final RandomAccess< FloatType > ra = img.randomAccess();
    final long[] location = new long[ 2 ];
    for ( int x = 0; x < 3; x++ )
    {
      location[ 0 ] = x;
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

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

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

    // pass it to the NativeContainer
View Full Code Here

  {
    return new LongType( get() );
  }

  @Override
  public Fraction getEntitiesPerPixel() { return new Fraction(); }
View Full Code Here

  {
    this( ( short ) 0 );
  }

  @Override
  public Fraction getEntitiesPerPixel() { return new Fraction(); }
View Full Code Here

  @Override
  public NativeImg<Unsigned12BitType, ? extends LongAccess> createSuitableNativeImg( final NativeImgFactory<Unsigned12BitType> storageFactory, final long dim[] )
  {
    // create the container
    final NativeImg<Unsigned12BitType, ? extends LongAccess> container = storageFactory.createLongInstance( dim, new Fraction( getBitsPerPixel(), 64 ) );

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

    // pass it to the NativeContainer
View Full Code Here

TOP

Related Classes of net.imglib2.type.numeric.real.FloatType

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.