MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getMaskPathVariants

Function getMaskPathVariants

src/utils/imageFileLookupPolicy.ts:168–181  ·  view source on GitHub ↗
(imageName: string)

Source from the content-addressed store, hash-verified

166}
167
168export function getMaskPathVariants(imageName: string): string[] {
169 const normalized = normalizeImagePath(imageName);
170 const basePath = normalized.toLowerCase().startsWith('images/')
171 ? normalized.slice(7)
172 : normalized;
173 const filename = basePath.split('/').pop() || basePath;
174
175 return [
176 `masks/${basePath}`,
177 `masks/${basePath}.png`,
178 `masks/${filename}`,
179 `masks/${filename}.png`,
180 ];
181}
182
183export function buildMaskUrlCandidates(maskUrlBase: string, imageName: string): UrlCandidate[] {
184 let normalizedName = normalizeImagePath(imageName);

Callers 3

fetchZipMaskFunction · 0.90

Calls 1

normalizeImagePathFunction · 0.85

Tested by

no test coverage detected