Open
Description
MemCopy
implementations that copy from/to Buffer
s currently use the stateful Buffer
APIs, e.g.
imglib2/src/main/java/net/imglib2/blocks/MemCopy.java
Lines 477 to 484 in 4f41d20
To make sure this works in multi-threaded scenarios, new Buffer
views should be used in every PrimitiveBlocks
instance.
For example, this
should be something like
final S src = ( S ) ( ( ArrayDataAccess< ? > ) cellAccess.get().getData().createView( this ) ).getCurrentStorageArray();
Alternatively, we should make sure that createView()
is called when getting the BufferAccess
from an image. (For example, for ArrayImg
that should be already the case.)
Even better would be to move to Java 9+, where absolute bulk put/get methods are available in Buffer
and we can avoid the stateful API in MemCopy
.
Metadata
Metadata
Assignees
Labels
No labels