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