@Override @SuppressWarnings( "unchecked" ) public A update( final Object cursor ) { // directly get data? return ( ( CellImgSampler< C > ) cursor ).getCell().getData(); }
@Override @SuppressWarnings( "unchecked" ) public A update( final Object cursor ) { // directly get data? return ( ( CellImgSampler< C > ) cursor ).getCell().getData(); }
@Override public void onRemoval( final Long key, final Cell< A > value ) { if ( value.getData().isDirty() ) super.onRemoval( key, value ); } }
@Override public void onRemoval( final Long key, final Cell< A > value ) { final long index = key; final String filename = blockname( index ); final int[] cellDims = new int[ n ]; value.dimensions( cellDims ); final long blocksize = entitiesPerPixel.mulCeil( Intervals.numElements( cellDims ) ); final long bytesize = blocksize * accessIo.getBytesPerElement(); try ( final RandomAccessFile mmFile = new RandomAccessFile( filename, "rw" ); ) { final MappedByteBuffer out = mmFile.getChannel().map( MapMode.READ_WRITE, 0, bytesize ); accessIo.save( value.getData(), out, ( int ) blocksize ); } catch ( final IOException e ) { throw new RuntimeException( e ); } }
final short[] dataBlock = cell.getData().getCurrentStorageArray(); cell.dimensions( dimsInt ); cell.min( min );