Beispiel #1
0
def write_nifty(pet_paths, pct_paths):
    pet_series = {}
    pct_series = {}
    for key, value in pet_paths.items():
        pet_series[key] = ImageReg.load_series(value, 'PET\\{}'.format(key))
        pct_series[key] = ImageReg.load_series(pct_paths[key], 'PlanningCT\\{}'.format(key))
    return pet_series, pct_series
Beispiel #2
0
def write_nifty(pet_paths, pct_paths):
    # Function that writes image series to .nii format
    pet_series = {}
    pct_series = {}
    for key, value in pet_paths.items():
        try:
            pet_series[key] = ImageReg.load_series(value, pet_outdir, key)
            pct_series[key] = ImageReg.load_series(pct_paths[key], planning_outdir, key)
        except RuntimeError:
            print("RuntimeError Ignored")
            pass
    return pet_series, pct_series