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

Function getMaskFile

src/utils/imageFileUtils.ts:172–184  ·  view source on GitHub ↗
(
  imageFiles: Map<string, File> | undefined,
  imageName: string
)

Source from the content-addressed store, hash-verified

170 * - "cam1/photo.jpg" -> "masks/cam1/photo.jpg.png"
171 */
172export function getMaskFile(
173 imageFiles: Map<string, File> | undefined,
174 imageName: string
175): File | undefined {
176 if (!imageFiles || !imageName) return undefined;
177
178 for (const path of getMaskLookupPaths(imageName)) {
179 const match = imageFiles.get(path) || imageFiles.get(path.toLowerCase());
180 if (match) return match;
181 }
182
183 return undefined;
184}
185
186/**
187 * Get statistics for local image files.

Callers 3

getMaskFunction · 0.90
getMaskSyncFunction · 0.90

Calls 2

getMaskLookupPathsFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected