コード例 #1
0
def getVskFiles(path):
    path = path[:-1] if path[-1:]=="\\" else path
    vskFile = files.getFiles(path+"\\",".vsk")
    if len(vskFile)>1:
        logging.warning("Folder with several vsk. %s selected"%(vskFile[0]))

    return vskFile[0]
コード例 #2
0
def generateEmptyEnf(path):
    c3ds = files.getFiles(path, "c3d")

    for c3d in c3ds:
        enfName = c3d[:-4] + ".Trial.enf"
        if enfName not in os.listdir(path):
            logging.info(enfName + " : created  ")
            open(path + enfName, 'a').close()
コード例 #3
0
def getEnfFiles(path, type):
    path = path[:-1] if path[-1:] == "\\" else path

    enfFiles = files.getFiles(str(path + "\\"), type.value)

    if type == enums.EclipseType.Session:
        if len(enfFiles) > 1:
            raise Exception(
                "Vicon Eclipse badly configured. Two session enf found")
        else:
            return enfFiles[0]

    elif type == enums.EclipseType.Patient:
        if len(enfFiles) > 1:
            raise Exception(
                "Vicon Eclipse badly configured. Two Patient enf found")
        else:
            return enfFiles[0]
    elif type == enums.EclipseType.Trial:
        return enfFiles
    else:
        raise Exception(
            "eclipse file type not recognize. Shoud be an item of enums.eClipseType"
        )
コード例 #4
0
 def test_getFiles2(self):
     fs = files.getFiles(
         pyCGM2.TEST_DATA_PATH + "\\LowLevel\\IO\\Hannibal_c3d\\",
         "Trial.enf")
コード例 #5
0
 def test_getFiles(self):
     fs = files.getFiles(
         pyCGM2.TEST_DATA_PATH + "\\LowLevel\\IO\\Hanibal_files\\", "json")
コード例 #6
0
def generateEmptyENF(path):
    c3ds = files.getFiles(path, "c3d")
    for c3d in c3ds:
        enfName = c3d[:-4] + ".Trial.enf"
        if enfName not in os.listdir(path):
            open((path + enfName), 'a').close()
コード例 #7
0
ファイル: eclipse.py プロジェクト: orat/pyCGM2
def getEnfSession(path):
    path = path[:-1] if path[-1:]=="\\" else path
    enfFile = files.getFiles(path+"\\","Session.enf")
    if len(enfFile)>1:
        raise Exception ("Vicon Eclipse badly configured. Two session enf found")
    return enfFile[0]
コード例 #8
0
ファイル: eclipse.py プロジェクト: orat/pyCGM2
def getEnfTrials(path):
    path = path[:-1] if path[-1:]=="\\" else path
    enfFiles = files.getFiles(path+"\\","Trial.enf")
    return enfFiles