public CellRandomAccess( final AbstractCellImg< T, ?, C, ? > img ) { super( img.numDimensions() ); type = img.createLinkedType(); grid = img.getCellGrid(); randomAccessOnCells = img.getCells().randomAccess(); cellDims = new int[ n ]; dimensions = new long[ n ]; img.getCellGrid().cellDimensions( cellDims ); img.getCellGrid().imgDimensions( dimensions ); isOutOfBounds = false; oobCellMin = new long[ n ]; oobCellMax = new long[ n ]; for ( int d = 0; d < n; ++d ) { oobCellMin[ d ] = Long.MAX_VALUE; oobCellMax[ d ] = Long.MIN_VALUE; } img.getCellGrid().getCellPosition( position, randomAccessOnCells ); updatePosition( false ); }
public CellRandomAccess( final AbstractCellImg< T, ?, C, ? > img ) { super( img.numDimensions() ); type = img.createLinkedType(); grid = img.getCellGrid(); randomAccessOnCells = img.getCells().randomAccess(); cellDims = new int[ n ]; dimensions = new long[ n ]; img.getCellGrid().cellDimensions( cellDims ); img.getCellGrid().imgDimensions( dimensions ); isOutOfBounds = false; oobCellMin = new long[ n ]; oobCellMax = new long[ n ]; for ( int d = 0; d < n; ++d ) { oobCellMin[ d ] = Long.MAX_VALUE; oobCellMax[ d ] = Long.MIN_VALUE; } img.getCellGrid().getCellPosition( position, randomAccessOnCells ); updatePosition( false ); }