Ejemplo n.º 1
0
PROJECT_ID = 'MRH017'
datasets = {DatasetMatch('coils', zip_format, 'swi_coils')}
visit_ids = visit_ids['MR01']

repository = XnatRepository(cache_dir='/scratch/dq13/xnat_cache3')

if args.cache_project:
    project = repository.project(PROJECT_ID,
                                 subject_ids=ids,
                                 visit_ids=visit_ids)
    with open(CACHE_PROJECT_PATH, 'w') as f:
        pkl.dump(project, f)
else:
    with open(CACHE_PROJECT_PATH) as f:
        project = pkl.load(f)

repository.cache(PROJECT_ID,
                 datasets.values(),
                 subject_ids=ids,
                 visit_ids=visit_ids)

study = T2StarStudy(name='qsm',
                    project_id=PROJECT_ID,
                    repository=repository,
                    input_datasets=datasets)
study.qsm_pipeline().submit(subject_ids=ids,
                            visit_ids=visit_ids,
                            work_dir=WORK_PATH,
                            email='*****@*****.**',
                            project=project)
Ejemplo n.º 2
0
from nianalysis.file_format import dicom_format
from arcana.dataset import DatasetMatch
from arcana.repository.xnat import XnatRepository

repository = XnatRepository()

repository.cache('MRH032', [
    Dataset('t1_mprage_sag_p2_iso_1mm', format=dicom_format),
    Dataset('t2_tra_tse_320_4mm', format=dicom_format)
],
                 subject_ids=['MRH032_{:03}'.format(i) for i in range(1, 20)],
                 visit_ids=['MR01', 'MR03'])