public class ProposeMipmaps extends Object
Choice of proposed chunksize is not based on any hard benchmark data currently. Chunk sizes are proposed such that chunks have power-of-two side lengths, are roughly square in world space, and contain close to (but not more than) a specified number of elements (4096 by default). It is very likely that more efficient choices can be found by manual tuning, depending on hardware and use case.
Constructor and Description |
---|
ProposeMipmaps() |
Modifier and Type | Method and Description |
---|---|
static String |
getArrayString(int[][] resolutions)
Format
in[][] array, such as resolutions or chunksizes
definition, as a String (to be used in export dialog textfields). |
static void |
normalizeVoxelSize(double[] size)
Adjust voxelSize such that the smallest dimension is 1.0
|
static Map<Integer,ExportMipmapInfo> |
proposeMipmaps(AbstractSequenceDescription<?,?,?> seq)
Propose number of mipmap levels as well subsampling factors and chunk
size for each level, for each setup of the given sequence.
|
static ExportMipmapInfo |
proposeMipmaps(BasicViewSetup setup)
Propose number of mipmap levels as well subsampling factors and chunk
size for each level, based on the image and voxel size of the given
setup.
|
static ExportMipmapInfo |
proposeMipmaps(BasicViewSetup setup,
int maxNumElements)
Propose number of mipmap levels as well subsampling factors and chunk
size for each level, based on the image and voxel size of the given
setup.
|
static int[] |
suggestPoTBlockSize(double[] voxelSize,
int maxNumElements)
Propose block size such that
each dimension is power-of-two,
number of elements is as big as possible, but not larger than
maxNumElements
and the block (scaled by the voxelSize ) is as close to square
as possible given constraints 1 and 2.
|
public static Map<Integer,ExportMipmapInfo> proposeMipmaps(AbstractSequenceDescription<?,?,?> seq)
seq
- public static ExportMipmapInfo proposeMipmaps(BasicViewSetup setup)
setup
- public static ExportMipmapInfo proposeMipmaps(BasicViewSetup setup, int maxNumElements)
maxNumElements
.setup
- maxNumElements
- public static String getArrayString(int[][] resolutions)
in[][]
array, such as resolutions or chunksizes
definition, as a String (to be used in export dialog textfields).public static void normalizeVoxelSize(double[] size)
size
- public static int[] suggestPoTBlockSize(double[] voxelSize, int maxNumElements)
maxNumElements
voxelSize
) is as close to square
as possible given constraints 1 and 2.Copyright © 2015–2021 Fiji. All rights reserved.