Examples of UnsignedByteType


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

    assertEquals( 5, hist.firstDataValue().get() );

    assertEquals( 256, hist.getBinCount() );
    assertEquals( 11, hist.totalCount() );
    assertEquals( 1, hist.frequency( new UnsignedByteType( 3 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 5 ) ) );
    assertEquals( 1, hist.frequency( new UnsignedByteType( 7 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 9 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 10 ) ) );
    assertEquals( 0, hist.lowerTailCount() );
    assertEquals( 0, hist.upperTailCount() );

    binMapper = new Integer1dBinMapper< UnsignedByteType >( 4, 8, true );

    hist = new Histogram1d< UnsignedByteType >( data, binMapper );

    assertEquals( 8, hist.getBinCount() );
    assertEquals( 11, hist.distributionCount() );
    assertEquals( 1, hist.frequency( new UnsignedByteType( 3 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 5 ) ) );
    assertEquals( 1, hist.frequency( new UnsignedByteType( 7 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 9 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 10 ) ) );
    assertEquals( 1, hist.lowerTailCount() );
    assertEquals( 3, hist.upperTailCount() );

    binMapper = new Integer1dBinMapper< UnsignedByteType >( 5, 5, false );

    hist = new Histogram1d< UnsignedByteType >( data, binMapper );

    assertEquals( 5, hist.getBinCount() );
    assertEquals( 7, hist.distributionCount() );
    assertEquals( 0, hist.frequency( new UnsignedByteType( 3 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 5 ) ) );
    assertEquals( 1, hist.frequency( new UnsignedByteType( 7 ) ) );
    assertEquals( 3, hist.frequency( new UnsignedByteType( 9 ) ) );
    assertEquals( 0, hist.frequency( new UnsignedByteType( 10 ) ) );
    assertEquals( 0, hist.lowerTailCount() );
    assertEquals( 0, hist.upperTailCount() );
  }
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

  public static void main( final String[] args )
  {
    System.out.println( "== UNSIGNED 8-BIT ==" );
    new HistogramPerformanceTest< UnsignedByteType >().run(
        new UnsignedByteType(), 256 );
    System.out.println( "== UNSIGNED 16-BIT ==" );
    new HistogramPerformanceTest< UnsignedShortType >().run(
        new UnsignedShortType(), 65536 );
  }
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.