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(mpicbg.spim.data.generic.sequence.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(mpicbg.spim.data.generic.sequence.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(mpicbg.spim.data.generic.sequence.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. |
static int[] |
suggestPoTBlockSize(double[] voxelSize,
long[] size,
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(mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> seq)
seq - public static ExportMipmapInfo proposeMipmaps(mpicbg.spim.data.generic.sequence.BasicViewSetup setup)
setup - public static ExportMipmapInfo proposeMipmaps(mpicbg.spim.data.generic.sequence.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)
maxNumElementsvoxelSize) is as close to square
as possible given constraints 1 and 2.public static int[] suggestPoTBlockSize(double[] voxelSize,
long[] size,
int maxNumElements)
maxNumElementsvoxelSize) is as close to square
as possible given constraints 1 and 2.size[] of the image limits the number of bits
spent in a particular dimension. For example, if size[2] = 3,
then resulting block size will not exceed 4 in the Z dimension.Copyright © 2012–2025 BigDataViewer. All rights reserved.