/** * 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 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 ); }
/** * 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(); }