MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / IncludesToPaths

Function IncludesToPaths

Utilities/JSON/JSONUpdateITKModules.py:12–24  ·  view source on GitHub ↗

Build a dict that maps include files to paths

(path)

Source from the content-addressed store, hash-verified

10
11
12def IncludesToPaths(path):
13 """Build a dict that maps include files to paths"""
14
15 includeToPath = dict()
16 prog = re.compile(r"(itk.*\.h)")
17 for root, dirs, files in os.walk(path):
18 for f in files:
19 if prog.match(f):
20 includeFile = prog.findall(f)[0]
21 parts = root.split("/")
22 module = parts[len(parts) - 3] + parts[len(parts) - 2]
23 includeToPath[includeFile] = module
24 return includeToPath
25
26
27def FindModules(path):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected