本文整理汇总了TypeScript中neuroglancer/util/http_request.parseSpecialUrl函数的典型用法代码示例。如果您正苦于以下问题:TypeScript parseSpecialUrl函数的具体用法?TypeScript parseSpecialUrl怎么用?TypeScript parseSpecialUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parseSpecialUrl函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getVolume
getVolume(chunkManager: ChunkManager, url: string) {
const [baseUrls, path] = parseSpecialUrl(url);
url = baseUrls[0] + path;
const m = url.match(/^(.*)\/(c[0-9]+)$/);
if (m === null) {
return Promise.reject(new Error('N5 url must end with the pattern "/c[0-9]+".'));
}
const topLevelMetadataUrl = `${m[1]}/attributes.json`;
return chunkManager.memoize.getUncounted(
{'type': 'n5:MultiscaleVolumeChunkSource', url},
() =>
getTopLevelMetadata(chunkManager, topLevelMetadataUrl)
.then(
topLevelMetadata => getAllScales(chunkManager, url, topLevelMetadata)
.then(
scales => new MultiscaleVolumeChunkSource(
chunkManager, url, topLevelMetadata, scales))));
}
示例2: getVolume
export function getVolume(url: string) {
const [baseUrls, path] = parseSpecialUrl(url);
return getShardedVolume(baseUrls, path);
}
示例3: getMeshSource
export function getMeshSource(chunkManager: ChunkManager, url: string, lod: number) {
const [baseUrls, path] = parseSpecialUrl(url);
return getShardedMeshSource(chunkManager, {baseUrls, path, lod});
}
示例4: getVolume
export function getVolume(chunkManager: ChunkManager, url: string) {
const [baseUrls, path] = parseSpecialUrl(url);
return getShardedVolume(chunkManager, baseUrls, path);
}