本文整理汇总了TypeScript中neuroglancer/sliceview/base.getNearIsotropicBlockSize函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getNearIsotropicBlockSize函数的具体用法?TypeScript getNearIsotropicBlockSize怎么用?TypeScript getNearIsotropicBlockSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getNearIsotropicBlockSize函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: withDefaultCompression
/**
* Returns a VolumeChunkSpecification with default compression specified if suitable for the
* volumeType.
*/
static withDefaultCompression(options: VolumeChunkSpecificationDefaultCompressionOptions&
VolumeChunkSpecificationOptions&
VolumeChunkSpecificationVolumeSourceOptions) {
let {
compressedSegmentationBlockSize,
dataType,
voxelSize,
transform,
lowerVoxelBound,
upperVoxelBound
} = options;
transform = getCombinedTransform(transform, options.volumeSourceOptions);
if (compressedSegmentationBlockSize === undefined &&
options.volumeType === VolumeType.SEGMENTATION &&
(dataType === DataType.UINT32 || dataType === DataType.UINT64)) {
compressedSegmentationBlockSize = getNearIsotropicBlockSize({
voxelSize,
transform,
lowerVoxelBound,
upperVoxelBound,
maxVoxelsPerChunkLog2: 9,
maxBlockSize: vec3.min(
vec3.create(), options.chunkDataSize,
options.maxCompressedSegmentationBlockSize || kInfinityVec),
});
}
return new VolumeChunkSpecification(
Object.assign({}, options, {compressedSegmentationBlockSize, transform}));
}
开发者ID:google,项目名称:neuroglancer,代码行数:33,代码来源:base.ts
示例2: it
it('getNearIsotropicBlockSize', () => {
expect(
getNearIsotropicBlockSize({voxelSize: vec3.fromValues(1, 1, 1), maxVoxelsPerChunkLog2: 18}))
.toEqual(vec3.fromValues(64, 64, 64));
expect(
getNearIsotropicBlockSize({voxelSize: vec3.fromValues(2, 1, 1), maxVoxelsPerChunkLog2: 17}))
.toEqual(vec3.fromValues(32, 64, 64));
expect(
getNearIsotropicBlockSize({voxelSize: vec3.fromValues(3, 3, 30), maxVoxelsPerChunkLog2: 9}))
.toEqual(vec3.fromValues(16, 16, 2));
expect(getNearIsotropicBlockSize({
voxelSize: vec3.fromValues(3, 3, 30),
upperVoxelBound: vec3.fromValues(1, 128, 128),
maxVoxelsPerChunkLog2: 8
})).toEqual(vec3.fromValues(1, 64, 4));
});
开发者ID:google,项目名称:neuroglancer,代码行数:19,代码来源:base.spec.ts
示例3: getNearIsotropicBlockSize
this.scales = threeDimensionalScales.map(scale => {
let {voxelSize, sizeInVoxels} = scale;
let {chunkDataSize = getNearIsotropicBlockSize(
{voxelSize, upperVoxelBound: sizeInVoxels, maxVoxelsPerChunkLog2})} = scale;
return [{key: scale.key, offset: scale.offset, sizeInVoxels, voxelSize, chunkDataSize}];
});
开发者ID:funkey,项目名称:neuroglancer,代码行数:6,代码来源:frontend.ts
注:本文中的neuroglancer/sliceview/base.getNearIsotropicBlockSize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论