Package net.imglib2.blocks
Interface RangeCopier<T>
-
- Type Parameters:
T- a primitive array type, e.g.,byte[].
- All Known Implementing Classes:
ArrayImgRangeCopier,CellImgRangeCopier,PlanarImgRangeCopier
interface RangeCopier<T>RangeCopierdoes the actual copying work from aNativeImginto a primitive array.The static
create(net.imglib2.img.NativeImg<?, ?>, net.imglib2.blocks.Ranges, net.imglib2.blocks.MemCopy<T>, T)method will pick the correct implementation for a givenNativeImg.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcopy(long[] srcPos, T dest, int[] size)Copy the block starting atsrcPoswith the givensizeinto the (appropriately sized)destarray.static <T> RangeCopier<T>create(NativeImg<?,?> img, Ranges findRanges, MemCopy<T> memCopy, T oob)RangeCopier<T>newInstance()Return a new independent instance of thisRangeCopier.
-
-
-
Method Detail
-
copy
void copy(long[] srcPos, T dest, int[] size)Copy the block starting atsrcPoswith the givensizeinto the (appropriately sized)destarray.- Parameters:
srcPos- min coordinates of block to copy from src Img.dest- destination array. Type isbyte[],float[], etc, corresponding to the src Img's native type.size- dimensions of block to copy from src Img.
-
newInstance
RangeCopier<T> newInstance()
Return a new independent instance of thisRangeCopier. This is used for multi-threading. The new instance works on the same source image, but has independent internal state.- Returns:
- new independent instance of this
RangeCopier
-
create
static <T> RangeCopier<T> create(NativeImg<?,?> img, Ranges findRanges, MemCopy<T> memCopy, T oob)
-
-