Package net.imglib2.meta

Examples of net.imglib2.meta.AxisType


      sourceRandomAccess.setPosition( currentPositions[ 0 ], dimIndex );
      mapSingle( sourceRandomAccess, currentConverters[ 0 ] );
      return;
    }

    final ARGBType bi = new ARGBType();

    final RandomAccess< ARGBType > targetRandomAccess = target.randomAccess();

    targetRandomAccess.setPosition( min[ 1 ], 1 );
    while ( targetRandomAccess.getLongPosition( 1 ) <= max[ 1 ] )
    {
      sourceRandomAccess.setPosition( min[ 0 ], 0 );
      targetRandomAccess.setPosition( min[ 0 ], 0 );
      while ( targetRandomAccess.getLongPosition( 0 ) <= max[ 0 ] )
      {
        int aSum = 0, rSum = 0, gSum = 0, bSum = 0;
        for ( int i = 0; i < size; i++ )
        {
          sourceRandomAccess.setPosition( currentPositions[ i ], dimIndex );
          currentConverters[ i ].convert( sourceRandomAccess.get(), bi );

          // accumulate converted result
          final int value = bi.get();
          final int a = ARGBType.alpha( value );
          final int r = ARGBType.red( value );
          final int g = ARGBType.green( value );
          final int b = ARGBType.blue( value );
          aSum += a;
View Full Code Here


  {

    if ( ByteType.class.isAssignableFrom( type.getClass() ) )
    {
      final ByteArray array = new ByteArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< ByteType, ByteArray > container = new ByteAWTScreenImage( new ByteType( array ), array, dims );
      container.setLinkedType( new ByteType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( UnsignedByteType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( IntType.class.isAssignableFrom( type.getClass() ) )
    {
      final IntArray array = new IntArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< IntType, IntArray > container = new IntAWTScreenImage( new IntType( array ), array, dims );
      container.setLinkedType( new IntType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( UnsignedIntType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

      if ( binCounts[ i ] <= 0 ) { throw new IllegalArgumentException( "invalid bin count (<= 0)" ); }
    }

    // then build object

    counts = new ArrayImgFactory< LongType >().create( binCounts, new LongType() );

    accessor = counts.randomAccess();

    totalValues = 0;
  }
View Full Code Here

    }

    if ( ShortType.class.isAssignableFrom( type.getClass() ) )
    {
      final ShortArray array = new ShortArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< ShortType, ShortArray > container = new ShortAWTScreenImage( new ShortType( array ), array, dims );
      container.setLinkedType( new ShortType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( UnsignedShortType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    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

    }

    if ( UnsignedIntType.class.isAssignableFrom( type.getClass() ) )
    {
      final IntArray array = new IntArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< UnsignedIntType, IntArray > container = new UnsignedIntAWTScreenImage( new UnsignedIntType( array ), array, dims );
      container.setLinkedType( new UnsignedIntType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( FloatType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( UnsignedShortType.class.isAssignableFrom( type.getClass() ) )
    {
      final ShortArray array = new ShortArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< UnsignedShortType, ShortArray > container = new UnsignedShortAWTScreenImage( new UnsignedShortType( array ), array, dims );
      container.setLinkedType( new UnsignedShortType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    if ( IntType.class.isAssignableFrom( type.getClass() ) )
    {
View Full Code Here

    }

    if ( DoubleType.class.isAssignableFrom( type.getClass() ) )
    {
      final DoubleArray array = new DoubleArray( numElements( dims ) );
      final ArrayImgAWTScreenImage< DoubleType, DoubleArray > container = new DoubleAWTScreenImage( new DoubleType( array ), array, dims );
      container.setLinkedType( new DoubleType( container ) );
      return ( ArrayImgAWTScreenImage ) container;
    }

    throw new IllegalArgumentException( "Can't find AWTScreenImage for type " + type.toString() + "!" );
  }
View Full Code Here

public final class RealDoubleSamplerConverter< R extends RealType< R > > implements SamplerConverter< R, DoubleType >
{
  @Override
  public DoubleType convert( final Sampler< ? extends R > sampler )
  {
    return new DoubleType( new RealConvertingDoubleAccess< R >( sampler ) );
  }
View Full Code Here

TOP

Related Classes of net.imglib2.meta.AxisType

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.