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

Function isMaskImagePath

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

Source from the content-addressed store, hash-verified

85}
86
87export function isMaskImagePath(path: string): boolean {
88 const segments = normalizeImagePath(path)
89 .split('/')
90 .filter(Boolean);
91 const firstMaskSegment = getSegmentIndex(
92 segments,
93 segment => segment.toLowerCase() === 'masks'
94 );
95
96 if (firstMaskSegment === -1) {
97 return false;
98 }
99
100 const firstImageRootSegment = getSegmentIndex(segments, isCanonicalImageRootSegment);
101 return firstImageRootSegment === -1 || firstMaskSegment < firstImageRootSegment;
102}
103
104export function getImagePathLookupSuffixes(path: string): string[] {
105 const suffixes = getPathSuffixes(path);

Callers 2

hasMaskFilesFunction · 0.90

Calls 2

normalizeImagePathFunction · 0.85
getSegmentIndexFunction · 0.85

Tested by

no test coverage detected