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

Function isAuxiliaryImagePath

src/utils/imageFileLookupPolicy.ts:70–85  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

68}
69
70export function isAuxiliaryImagePath(path: string): boolean {
71 const segments = normalizeImagePath(path)
72 .split('/')
73 .filter(Boolean);
74 const firstAuxiliarySegment = getSegmentIndex(
75 segments,
76 segment => AUXILIARY_IMAGE_SEGMENTS.has(segment.toLowerCase())
77 );
78
79 if (firstAuxiliarySegment === -1) {
80 return false;
81 }
82
83 const firstImageRootSegment = getSegmentIndex(segments, isCanonicalImageRootSegment);
84 return firstImageRootSegment === -1 || firstAuxiliarySegment < firstImageRootSegment;
85}
86
87export function isMaskImagePath(path: string): boolean {
88 const segments = normalizeImagePath(path)

Callers 2

Calls 2

normalizeImagePathFunction · 0.85
getSegmentIndexFunction · 0.85

Tested by

no test coverage detected