/** * TODO Javadoc * * @param img * @param offset * @param size */ public AbstractArrayCursor( final ArrayImg< T, ? > img, final int offset, final int size ) { super( img.numDimensions() ); this.type = img.createLinkedType(); this.img = img; this.lastIndex = offset + size - 1; this.offset = offset; this.size = size; reset(); }
/** * TODO Javadoc * * @param img * @param offset * @param size */ public AbstractArrayCursor( final ArrayImg< T, ? > img, final int offset, final int size ) { super( img.numDimensions() ); this.type = img.createLinkedType(); this.img = img; this.lastIndex = offset + size - 1; this.offset = offset; this.size = size; reset(); }
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 ArrayRandomAccess( final ArrayRandomAccess< T > randomAccess ) { super( randomAccess.numDimensions() ); this.img = randomAccess.img; this.type = img.createLinkedType(); int index = 0; for ( int d = 0; d < n; d++ ) { position[ d ] = randomAccess.position[ d ]; index += position[ d ] * img.steps[ d ]; } type.updateContainer( this ); type.updateIndex( index ); }
protected ArrayRandomAccess( final ArrayRandomAccess< T > randomAccess ) { super( randomAccess.numDimensions() ); this.img = randomAccess.img; this.type = img.createLinkedType(); int index = 0; for ( int d = 0; d < n; d++ ) { position[ d ] = randomAccess.position[ d ]; index += position[ d ] * img.steps[ d ]; } type.updateContainer( this ); type.updateIndex( index ); }
/** * TODO Javadoc * * @param img * @param offset * @param size */ public AbstractArrayLocalizingCursor( final ArrayImg< T, ? > img, final int offset, final int size ) { super( img.numDimensions() ); this.img = img; this.offset = offset; this.size = size; this.type = img.createLinkedType(); this.lastIndex = offset + size - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) max[ d ] = ( int ) img.max( d ); reset(); }
/** * TODO Javadoc * * @param img * @param offset * @param size */ public AbstractArrayLocalizingCursor( final ArrayImg< T, ? > img, final int offset, final int size ) { super( img.numDimensions() ); this.img = img; this.offset = offset; this.size = size; this.type = img.createLinkedType(); this.lastIndex = offset + size - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) max[ d ] = ( int ) img.max( d ); reset(); }
/** * TODO Javadoc * * @param cursor */ protected AbstractArrayCursor( final AbstractArrayCursor< T > cursor ) { super( cursor.numDimensions() ); this.img = cursor.img; this.type = img.createLinkedType(); this.offset = cursor.offset; this.size = cursor.size; this.lastIndex = cursor.lastIndex; type.updateIndex( cursor.type.getIndex() ); type.updateContainer( this ); }
/** * TODO Javadoc * * @param cursor */ protected AbstractArrayCursor( final AbstractArrayCursor< T > cursor ) { super( cursor.numDimensions() ); this.img = cursor.img; this.type = img.createLinkedType(); this.offset = cursor.offset; this.size = cursor.size; this.lastIndex = cursor.lastIndex; type.updateIndex( cursor.type.getIndex() ); type.updateContainer( this ); }
/** * TODO Javadoc * * @param cursor */ protected AbstractArrayLocalizingCursor( final AbstractArrayLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); this.img = cursor.img; this.type = img.createLinkedType(); this.offset = cursor.offset; this.size = cursor.size; this.lastIndex = offset + size - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) { position[ d ] = cursor.position[ d ]; max[ d ] = cursor.max[ d ]; } type.updateIndex( cursor.type.getIndex() ); type.updateContainer( this ); }
/** * TODO Javadoc * * @param cursor */ protected AbstractArrayLocalizingCursor( final AbstractArrayLocalizingCursor< T > cursor ) { super( cursor.numDimensions() ); this.img = cursor.img; this.type = img.createLinkedType(); this.offset = cursor.offset; this.size = cursor.size; this.lastIndex = offset + size - 1; max = new int[ n ]; for ( int d = 0; d < n; ++d ) { position[ d ] = cursor.position[ d ]; max[ d ] = cursor.max[ d ]; } type.updateIndex( cursor.type.getIndex() ); type.updateContainer( this ); }