def getSessionResources(self): global getHCP # self.sessionsComboBox.clear() getHCP.Session = str(self.sessionsListWidget.currentItem().text()) # getHCP.Subject = str(self.subjectsComboBox.currentText()) Resources = getHCP.getSubjectResources() ResourcesList = list(set(Resources.get('Names'))) # self.sessionsTextEdit.setText('\n'.join(Sessions.get('Sessions'))) # self.sessionsComboBox.addItems(SessionsList) self.resourcesListWidget.clear() for i in xrange(0, len(ResourcesList)): self.resourcesListWidget.addItem(ResourcesList[i])
#=============================================================================== # Looper... #unique sorted.... #100307,103414,103515,103818,105115,110411,111312,113619,114924,115320,116120,117122,118730,118932,119833,120212,123117,124422,125525,128632,129028,130013,133827,133928,134324,135932,136833,137128,138231,139637,140420,142828,143325,144226,149337,149539,150423,151223,151627,156637,158035,161731,162329,163432,167743,169343,172332,175439,177746,182739,182840,185139,191437,192439,192540,193239,194140,195647,196144,197550,199150,199251,200614,201111,205119,205725,209733,210617,212318,214019,214221,214423,217429,221319,249947,293748,298051,304020,307127,329440,397760,414229,448347,485757,499566,528446,530635,552544,559053,579665,581349,585862,598568,627549,638049,645551,654754,665254,672756,677968,685058,688569,702133,729557,732243,734045,748258,753251,788876,792564,826353,856766,857263,859671,861456,865363,872158,877168,885975,887373,889579,894673,896778,896879,901139,917255,932554,937160,984472, #=============================================================================== SubjectList = list() SubjectResource = list() Subjects = Subjects.split(',') SuccessBool = list() #Subjects = ['174437'] for i in xrange(0, len(Subjects)): print Subjects[i] getHCP.Subject = Subjects[i] getHCP.Session = '%s_3T' % getHCP.Subject subjectResources = getHCP.getSubjectResources() subjectSessionMeta = getHCP.getSessionMeta() subjectSeries = subjectSessionMeta.get('Series') subjectType = subjectSessionMeta.get('Types') FunctionalList = list() for j in xrange(0, len(subjectSessionMeta.get('Types'))): if (subjectSessionMeta.get('Types')[j] == 'tfMRI') or (subjectSessionMeta.get('Types')[j] == 'rfMRI'): FunctionalList.append(subjectSessionMeta.get('Series')[j]) if ('404 Error' in subjectResources): pass
#=============================================================================== # Looper... #unique sorted.... #100307,103414,103515,103818,105115,110411,111312,113619,114924,115320,116120,117122,118730,118932,119833,120212,123117,124422,125525,128632,129028,130013,133827,133928,134324,135932,136833,137128,138231,139637,140420,142828,143325,144226,149337,149539,150423,151223,151627,156637,158035,161731,162329,163432,167743,169343,172332,175439,177746,182739,182840,185139,191437,192439,192540,193239,194140,195647,196144,197550,199150,199251,200614,201111,205119,205725,209733,210617,212318,214019,214221,214423,217429,221319,249947,293748,298051,304020,307127,329440,397760,414229,448347,485757,499566,528446,530635,552544,559053,579665,581349,585862,598568,627549,638049,645551,654754,665254,672756,677968,685058,688569,702133,729557,732243,734045,748258,753251,788876,792564,826353,856766,857263,859671,861456,865363,872158,877168,885975,887373,889579,894673,896778,896879,901139,917255,932554,937160,984472, #=============================================================================== SubjectList = list() SubjectResource = list() Subjects = Subjects.split(',') SuccessBool = list() #Subjects = ['174437'] for i in xrange(0, len(Subjects)): print Subjects[i] getHCP.Subject = Subjects[i] getHCP.Session = '%s_3T' % getHCP.Subject subjectResources = getHCP.getSubjectResources() subjectSessionMeta = getHCP.getSessionMeta() subjectSeries = subjectSessionMeta.get('Series') subjectType = subjectSessionMeta.get('Types') FunctionalList = list() for j in xrange(0, len(subjectSessionMeta.get('Types'))): if (subjectSessionMeta.get('Types')[j] == 'tfMRI') or (subjectSessionMeta.get('Types')[j] == 'rfMRI'): FunctionalList.append(subjectSessionMeta.get('Series')[j]) if ('404 Error' in subjectResources): pass else: subjectResources = subjectResources.get('Names') SubjectListTmp = list()