@Override public PlanarLocalizingCursor< T > copy() { return new PlanarLocalizingCursor< T >( this ); }
@Override public PlanarLocalizingCursor< T > copyCursor() { return copy(); }
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(); }
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(); }
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 ); }
@Override public PlanarLocalizingCursor< T > copy() { return new PlanarLocalizingCursor< T >( this ); }
@Override public PlanarLocalizingCursor< T > copyCursor() { return copy(); }
@Override public PlanarLocalizingCursor< T > localizingCursor() { if ( n == 1 ) return new PlanarLocalizingCursor1D< T >( this ); else if ( n == 2 ) return new PlanarLocalizingCursor2D< T >( this ); else return new PlanarLocalizingCursor< T >( this ); }
@Override public PlanarLocalizingCursor< T > localizingCursor() { if ( n == 1 ) return new PlanarLocalizingCursor1D< T >( this ); else if ( n == 2 ) return new PlanarLocalizingCursor2D< T >( this ); else return new PlanarLocalizingCursor< T >( this ); }