public PlanarCursor( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; lastIndex = ( ( n > 1 ) ? container.dimensions[ 1 ] : 1 ) * container.dimensions[ 0 ] - 1; lastSliceIndex = container.numSlices() - 1; reset(); }
protected PlanarCursor( final PlanarCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); lastIndex = cursor.lastIndex; lastSliceIndex = cursor.lastSliceIndex; sliceIndex = cursor.sliceIndex; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }
protected PlanarCursor( final PlanarCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); lastIndex = cursor.lastIndex; lastSliceIndex = cursor.lastSliceIndex; sliceIndex = cursor.sliceIndex; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }
public PlanarCursor( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; lastIndex = ( ( n > 1 ) ? container.dimensions[ 1 ] : 1 ) * container.dimensions[ 0 ] - 1; lastSliceIndex = container.numSlices() - 1; reset(); }
protected PlanarLocalizingCursor( final PlanarLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); lastIndex = cursor.lastIndex; lastSliceIndex = cursor.lastSliceIndex; max = new int[ n ]; for ( int d = 0; d < n; ++d ) { max[ d ] = cursor.max[ d ]; position[ d ] = cursor.position[ d ]; } sliceIndex = cursor.sliceIndex; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }
public PlanarRandomAccess( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); sliceSteps = container.sliceSteps; width = ( int ) container.dimension( 0 ); type = container.createLinkedType(); type.updateIndex( 0 ); type.updateContainer( this ); }
protected PlanarLocalizingCursor( final PlanarLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); lastIndex = cursor.lastIndex; lastSliceIndex = cursor.lastSliceIndex; max = new int[ n ]; for ( int d = 0; d < n; ++d ) { max[ d ] = cursor.max[ d ]; position[ d ] = cursor.position[ d ]; } sliceIndex = cursor.sliceIndex; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }
public PlanarLocalizingCursor( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; lastIndex = ( ( n > 1 ) ? container.dimensions[ 1 ] : 1 ) * container.dimensions[ 0 ] - 1; lastSliceIndex = container.numSlices() - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) max[ d ] = ( int ) container.max( d ); reset(); }
public PlanarLocalizingCursor( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; lastIndex = ( ( n > 1 ) ? container.dimensions[ 1 ] : 1 ) * container.dimensions[ 0 ] - 1; lastSliceIndex = container.numSlices() - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) max[ d ] = ( int ) container.max( d ); reset(); }
public PlanarRandomAccess( final PlanarImg< T, ? > container ) { super( container.numDimensions() ); sliceSteps = container.sliceSteps; width = ( int ) container.dimension( 0 ); type = container.createLinkedType(); type.updateIndex( 0 ); type.updateContainer( this ); }
/** * Copy Constructor * * @param cursor - the cursor to copy from. */ protected PlanarPlaneSubsetCursor( final PlanarPlaneSubsetCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); sliceIndex = cursor.sliceIndex; planeSize = cursor.planeSize; lastPlaneIndex = cursor.lastPlaneIndex; type.updateContainer( this ); type.updateIndex( cursor.type.getIndex() ); }
/** * Copy Constructor * * @param cursor - the cursor to copy from. */ protected PlanarPlaneSubsetCursor( final PlanarPlaneSubsetCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); sliceIndex = cursor.sliceIndex; planeSize = cursor.planeSize; lastPlaneIndex = cursor.lastPlaneIndex; type.updateContainer( this ); type.updateIndex( cursor.type.getIndex() ); }
/** * Copy Constructor * * @param cursor * PlanarPlaneSubsetLocalizingCursor to copy from */ protected PlanarPlaneSubsetLocalizingCursor( final PlanarPlaneSubsetLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); sliceIndex = cursor.sliceIndex; lastIndexPlane = cursor.lastIndexPlane; maxX = cursor.maxX; dimX = cursor.dimX; for ( int d = 0; d < n; ++d ) position[ d ] = cursor.position[ d ]; type.updateContainer( this ); type.updateIndex( cursor.type.getIndex() ); }
/** * Copy Constructor * * @param cursor * PlanarPlaneSubsetLocalizingCursor to copy from */ protected PlanarPlaneSubsetLocalizingCursor( final PlanarPlaneSubsetLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); container = cursor.container; this.type = container.createLinkedType(); sliceIndex = cursor.sliceIndex; lastIndexPlane = cursor.lastIndexPlane; maxX = cursor.maxX; dimX = cursor.dimX; for ( int d = 0; d < n; ++d ) position[ d ] = cursor.position[ d ]; type.updateContainer( this ); type.updateIndex( cursor.type.getIndex() ); }
/** * Constructor * * @param container - the container this cursor shall work on. * @param interval - the interval to iterate over. */ public PlanarPlaneSubsetCursor( final PlanarImg< T, ? > container, final Interval interval ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; this.planeSize = ( ( n > 1 ) ? ( int ) interval.dimension( 1 ) : 1 ) * ( int ) interval.dimension( 0 ); this.lastPlaneIndex = planeSize - 1; this.sliceIndex = ( int ) ( offset( interval ) / planeSize ); reset(); }
/** * Constructor * * @param container - the container this cursor shall work on. * @param interval - the interval to iterate over. */ public PlanarPlaneSubsetCursor( final PlanarImg< T, ? > container, final Interval interval ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; this.planeSize = ( ( n > 1 ) ? ( int ) interval.dimension( 1 ) : 1 ) * ( int ) interval.dimension( 0 ); this.lastPlaneIndex = planeSize - 1; this.sliceIndex = ( int ) ( offset( interval ) / planeSize ); reset(); }
/** * Constructor * * @param container * PlanarImg this cursor shall work on. * @param interval * Interval over which shall be iterated. */ public PlanarPlaneSubsetLocalizingCursor( final PlanarImg< T, ? > container, final Interval interval ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; final int planeSize = ( ( n > 1 ) ? ( int ) interval.dimension( 1 ) : 1 ) * ( int ) interval.dimension( 0 ); this.lastIndexPlane = planeSize - 1; // Set current slice index sliceIndex = ( int ) ( offset( interval ) / planeSize ); maxX = ( int ) interval.max( 0 ); dimX = ( int ) container.dimension( 0 ); type.updateContainer( this ); // we're working on one container only. for ( int d = 2; d < n; ++d ) position[ d ] = ( int ) interval.min( d ); reset(); }
/** * Constructor * * @param container * PlanarImg this cursor shall work on. * @param interval * Interval over which shall be iterated. */ public PlanarPlaneSubsetLocalizingCursor( final PlanarImg< T, ? > container, final Interval interval ) { super( container.numDimensions() ); this.type = container.createLinkedType(); this.container = container; final int planeSize = ( ( n > 1 ) ? ( int ) interval.dimension( 1 ) : 1 ) * ( int ) interval.dimension( 0 ); this.lastIndexPlane = planeSize - 1; // Set current slice index sliceIndex = ( int ) ( offset( interval ) / planeSize ); maxX = ( int ) interval.max( 0 ); dimX = ( int ) container.dimension( 0 ); type.updateContainer( this ); // we're working on one container only. for ( int d = 2; d < n; ++d ) position[ d ] = ( int ) interval.min( d ); reset(); }