本文整理匯總了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}})]];
}