def open_subjects_file(self):
		control_location = os.getenv('XNAT_PBS_JOBS_CONTROL', default="")

		options = QFileDialog.Options()
		#options |= QFileDialog.DontUseNativeDialog
		#subject_file_name, other_stuff = QFileDialog.getOpenFileName(self, "Open Subject File", "", "Subject Files (*.subjects);;All Files (*)", options=options)
		subject_file_name, other_stuff = QFileDialog.getOpenFileName(self, "Open Subject File", control_location, "Subject Files (*.subjects);;All Files (*)", options=options)
		if subject_file_name:
			new_subject_list = ccf_subject.read_subject_info_list(subject_file_name, separator=":")
			self.controlPanel.subject_list = new_subject_list
Exemple #2
0
        description=
        "Batch mode submission of processing jobs for Structural Preprocessing"
    )

    # option arguments
    #
    # The --force-job-submission or -f option tells this program to ignore
    # checking to see whether a set of jobs is already submitted for a
    # subject/session and to go ahead and submit the jobs anyhow.
    parser.add_argument('-f',
                        '--force-job-submission',
                        dest='force_job_submission',
                        action='store_true',
                        required=False,
                        default=False)

    # parse the command line arguments
    args = parser.parse_args()

    # get Database credentials
    xnat_server = os_utils.getenv_required('XNAT_PBS_JOBS_XNAT_SERVER')
    userid, password = user_utils.get_credentials(xnat_server)

    # get list of subjects to process
    subject_file_name = file_utils.get_subjects_file_name(__file__)
    print("Retrieving subject list from: " + subject_file_name)
    subject_list = ccf_subject.read_subject_info_list(subject_file_name,
                                                      separator=":")

    do_submissions(userid, password, subject_list, args.force_job_submission)