opengate.contrib.tps.ionbeamtherapy =================================== .. py:module:: opengate.contrib.tps.ionbeamtherapy Attributes ---------- .. autoapisummary:: opengate.contrib.tps.ionbeamtherapy.logger Classes ------- .. autoapisummary:: opengate.contrib.tps.ionbeamtherapy.SpotInfo opengate.contrib.tps.ionbeamtherapy.LayerInfo opengate.contrib.tps.ionbeamtherapy.BeamInfo opengate.contrib.tps.ionbeamtherapy.BeamsetInfo opengate.contrib.tps.ionbeamtherapy.TreatmentPlanSource Functions --------- .. autoapisummary:: opengate.contrib.tps.ionbeamtherapy.is_close opengate.contrib.tps.ionbeamtherapy.sequence_check opengate.contrib.tps.ionbeamtherapy.spots_info_from_txt opengate.contrib.tps.ionbeamtherapy.get_spots_from_beamset Module Contents --------------- .. py:data:: logger .. py:function:: is_close(x, y, eps=1e-06) .. py:function:: sequence_check(obj, attr, nmin=1, nmax=0, name='object') .. py:function:: spots_info_from_txt(txtFile, ionType) .. py:function:: get_spots_from_beamset(beamset) .. py:class:: SpotInfo(xiec, yiec, w, e) Bases: :py:obj:`object` .. py:attribute:: xiec .. py:attribute:: yiec .. py:attribute:: w .. py:attribute:: energy .. py:attribute:: particle_name :value: None .. py:attribute:: beamFraction :value: None .. py:attribute:: t0 :value: None .. py:attribute:: t1 :value: None .. py:method:: get_msw(t0, t1) .. py:class:: LayerInfo(ctrlpnt, j, cumsumchk=[], verbose=False, keep0=False) Bases: :py:obj:`object` .. py:attribute:: _cp .. py:attribute:: x .. py:attribute:: y .. py:property:: energy .. py:property:: tuneID .. py:property:: npainting .. py:property:: mswtot .. py:property:: nspots .. py:property:: weights .. py:property:: spots .. py:method:: get_spots(t0=None, t1=None) .. py:class:: BeamInfo(beam, i, override_number, keep0=False) Bases: :py:obj:`object` .. py:attribute:: _dcmbeam .. py:attribute:: _warnings .. py:attribute:: _icp0 .. py:attribute:: _beam_number_is_fishy .. py:attribute:: _index .. py:attribute:: _layers .. py:method:: GetAndClearWarnings() .. py:property:: FinalCumulativeMetersetWeight .. py:property:: PatientSupportAngle .. py:property:: patient_angle .. py:property:: IsoCenter .. py:property:: Name .. py:property:: Number .. py:property:: name .. py:property:: number .. py:property:: RadiationType .. py:property:: gantry_angle .. py:property:: TreatmentMachineName .. py:property:: SnoutID .. py:property:: SnoutPosition .. py:property:: NumberOfRangeModulators .. py:property:: RangeModulatorIDs .. py:property:: NumberOfRangeShifters .. py:property:: RangeShifterIDs .. py:property:: NumberOfEnergies .. py:property:: nlayers .. py:property:: layers .. py:property:: nspots .. py:property:: mswtot .. py:property:: PrimaryDosimeterUnit .. py:class:: BeamsetInfo(rpfp) Bases: :py:obj:`object` This class reads a DICOM 'RT Ion Plan Storage' file and collects related information such as TPS dose files. It does NOT (yet) try to read a reffered structure set and/or CT images. This acts as a wrapper (all DICOM access on the plan file happens here). This has a few advantages over direct DICOM access in the other modules: * we can deal with different "DICOM dialects" here; some TPSs may store their plans in different ways. * if 'private tags' need to be taken into account then we can also do that here. * We can make a similar class, with the same attributes, for a treatment plan stored in a different format, e.g. for research, commissioning or QA purposes. Then the rest of the code can work with that in the same way. .. py:attribute:: patient_attrs :value: ['Patient ID', 'Patient Name', 'Patient Birth Date', 'Patient Sex'] .. py:attribute:: plan_req_attrs :value: ['RT Plan Label', 'SOP Instance UID', 'Referring Physician Name', 'Plan Intent'] .. py:attribute:: plan_opt_attrs :value: ['Operators Name', 'Reviewer Name', 'Review Date', 'Review Time'] .. py:attribute:: plan_attrs .. py:attribute:: bs_attrs :value: ['Number Of Beams', 'RT Plan Label', 'Prescription Dose', 'Target ROI Name', 'Radiation Type',... .. py:attribute:: _warnings .. py:attribute:: _beam_numbers_corrupt :value: False .. py:attribute:: _rp .. py:attribute:: _rpfp .. py:attribute:: _rpdir .. py:attribute:: _rpuid .. py:attribute:: _dose_roiname :value: None .. py:attribute:: _dose_roinumber :value: None .. py:attribute:: _beams .. py:method:: GetAndClearWarnings() .. py:method:: __getitem__(k) .. py:method:: _chkrp() .. py:property:: mswtot .. py:property:: name .. py:property:: fields .. py:property:: beams .. py:property:: uid .. py:property:: beam_angles .. py:property:: beam_names .. py:property:: beam_numbers .. py:property:: Nfractions .. py:property:: target_ROI_name .. py:property:: target_ROI_number .. py:property:: prescription_dose .. py:property:: plan_label .. py:property:: sanitized_plan_label .. py:property:: patient_info .. py:property:: plan_info .. py:property:: bs_info .. py:method:: __repr__() .. py:class:: TreatmentPlanSource(name, sim) .. py:attribute:: name .. py:attribute:: rotation .. py:attribute:: translation :value: [0, 0, 0] .. py:attribute:: spots :value: None .. py:attribute:: beamline_model :value: None .. py:attribute:: n_sim :value: 0 .. py:attribute:: sim .. py:method:: set_particles_to_simulate(n_sim) .. py:method:: set_spots(spots) .. py:method:: set_spots_from_rtplan(rt_plan_path) .. py:method:: set_beamline_model(beamline) .. py:method:: initialize_tpsource() .. py:method:: _get_pbs_position(spot) .. py:method:: _get_pbs_rotation(spot)