Skip to content

Commit

Permalink
Make PrimitiveBlocks.of(nio_backed_img) work
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Sep 7, 2024
1 parent cc4ab23 commit c100e5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/imglib2/blocks/ViewPrimitiveBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit c100e5c

Please sign in to comment.