コード例 #1
0
            DiffusionScanIdList = ['RL_1ScanId', 'RL_2ScanId', 'RL_3ScanId', 'LR_1ScanId', 'LR_2ScanId', 'LR_3ScanId']
            DiffusionScanIdDict = {'RL_1ScanId' : None, 'RL_2ScanId' : None, 'RL_3ScanId' : None, 'LR_1ScanId' : None, 'LR_2ScanId' : None, 'LR_3ScanId' : None}
            DiffusionDirList = ['RL_Dir1', 'RL_Dir2', 'RL_Dir3', 'LR_Dir1', 'LR_Dir2', 'LR_Dir3']
            DiffusionDirDict = {'RL_Dir1' : '95', 'RL_Dir2' : '96', 'RL_Dir3' : '97', 'LR_Dir1' : '95', 'LR_Dir2' : '96', 'LR_Dir3' : '97' }
            
#            DiffusionSeriesIntersectList = list(set(DiffusionSeriesList) & set(SeriesList))


            for j in xrange(0, len(DiffusionSeriesList)):
                currDiffDesc = DiffusionSeriesList[j]
                if (sessionMeta.get('Series').count(currDiffDesc) > 0):
                    currDiffIdx = sessionMeta.get('Series').index(currDiffDesc)
                    currScanId = sessionMeta.get('IDs')[currDiffIdx]
                    currQuality = sessionMeta.get('Quality')[currDiffIdx]
                    getHCP.Scan = currScanId
                    scanParms = getHCP.getScanParms()
                    scanMeta = getHCP.getScanMeta()
                    
                    EchoSpacingList.append(float(scanParms.get('EchoSpacing')) * 1.0e+3)
                    PhaseEncodingDirList.append(scanParms.get('PhaseEncodingDir'))
                    
                    # ScanIdDict['LR_2ScanId'] = '-parameter LR_2ScanId=%s ' % str(currScanId)
                    if (currQuality in UsableList):
                        DiffusionScanIdDict[DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)]] = '-parameter %s=%s ' % (DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)], currScanId)
                    else:
                        DiffusionScanIdDict[DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)]] = '-parameter %s=%s ' % (DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)], DummyScanId)
                        DiffusionDirDict[DiffusionDirList[DiffusionSeriesList.index(currDiffDesc)]] = 'EMPTY'
                    
                else:
                    DiffusionScanIdDict[DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)]] = '-parameter %s=%s ' % (DiffusionScanIdList[DiffusionSeriesList.index(currDiffDesc)], DummyScanId)
                    DiffusionDirDict[DiffusionDirList[DiffusionSeriesList.index(currDiffDesc)]] = 'EMPTY'
コード例 #2
0
ファイル: testPyHCP.py プロジェクト: Ferrumofomega/HCP
    # getSessionQuality
    # getSubjectResourceMeta
    # getSubjectResourcesMeta
    # getSubjects
    # getSubjectSessions
    # getSubjectsSessions
    # getURLString
    # ==============================================================================

    Projects = getHCP.getProjects()
    getHCP.Subject = getHCP.Subjects[0]
    getHCP.SubjectSessions = getHCP.getSubjectSessions()
    getHCP.Session = getHCP.SubjectSessions.get("Sessions")[0]
    getHCP.SessionMeta = getHCP.getSessionMeta()

    ScanParms = getHCP.getScanParms()
    ScanMeta = getHCP.getScanMeta()

    print ScanMeta.get("URIs")[ScanMeta.get("Collections").index("NIFTI")]
    writeHCP.writeFileFromURL(getHCP, ScanMeta.get("URIs")[ScanMeta.get("Collections").index("NIFTI")])

    if getHCP.Server.find("intradb") != -1:
        AssessorIDs = getHCP.getAssessorIDs()
        AssessorFileURIList = getHCP.getAssessorOutputFile(AssessorIDs)

    print getHCP.getProjects()
    print getHCP.SessionId, getHCP.getSessionId()
    print getHCP.Subjects
    print getHCP.getSubjectSessions()

    #    print getHCP.getFileInfo('https://intradb.humanconnectome.org/data/projects/HCP_Phase2/subjects/192439/experiments/192439_strc/resources/Details/files/StructuralHCP.log')
コード例 #3
0
# getSubjectResourceMeta
# getSubjectResourcesMeta
# getSubjects
# getSubjectSessions
# getSubjectsSessions
# getURLString
#==============================================================================

    Projects = getHCP.getProjects()
    getHCP.Subject = getHCP.Subjects[0]
    getHCP.SubjectSessions = getHCP.getSubjectSessions()
    getHCP.Session = getHCP.SubjectSessions.get('Sessions')[0]
    getHCP.SessionMeta = getHCP.getSessionMeta()
    

    ScanParms = getHCP.getScanParms()
    ScanMeta = getHCP.getScanMeta()
    
    print ScanMeta.get('URIs')[ScanMeta.get('Collections').index('NIFTI')]
    writeHCP.writeFileFromURL(getHCP, ScanMeta.get('URIs')[ScanMeta.get('Collections').index('NIFTI')])
    
    if (getHCP.Server.find('intradb') != -1):
        AssessorIDs = getHCP.getAssessorIDs( )
        AssessorFileURIList = getHCP.getAssessorOutputFile( AssessorIDs )
        
        
    print getHCP.getProjects()
    print getHCP.SessionId, getHCP.getSessionId()
    print getHCP.Subjects
    print getHCP.getSubjectSessions()
    
コード例 #4
0
                'RL_Dir3': '97',
                'LR_Dir1': '95',
                'LR_Dir2': '96',
                'LR_Dir3': '97'
            }

            #            DiffusionSeriesIntersectList = list(set(DiffusionSeriesList) & set(SeriesList))

            for j in xrange(0, len(DiffusionSeriesList)):
                currDiffDesc = DiffusionSeriesList[j]
                if (sessionMeta.get('Series').count(currDiffDesc) > 0):
                    currDiffIdx = sessionMeta.get('Series').index(currDiffDesc)
                    currScanId = sessionMeta.get('IDs')[currDiffIdx]
                    currQuality = sessionMeta.get('Quality')[currDiffIdx]
                    getHCP.Scan = currScanId
                    scanParms = getHCP.getScanParms()
                    scanMeta = getHCP.getScanMeta()

                    EchoSpacingList.append(
                        float(scanParms.get('EchoSpacing')) * 1.0e+3)
                    PhaseEncodingDirList.append(
                        scanParms.get('PhaseEncodingDir'))

                    # ScanIdDict['LR_2ScanId'] = '-parameter LR_2ScanId=%s ' % str(currScanId)
                    if (currQuality in UsableList):
                        DiffusionScanIdDict[DiffusionScanIdList[
                            DiffusionSeriesList.
                            index(currDiffDesc)]] = '-parameter %s=%s ' % (
                                DiffusionScanIdList[DiffusionSeriesList.index(
                                    currDiffDesc)], currScanId)
                    else: