Esempio n. 1
0
def lung(ss, plan, prescription, region_code, target):
    if prescription.total_dose == 45 and prescription.nr_fractions == 3:
        site = SITE.Site(
            RC.lung_codes, OBJ.lung_objectives,
            OBJ.create_lung_stereotactic_objectives(ss, plan, region_code,
                                                    prescription.total_dose),
            CGS.lung_stereotactic_3fx_oars(region_code),
            CGS.lung_stereotactic_targets(ss))
    elif prescription.total_dose == 55 and prescription.nr_fractions == 5:
        site = SITE.Site(
            RC.lung_codes, OBJ.lung_objectives,
            OBJ.create_lung_stereotactic_objectives(ss, plan, region_code,
                                                    prescription.total_dose),
            CGS.lung_stereotactic_5fx_oars(region_code),
            CGS.lung_stereotactic_targets(ss))
    elif prescription.total_dose == 56 and prescription.nr_fractions == 8:
        site = SITE.Site(
            RC.lung_codes, OBJ.lung_objectives,
            OBJ.create_lung_stereotactic_objectives(ss, plan, region_code,
                                                    prescription.total_dose),
            CGS.lung_stereotactic_8fx_oars(region_code),
            CGS.lung_stereotactic_targets(ss))
    else:
        site = SITE.Site(
            RC.lung_codes, OBJ.lung_objectives,
            OBJ.create_lung_objectives(ss, plan, target,
                                       prescription.total_dose),
            CGS.lung_oars(ss), CGS.lung_targets(ss))
    return site
Esempio n. 2
0
def brain(pm, examination, ss, plan, prescription, region_code):
    if region_code in RC.brain_whole_codes:
        site = SITE.Site(
            RC.brain_codes, OBJ.brain_whole_oar_objectives,
            OBJ.create_whole_brain_objectives(ss, plan,
                                              prescription.total_dose),
            CGS.brain_oars(prescription, region_code),
            CGS.brain_targets(ss, prescription))
    else:
        site = SITE.Site(
            RC.brain_codes, OBJ.brain_oar_objectives,
            OBJ.create_brain_objectives(pm, examination, ss, plan,
                                        prescription),
            CGS.brain_oars(prescription, region_code),
            CGS.brain_targets(ss, prescription))
    return site
Esempio n. 3
0
def breast(ss, plan, prescription, region_code, technique_name, target):
    if region_code in RC.breast_reg_codes:
        site = SITE.Site(
            RC.breast_reg_codes, OBJ.breast_reg_oar_objectives,
            OBJ.create_breast_reg_objectives(ss, plan, region_code,
                                             prescription.total_dose,
                                             technique_name),
            CGS.breast_oars(ss, region_code),
            CGS.breast_targets(ss, region_code, target))
    else:
        site = SITE.Site(
            RC.breast_tang_codes, OBJ.breast_tang_oar_objectives,
            OBJ.create_breast_tang_objectives(ss, plan,
                                              prescription.total_dose, target),
            CGS.breast_oars(ss, region_code),
            CGS.breast_targets(ss, region_code, target))
    return site
Esempio n. 4
0
def prostate(ss, plan, prescription, region_code, target):
    if prescription.total_dose < 40:
        site = SITE.Site(
            RC.prostate_codes, OBJ.palliative_prostate_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target),
            CGS.prostate_oars(ss, prescription),
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.prostate_bed_codes:
        site = SITE.Site(
            RC.prostate_bed_codes, OBJ.prostate_objectives,
            OBJ.create_prostate_bed_objectives(ss, plan,
                                               prescription.total_dose),
            CGS.prostate_oars(ss, prescription), CGS.prostate_bed_targets(ss))
    else:
        site = SITE.Site(
            RC.prostate_codes, OBJ.prostate_objectives,
            OBJ.create_prostate_objectives(ss, plan, prescription.total_dose),
            CGS.prostate_oars(ss, prescription),
            CGS.prostate_targets(ss, prescription))
    return site
Esempio n. 5
0
def bone_stereotactic(ss, plan, prescription, region_code):
    oar_objectives = OBJ.palliative_other_oar_objectives
    if region_code in RC.palliative_thorax_codes:
        oar_objectives = OAR.palliative_stereotactic_thorax_oars
    elif region_code in RC.palliative_abdomen_codes:
        oar_objectives = OAR.palliative_stereotactic_thorax_oars
    elif region_code in RC.palliative_pelvis_codes:
        oar_objectives = OAR.palliative_stereotactic_pelvis_oars
    if prescription.nr_fractions == 1:
        site = SITE.Site(
            RC.bone_stereotactic_codes, oar_objectives,
            OBJ.create_bone_stereotactic_objectives(ss, plan,
                                                    prescription.total_dose),
            CGS.bone_stereotactic_1fx_oars(region_code),
            CGS.bone_stereotactic_targets)
    elif prescription.nr_fractions == 3:
        site = SITE.Site(
            RC.bone_stereotactic_codes, oar_objectives,
            OBJ.create_bone_stereotactic_objectives(ss, plan,
                                                    prescription.total_dose),
            CGS.bone_stereotactic_3fx_oars(region_code),
            CGS.bone_stereotactic_targets)
    return site
Esempio n. 6
0
def bladder(ss, plan, prescription):
    return SITE.Site(
        RC.bladder_codes, OBJ.bladder_objectives,
        OBJ.create_bladder_objectives(plan, ss, prescription.total_dose),
        CGS.bladder_oars, CGS.targets)
Esempio n. 7
0
def palliative(ss, plan, prescription, region_code, target):
    if region_code in RC.palliative_head_codes:
        site = SITE.Site(
            RC.palliative_head_codes, OBJ.palliative_head_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.head,
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_neck_codes:
        site = SITE.Site(
            RC.palliative_neck_codes, OBJ.palliative_neck_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.neck,
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_thorax_codes:
        site = SITE.Site(
            RC.palliative_thorax_codes, OBJ.palliative_thorax_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.thorax,
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_thorax_and_abdomen_codes:
        site = SITE.Site(
            RC.palliative_thorax_and_abdomen_codes,
            OBJ.palliative_thorax_and_abdomen_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target),
            CGS.thorax_and_abdomen, CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_abdomen_codes:
        site = SITE.Site(
            RC.palliative_abdomen_codes, OBJ.palliative_abdomen_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.abdomen,
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_abdomen_and_pelvis_codes:
        site = SITE.Site(
            RC.palliative_abdomen_and_pelvis_codes,
            OBJ.palliative_abdomen_and_pelvis_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target),
            CGS.abdomen_and_pelvis, CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_pelvis_codes:
        site = SITE.Site(
            RC.palliative_pelvis_codes, OBJ.palliative_pelvis_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.pelvis,
            CGS.palliative_targets(ss, plan, target))
    elif region_code in RC.palliative_other_codes:
        site = SITE.Site(
            RC.palliative_other_codes, OBJ.palliative_other_oar_objectives,
            OBJ.create_palliative_objectives(ss,
                                             plan,
                                             prescription.total_dose,
                                             target=target), CGS.other,
            CGS.palliative_targets(ss, plan, target))
    return site
Esempio n. 8
0
def rectum(ss, plan, prescription):
    return SITE.Site(
        RC.rectum_codes, OBJ.rectum_objectives,
        OBJ.create_rectum_objectives(ss, plan, prescription.total_dose),
        CGS.rectum_oars, CGS.rectum_targets(prescription))