diff --git a/src/main/java/net/imglib2/blocks/ViewPrimitiveBlocks.java b/src/main/java/net/imglib2/blocks/ViewPrimitiveBlocks.java index ea581eaa4..699fed751 100644 --- a/src/main/java/net/imglib2/blocks/ViewPrimitiveBlocks.java +++ b/src/main/java/net/imglib2/blocks/ViewPrimitiveBlocks.java @@ -37,6 +37,7 @@ import java.util.function.Supplier; +import net.imglib2.img.basictypeaccess.nio.BufferAccess; import net.imglib2.transform.integer.MixedTransform; import net.imglib2.type.NativeType; import net.imglib2.type.PrimitiveType; @@ -67,7 +68,7 @@ public ViewPrimitiveBlocks( final ViewProperties< T, R > props ) { this.props = props; final PrimitiveType primitiveType = props.getRootType().getNativeTypeFactory().getPrimitiveType(); - final MemCopy memCopy = MemCopy.forPrimitiveType( primitiveType ); + final MemCopy memCopy = MemCopy.forPrimitiveType( primitiveType, props.getRootAccessType() instanceof BufferAccess, false ); final Extension extension = props.getExtension() != null ? props.getExtension() : Extension.border(); final Object oob = extractOobValue( props.getRootType(), extension ); final Ranges findRanges = Ranges.forExtension( extension );