public class ExportScalePyramid extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExportScalePyramid.AfterEachPlane
Callback that is called after each "plane of blocks" is written, giving
the opportunity to clear caches, etc.
|
static class |
ExportScalePyramid.Block<T extends NativeType<T>>
A block to be written.
|
static interface |
ExportScalePyramid.DatasetIO<D,T extends NativeType<T>>
Writing and reading back data for each resolution level.
|
static class |
ExportScalePyramid.DefaultLoopbackHeuristic
Simple heuristic: use loopback image loader if saving 8 times or more on
number of pixel access with respect to the original image.
|
static interface |
ExportScalePyramid.LoopbackHeuristic
A heuristic to decide for a given resolution level whether the source
pixels should be taken from the original image or read from a previously
written resolution level in the output dataset.
|
| Constructor and Description |
|---|
ExportScalePyramid() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RealType<T> & NativeType<T>,D> |
writeScalePyramid(RandomAccessibleInterval<T> img,
T type,
ExportMipmapInfo mipmapInfo,
ExportScalePyramid.DatasetIO<D,T> io,
ExecutorService executorService,
int numThreads,
ExportScalePyramid.LoopbackHeuristic loopbackHeuristic,
ExportScalePyramid.AfterEachPlane afterEachPlane,
ProgressWriter progressWriter)
Write an image to a chunked mipmap representation.
|
public static <T extends RealType<T> & NativeType<T>,D> void writeScalePyramid(RandomAccessibleInterval<T> img, T type, ExportMipmapInfo mipmapInfo, ExportScalePyramid.DatasetIO<D,T> io, ExecutorService executorService, int numThreads, ExportScalePyramid.LoopbackHeuristic loopbackHeuristic, ExportScalePyramid.AfterEachPlane afterEachPlane, ProgressWriter progressWriter) throws IOException
T - Pixel typeD - Dataset handleimg - the image to be written.type - instance of the pixel type of the image.mipmapInfo - contains for each mipmap level of the setup, the subsampling
factors and block sizes.io - writer for image blocks.executorService - ExecutorService where block-creator tasks are submitted.numThreads - How many block-creator tasks to run in parallel. (This many
tasks are submitted to the @codeloopbackHeuristic - heuristic to decide whether to create each resolution level by
reading pixels from the original image or by reading back a
finer resolution level already written to the hdf5. may be
null (in this case always use the original image).afterEachPlane - this is called after each "plane of blocks" is written, giving
the opportunity to clear caches, etc. may be null.progressWriter - completion ratio and status output will be directed here. may
be null.IOExceptionCopyright © 2015–2021 Fiji. All rights reserved.