Unfortunately, for CacheCellImgs, this means loading the first Cell, which can cause a lot of overhead.
I disabled this in cc07d99acda5e747bc933ecd17bee07ab6f325a8 Because we don't really use buffer-backed images yet (in particular, not in conjunction with PrimitiveBlocks).
To make it work without unnecessary overhead, we should add a method A getAccessType() to NativeImg.
PR https://github.com/imglib/imglib2/pull/354 added
PrimitiveBlocks.of(...)
support forNativeImg
backed byBufferAccess
.This requires to infer the
DataAccess
type that holds the data of theNativeImg
. For https://github.com/imglib/imglib2/pull/354 this is done usingimg.update(img.cursor())
: https://github.com/imglib/imglib2/blob/865e0c10e77a77efb3e4d22165c1c62013235b2a/src/main/java/net/imglib2/blocks/ViewProperties.java#L149-L163Unfortunately, for
CacheCellImg
s, this means loading the firstCell
, which can cause a lot of overhead. I disabled this in cc07d99acda5e747bc933ecd17bee07ab6f325a8 Because we don't really use buffer-backed images yet (in particular, not in conjunction withPrimitiveBlocks
).To make it work without unnecessary overhead, we should add a method
A getAccessType()
toNativeImg
.