def main():
    """main function of this Python program"""
    from pyHCP import pyHCP, getHCP

    command_line_options = parse_command_line()
    show_options(command_line_options)

    Username   = command_line_options.get_user_name()
    Password   = command_line_options.get_password()
    Server     = command_line_options.get_server_name()
    Pipeline   = command_line_options.get_pipeline()
    Project    = command_line_options.get_project()
    FunctionalTaskNames  = command_line_options.get_functional_task_names()
    IcaTaskNames = command_line_options.get_ica_task_names()
    DiffusionVoxelSize = command_line_options.get_diffusion_voxel_size()
    Subjects   = command_line_options.get_subjects()
    OutputPath = command_line_options.get_output_path()
    Verbose    = command_line_options.get_verbose()

    pyHCP = pyHCP(Username, Password, Server)
    getHCP = getHCP(pyHCP)
    getHCP.Project = Project

    if (Subjects is not "All"):
        subjects_to_check = ((Subjects.split(',')))
    else:
        subjects_to_check = getHCP.getSubjects()

    processing_status_list = list()

    # Cycle through specified subjects to check
    for i in xrange(0, len(subjects_to_check)):
        if ('struct' in Pipeline.lower()):
            structural_processing_status = check_structural_status(Verbose, getHCP, subjects_to_check[i])
            processing_status_list.append(structural_processing_status)

        if ('funct' in Pipeline.lower()):
            functional_processing_status_list = check_functional_status(Verbose, getHCP, subjects_to_check[i], FunctionalTaskNames)
            for functional_processing_status in functional_processing_status_list:
                processing_status_list.append(functional_processing_status)

        if ('diff' in Pipeline.lower()):
            diffusion_processing_status = check_diffusion_status(Verbose, getHCP, subjects_to_check[i], DiffusionVoxelSize)
            processing_status_list.append(diffusion_processing_status)

        if ('fix' in Pipeline.lower()):
            fix_processing_status_list = check_fix_status(Verbose, getHCP, subjects_to_check[i], IcaTaskNames)
            for fix_processing_status in fix_processing_status_list:
                processing_status_list.append(fix_processing_status)

        if ('task' in Pipeline.lower()):
            task_processing_status_list = check_task_analysis_status(Verbose, getHCP, subjects_to_check[i])
            for task_processing_status in task_processing_status_list:
                processing_status_list.append(task_processing_status)

    # Output Results
    create_output_file(OutputPath, processing_status_list)
示例#2
0
    def getConnect(self):
        global pyHCP, getHCP
#        text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')
        pyHCP = pyHCP(str(self.UserNameLineEdit.text()), str(self.PasswordLineEdit.text()), str(self.comboBox.currentText()))
        getHCP = getHCP(pyHCP)
        Projects = getHCP.getProjects().get('Projects')
        
        self.StatusLineEdit.setText('Session ID: %s' % getHCP.SessionId)
#        self.textEdit.setText('\n'.join(Projects[0]))
        
#        self.projectsComboBox.addItems(Projects)
        
        self.projectListWidget.clear()
        for i in xrange(0, len(Projects)):
            self.projectListWidget.addItem(Projects[i])
示例#3
0
    def getConnect(self):
        global pyHCP, getHCP
        #        text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')
        pyHCP = pyHCP(str(self.UserNameLineEdit.text()),
                      str(self.PasswordLineEdit.text()),
                      str(self.comboBox.currentText()))
        getHCP = getHCP(pyHCP)
        Projects = getHCP.getProjects().get('Projects')

        self.StatusLineEdit.setText('Session ID: %s' % getHCP.SessionId)
        #        self.textEdit.setText('\n'.join(Projects[0]))

        #        self.projectsComboBox.addItems(Projects)

        self.projectListWidget.clear()
        for i in xrange(0, len(Projects)):
            self.projectListWidget.addItem(Projects[i])
示例#4
0
    Flatten = False
else:
    Flatten = True
    
try:
    ScanList = Scan.split(',')
except:
    ScanList = [Scan]
    
if not os.path.exists(OutputDir):
    os.makedirs(OutputDir)
#===============================================================================

print "Running %s on %s with IP %s" % (os.path.split(sys.argv[0])[1], socket.gethostname(), socket.gethostbyname(socket.gethostname()))

pyHCP = pyHCP(User, Password, Server)
getHCP = getHCP(pyHCP)
writeHCP = writeHCP(getHCP, OutputDir)
writeHCP.Flatten = Flatten

getHCP.Project = Project
getHCP.Subject = Subject
getHCP.Session = Session


FileName = list()
FileURIName = list()
FilePathName = list()
FilePathNameReadable = list()

OutputFileName = list()
示例#5
0
    Flatten = True

try:
    ScanList = Scan.split(',')
except:
    ScanList = [Scan]

if not os.path.exists(OutputDir):
    os.makedirs(OutputDir)
#===============================================================================

print "Running %s on %s with IP %s" % (
    os.path.split(sys.argv[0])[1], socket.gethostname(),
    socket.gethostbyname(socket.gethostname()))

pyHCP = pyHCP(User, Password, Server)
getHCP = getHCP(pyHCP)
writeHCP = writeHCP(getHCP, OutputDir)
writeHCP.Flatten = Flatten

getHCP.Project = Project
getHCP.Subject = Subject
getHCP.Session = Session

FileName = list()
FileURIName = list()
FilePathName = list()
FilePathNameReadable = list()

OutputFileName = list()
OutputFileURIName = list()