本文整理汇总了TypeScript中neuroglancer/chunk_manager/backend.handleChunkDownloadPromise函数的典型用法代码示例。如果您正苦于以下问题:TypeScript handleChunkDownloadPromise函数的具体用法?TypeScript handleChunkDownloadPromise怎么用?TypeScript handleChunkDownloadPromise使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了handleChunkDownloadPromise函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: download
download(chunk: VolumeChunk) {
let params = this.parameters;
let {chunkGridPosition} = chunk;
// Needed by decoder.
chunk.chunkDataSize = this.spec.chunkDataSize;
let path = `/api/node/${params['nodeKey']}/${params['dataInstanceKey']}/tile/${params['dims']}/${params['level']}/${chunkGridPosition[0]}_${chunkGridPosition[1]}_${chunkGridPosition[2]}`;
handleChunkDownloadPromise(
chunk, sendHttpRequest(openShardedHttpRequest(params.baseUrls, path), 'arraybuffer'),
this.chunkDecoder);
}
示例2: downloadFragment
downloadFragment(chunk: FragmentChunk) {
let requestPath = `${this.path}/${chunk.fragmentId}`;
handleChunkDownloadPromise(
chunk, sendHttpRequest(openShardedHttpRequest(this.baseUrls, requestPath), 'arraybuffer'),
decodeFragmentChunk);
}