public NtreeCursor( final NtreeImg< T, ? > img ) { super( img ); this.img = img; this.type = img.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = 0; position[ 0 ]--; type.updateContainer( this ); }
@Override public void reset() { type.updateIndex( offset - 1 ); type.updateContainer( this ); }
/** * {@inheritDoc} */ @Override public final void reset() { // Set index inside the slice type.updateIndex( -1 ); type.updateContainer( this ); }
@Override public void fwd() { if ( ++index > lastIndex ) { index = 0; ++sliceIndex; type.updateContainer( this ); } type.updateIndex( index ); }
@Override public void reset() { sliceIndex = 0; index = -1; type.updateIndex( -1 ); type.updateContainer( this ); }
public NtreeCursor( final NtreeImg< T, ? > img ) { super( img ); this.img = img; this.type = img.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = 0; position[ 0 ]--; type.updateContainer( this ); }
private NtreeCursor( final NtreeCursor< T > cursor ) { super( cursor ); this.img = cursor.img; this.type = img.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = cursor.position[ d ]; type.updateContainer( this ); }
private NtreeCursor( final NtreeCursor< T > cursor ) { super( cursor ); this.img = cursor.img; this.type = img.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = cursor.position[ d ]; type.updateContainer( this ); }
@Override public void reset() { position[ 0 ] = -1; for ( int d = 1; d < n; d++ ) position[ d ] = 0; sliceIndex = 0; index = -1; type.updateIndex( -1 ); type.updateContainer( this ); } }
@Override public void reset() { sliceIndex = 0; index = -1; type.updateIndex( -1 ); type.updateContainer( this ); }
/** * {@inheritDoc} */ @Override public void reset() { type.updateIndex( offset - 1 ); IntervalIndexer.indexToPosition( offset, img.dim, position ); position[ 0 ]--; type.updateContainer( this ); } }
/** * {@inheritDoc} */ @Override public void reset() { type.updateIndex( offset - 1 ); IntervalIndexer.indexToPosition( offset, img.dim, position ); position[ 0 ]--; type.updateContainer( this ); } }
public ArrayRandomAccess( final ArrayImg< T, ? > container ) { super( container.numDimensions() ); this.img = container; this.type = container.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = 0; type.updateContainer( this ); type.updateIndex( 0 ); }
public ArrayRandomAccess( final ArrayImg< T, ? > container ) { super( container.numDimensions() ); this.img = container; this.type = container.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = 0; type.updateContainer( this ); type.updateIndex( 0 ); }
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 NtreeRandomAccess( final NtreeImg< T, ? > img ) { this.n = img.numDimensions(); this.position = new long[ img.numDimensions() ]; this.img = img; this.type = img.createLinkedType(); for ( int d = 0; d < n; d++ ) position[ d ] = 0; type.updateContainer( this ); }
protected PlanarRandomAccess( final PlanarRandomAccess< T > randomAccess ) { super( randomAccess.numDimensions() ); sliceSteps = randomAccess.sliceSteps; width = randomAccess.width; sliceIndex = randomAccess.sliceIndex; for ( int d = 0; d < n; ++d ) position[ d ] = randomAccess.position[ d ]; type = randomAccess.type.duplicateTypeOnSameNativeImg(); type.updateContainer( this ); type.updateIndex( randomAccess.type.getIndex() ); }
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 CellCursor( final CellCursor< T, C > cursor ) { super( cursor.numDimensions() ); this.type = cursor.type.duplicateTypeOnSameNativeImg(); this.cursorOnCells = cursor.cursorOnCells.copyCursor(); isNotLastCell = cursor.isNotLastCell; lastIndexInCell = cursor.lastIndexInCell; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }
protected CellCursor( final CellCursor< T, C > cursor ) { super( cursor.numDimensions() ); this.type = cursor.type.duplicateTypeOnSameNativeImg(); this.cursorOnCells = cursor.cursorOnCells.copyCursor(); isNotLastCell = cursor.isNotLastCell; lastIndexInCell = cursor.lastIndexInCell; index = cursor.index; type.updateContainer( this ); type.updateIndex( index ); }