Package net.imglib2.type.numeric.real

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


    max[ dimX ] = target.max( X );
    max[ dimY ] = target.max( Y );

    // TODO: this is ugly, but the only way to make sure, that iteration
    // order fits in the case of one sized dims. Tobi?
    final IterableInterval< A > ii = Views.iterable( Views.interval( source, new FinalInterval( min, max ) ) );

    final Cursor< A > sourceCursor = ii.cursor();

    if ( target.iterationOrder().equals( ii.iterationOrder() ) && !( sourceCursor instanceof RandomAccessibleIntervalCursor ) )
    {
      final Cursor< B > targetCursor = target.cursor();
      while ( targetCursor.hasNext() )
      {
        converter.convert( sourceCursor.next(), targetCursor.next() );
      }
    }
    else if ( target.iterationOrder() instanceof FlatIterationOrder )
    {
      final Cursor< B > targetCursor = target.cursor();
      targetCursor.fwd();
      final FinalInterval sourceInterval = new FinalInterval( min, max );

      // use localizing cursor
      final RandomAccess< A > sourceRandomAccess = source.randomAccess( sourceInterval );
      sourceRandomAccess.setPosition( position );
View Full Code Here


    min[ dimX ] = target.min( dimX );
    min[ dimY ] = target.min( dimY );
    max[ dimX ] = target.max( dimX );
    max[ dimY ] = target.max( dimY );
    final FinalInterval sourceInterval = new FinalInterval( min, max );

    final long cr = -target.dimension( dimX );

    final RandomAccess< B > targetRandomAccess = target.randomAccess( target );
    final RandomAccess< A > sourceRandomAccess = source.randomAccess( sourceInterval );
View Full Code Here

    if ( dimIndex < 0 )
    {
      // there is only converter[0]
      // use it to map the current position
      final RandomAccess< A > sourceRandomAccess = source.randomAccess( new FinalInterval( min, max ) );
      sourceRandomAccess.setPosition( min );
      mapSingle( sourceRandomAccess, converters.get( 0 ) );
      return;
    }

    final int size = updateCurrentArrays();

    min[ dimIndex ] = max[ dimIndex ] = currentPositions[ 0 ];
    for ( int i = 1; i < size; ++i )
      if ( currentPositions[ i ] < min[ dimIndex ] )
        min[ dimIndex ] = currentPositions[ i ];
      else if ( currentPositions[ i ] > max[ dimIndex ] )
        max[ dimIndex ] = currentPositions[ i ];
    final RandomAccess< A > sourceRandomAccess = source.randomAccess( new FinalInterval( min, max ) );
    sourceRandomAccess.setPosition( min );

    if ( size == 1 )
    {
      // there is only one active converter: converter[0]
View Full Code Here

    if ( dimIndex < 0 )
    {
      // there is only converter[0]
      // use it to map the current position
      final RandomAccess< A > sourceRandomAccess = source.randomAccess( new FinalInterval( min, max ) );
      sourceRandomAccess.setPosition( min );
      mapSingle( sourceRandomAccess, converters.get( 0 ) );
      return;
    }

    final int size = updateCurrentArrays();

    min[ dimIndex ] = max[ dimIndex ] = currentPositions[ 0 ];
    for ( int i = 1; i < size; ++i )
      if ( currentPositions[ i ] < min[ dimIndex ] )
        min[ dimIndex ] = currentPositions[ i ];
      else if ( currentPositions[ i ] > max[ dimIndex ] )
        max[ dimIndex ] = currentPositions[ i ];
    final RandomAccess< A > sourceRandomAccess = source.randomAccess( new FinalInterval( min, max ) );
    sourceRandomAccess.setPosition( min );

    if ( size == 1 )
    {
      // there is only one active converter: converter[0]
View Full Code Here

    max[ dimY ] = target.max( Y );
    min[ projectedDimension ] = projectedDimMinPos;
    max[ projectedDimension ] = projectedDimMaxPos;

    // get tailored random access
    final FinalInterval sourceInterval = new FinalInterval( min, max );
    final Cursor< B > targetCursor = target.localizingCursor();
    final RandomAccess< A > sourceRandomAccess = source.randomAccess( sourceInterval );
    sourceRandomAccess.setPosition( position );

    projectionSampler.setRandomAccess( sourceRandomAccess );
View Full Code Here

    min[ X ] = target.min( X );
    min[ Y ] = target.min( Y );
    max[ X ] = target.max( X );
    max[ Y ] = target.max( Y );

    final IterableInterval< A > srcIterable = Views.iterable( Views.interval( source, new FinalInterval( min, max ) ) );
    final Cursor< B > targetCursor = target.localizingCursor();

    if ( target.iterationOrder().equals( srcIterable.iterationOrder() ) )
    {
      // use cursors
View Full Code Here

   * @return bounding box as an interval.
   */
  public Interval getInterval()
  {
    orderMinMax();
    return new FinalInterval( corner1, corner2 );
  }
View Full Code Here

  }

  @Override
  public FlatIterationOrder iterationOrder()
  {
    return new FlatIterationOrder( this );
  }
View Full Code Here

    }

    @Override
    public Object iterationOrder()
    {
      return hasFlatIterationOrder ? new FlatIterationOrder( interval ) : this;
    }
View Full Code Here

  }

  @Override
  public FlatIterationOrder iterationOrder()
  {
    return new FlatIterationOrder( this );
  }
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.