Examples of UnsignedByteType


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

    }

    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

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

   * Create an {@link ArrayImg}<{@link UnsignedByteType}, {@link ByteArray}>.
   */
  @SuppressWarnings( "unchecked" )
  final static public ArrayImg< UnsignedByteType, ByteArray > unsignedBytes( final long... dim )
  {
    return ( ArrayImg< UnsignedByteType, ByteArray > ) new ArrayImgFactory< UnsignedByteType >().create( dim, new UnsignedByteType() );
  }
View Full Code Here

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

   */
  final public static ArrayImg< UnsignedByteType, ByteArray > unsignedBytes( final byte[] array, final long... dim )
  {
    final ByteArray access = new ByteArray( array );
    final ArrayImg< UnsignedByteType, ByteArray > img = new ArrayImg< UnsignedByteType, ByteArray >( access, dim, new Fraction() );
    final UnsignedByteType t = new UnsignedByteType( img );   
    img.setLinkedType( t );
    return img;
  }
View Full Code Here

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

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

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

    final List< UnsignedByteType > list = new ArrayList< UnsignedByteType >();
    list.add( null );
    list.add( null );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 3 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 7 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 9 ) );
    assertEquals( 2, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 12 ) );
    assertEquals( 2, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 0 ) );
    assertEquals( 1, hist.frequency( list ) );
  }
View Full Code Here

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

    assertEquals( 5, hist.upperTailCount() );
    assertEquals( 3, hist.upperTailCount( 0 ) );
    assertEquals( 2, hist.upperTailCount( 1 ) );
    assertEquals( 0, hist.ignoredCount() );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 3 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 7 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 9 ) );
    assertEquals( 2, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 12 ) );
    assertEquals( 2, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 0 ) );
    assertEquals( 1, hist.frequency( list ) );
  }
View Full Code Here

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

    assertEquals( 0, hist.upperTailCount() );
    assertEquals( 0, hist.upperTailCount( 0 ) );
    assertEquals( 0, hist.upperTailCount( 1 ) );
    assertEquals( 9, hist.ignoredCount() );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 3 ) );
    list.set( 1, new UnsignedByteType( 4 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 7 ) );
    assertEquals( 1, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 7 ) );
    list.set( 1, new UnsignedByteType( 1 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 10 ) );
    list.set( 1, new UnsignedByteType( 9 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 9 ) );
    list.set( 1, new UnsignedByteType( 12 ) );
    assertEquals( 0, hist.frequency( list ) );

    list.set( 0, new UnsignedByteType( 5 ) );
    list.set( 1, new UnsignedByteType( 0 ) );
    assertEquals( 0, hist.frequency( list ) );
  }
View Full Code Here

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

  }

  private List< UnsignedByteType > getData1()
  {
    final List< UnsignedByteType > data = new ArrayList< UnsignedByteType >();
    data.add( new UnsignedByteType( 5 ) );
    data.add( new UnsignedByteType( 3 ) );
    data.add( new UnsignedByteType( 5 ) );
    data.add( new UnsignedByteType( 9 ) );
    data.add( new UnsignedByteType( 10 ) );
    data.add( new UnsignedByteType( 7 ) );
    data.add( new UnsignedByteType( 10 ) );
    data.add( new UnsignedByteType( 10 ) );
    data.add( new UnsignedByteType( 9 ) );
    data.add( new UnsignedByteType( 9 ) );
    data.add( new UnsignedByteType( 5 ) );
    return data;
  }
View Full Code Here

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

  }

  private List< UnsignedByteType > getData2()
  {
    final List< UnsignedByteType > data = new ArrayList< UnsignedByteType >();
    data.add( new UnsignedByteType( 4 ) );
    data.add( new UnsignedByteType( 4 ) );
    data.add( new UnsignedByteType( 7 ) );
    data.add( new UnsignedByteType( 7 ) );
    data.add( new UnsignedByteType( 1 ) );
    data.add( new UnsignedByteType( 1 ) );
    data.add( new UnsignedByteType( 9 ) );
    data.add( new UnsignedByteType( 9 ) );
    data.add( new UnsignedByteType( 12 ) );
    data.add( new UnsignedByteType( 12 ) );
    data.add( new UnsignedByteType( 0 ) );
    return data;
  }
View Full Code Here

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

  @Before
  public void setUp()
  {
    final long[] dimension = new long[] { 100, 60, 10, 30, 50 };
    img = new ArrayImgFactory< UnsignedByteType >().create( dimension, new UnsignedByteType() );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.