本文整理汇总了TypeScript中neuroglancer/sliceview/volume/base.VolumeChunkSpecification类的典型用法代码示例。如果您正苦于以下问题:TypeScript VolumeChunkSpecification类的具体用法?TypeScript VolumeChunkSpecification怎么用?TypeScript VolumeChunkSpecification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VolumeChunkSpecification类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
return this.scales.map(scaleInfo => {
return VolumeChunkSpecification
.getDefaults({
voxelSize: scaleInfo.resolution,
dataType: this.dataType,
numChannels: this.numChannels,
transform: mat4.fromTranslation(
mat4.create(),
vec3.multiply(vec3.create(), scaleInfo.resolution, scaleInfo.voxelOffset)),
upperVoxelBound: scaleInfo.size,
volumeType: this.volumeType,
chunkDataSizes: scaleInfo.chunkSizes,
baseVoxelOffset: scaleInfo.voxelOffset,
compressedSegmentationBlockSize: scaleInfo.compressedSegmentationBlockSize,
volumeSourceOptions,
})
.map(spec => this.chunkManager.getChunkSource(PrecomputedVolumeChunkSource, {
spec,
parameters: {
'baseUrls': this.baseUrls,
'path': `${this.path}/${scaleInfo.key}`,
'encoding': scaleInfo.encoding
}
}));
});
示例2: getSources
getSources(volumeSourceOptions: VolumeSourceOptions) {
let {info} = this;
const spec = VolumeChunkSpecification.withDefaultCompression({
volumeType: info.volumeType,
chunkDataSize: info.volumeSize,
dataType: info.dataType,
voxelSize: info.voxelSize,
numChannels: info.numChannels,
upperVoxelBound: info.volumeSize,
transform: translationRotationScaleZReflectionToMat4(
mat4.create(), info.qoffset, info.quatern, kOneVec, info.qfac),
volumeSourceOptions,
});
return [[this.chunkManager.getChunkSource(NiftiVolumeChunkSource, {spec, parameters: {url: this.url}})]];
}