opengate.actors.doseactors ========================== .. py:module:: opengate.actors.doseactors Classes ------- .. autoapisummary:: opengate.actors.doseactors.VoxelDepositActor opengate.actors.doseactors.DoseActor opengate.actors.doseactors.LETActor opengate.actors.doseactors.FluenceActor Functions --------- .. autoapisummary:: opengate.actors.doseactors.compute_std_from_sample opengate.actors.doseactors._setter_hook_ste_of_mean_unbiased opengate.actors.doseactors._setter_hook_ste_of_mean opengate.actors.doseactors._setter_hook_uncertainty opengate.actors.doseactors._setter_hook_goal_uncertainty opengate.actors.doseactors._setter_hook_score_in_let_actor Module Contents --------------- .. py:class:: VoxelDepositActor(*args, **kwargs) Bases: :py:obj:`opengate.actors.base.ActorBase` Base class which holds user input parameters common to all actors that deposit quantities in a voxel grid, e.g. the DoseActor. .. py:attribute:: size :type: list .. py:attribute:: spacing :type: list .. py:attribute:: translation :type: list .. py:attribute:: rotation :type: list .. py:attribute:: repeated_volume_index :type: int .. py:attribute:: hit_type :type: str .. py:attribute:: output :type: str .. py:attribute:: img_coord_system :type: str .. py:attribute:: output_coordinate_system :type: str .. py:attribute:: user_info_defaults .. py:method:: check_user_input() .. py:method:: get_physical_volume_name() .. py:method:: _update_output_coordinate_system(which_output, run_index) Method to be called at the end of a run. Note: The output image is aligned with the volume to which the actor as attached at the beginning of a run. So for the option output_coordinate_system='global', nothing has to be done here. .. py:method:: prepare_output_for_run(output_name, run_index, **kwargs) .. py:method:: fetch_from_cpp_image(output_name, run_index, *cpp_image) .. py:method:: push_to_cpp_image(output_name, run_index, *cpp_image, copy_data=True) .. py:method:: EndOfRunActionMasterThread(run_index) .. py:method:: EndSimulationAction() Default virtual method for inheritance .. py:function:: compute_std_from_sample(number_of_samples, value_array, squared_value_array, correct_bias=False) .. py:function:: _setter_hook_ste_of_mean_unbiased(self, value) .. py:function:: _setter_hook_ste_of_mean(self, value) .. py:function:: _setter_hook_uncertainty(self, value) .. py:function:: _setter_hook_goal_uncertainty(self, value) .. py:class:: DoseActor(*args, **kwargs) Bases: :py:obj:`VoxelDepositActor`, :py:obj:`opengate_core.GateDoseActor` DoseActor: compute a 3D edep/dose map for deposited energy/absorbed dose in the attached volume The dose map is parameterized with: - size (number of voxels) - spacing (voxel size) - translation (according to the coordinate system of the "attachedTo" volume) - no rotation Position: - by default: centered according to the "attachedTo" volume center - if the attachedTo volume is an Image AND the option "img_coord_system" is True: the origin of the attachedTo image is used for the output dose. Hence, the dose can be superimposed with the attachedTo volume Options - edep only for the moment - later: add dose, uncertainty, squared etc .. py:attribute:: use_more_ram :type: bool .. py:attribute:: score_in :type: str .. py:attribute:: user_info_defaults .. py:method:: __initcpp__() Nothing to do in the base class. .. py:method:: compute_dose_from_edep_img(input_image, density_image=None) * create mass image: - from ct HU units, if dose actor attached to ImageVolume. - from material density, if standard volume * compute dose as edep_image / mass_image .. py:method:: initialize(*args) At the start of the run, the image is centered according to the coordinate system of the attached volume. This function computes the correct origin = center + translation. Note that there is a half-pixel shift to align according to the center of the pixel, like in ITK. .. py:method:: BeginOfRunActionMasterThread(run_index) .. py:method:: EndOfRunActionMasterThread(run_index) .. py:method:: EndSimulationAction() Default virtual method for inheritance .. py:function:: _setter_hook_score_in_let_actor(self, value) .. py:class:: LETActor(*args, **kwargs) Bases: :py:obj:`VoxelDepositActor`, :py:obj:`opengate_core.GateLETActor` LETActor: compute a 3D edep/dose map for deposited energy/absorbed dose in the attached volume The dose map is parameterized with: - size (number of voxels) - spacing (voxel size) - translation (according to the coordinate system of the "attachedTo" volume) - no rotation Position: - by default: centered according to the "attachedTo" volume center - if the attachedTo volume is an Image AND the option "img_coord_system" is True: the origin of the attachedTo image is used for the output dose. Hence, the dose can be superimposed with the attachedTo volume Options - LETd only for the moment - later: LETt, Q, fluence ... .. py:attribute:: averaging_method :type: str .. py:attribute:: score_in :type: str .. py:attribute:: user_info_defaults .. py:method:: __initcpp__() Nothing to do in the base class. .. py:method:: initialize() At the start of the run, the image is centered according to the coordinate system of the attached volume. This function computes the correct origin = center + translation. Note that there is a half-pixel shift to align according to the center of the pixel, like in ITK. .. py:method:: BeginOfRunActionMasterThread(run_index) .. py:method:: EndOfRunActionMasterThread(run_index) .. py:method:: EndSimulationAction() Default virtual method for inheritance .. py:class:: FluenceActor(*args, **kwargs) Bases: :py:obj:`VoxelDepositActor`, :py:obj:`opengate_core.GateFluenceActor` FluenceActor: compute a 3D map of fluence FIXME: add scatter order and uncertainty .. py:attribute:: uncertainty :type: bool .. py:attribute:: scatter :type: bool .. py:attribute:: user_info_defaults .. py:method:: __initcpp__() Nothing to do in the base class. .. py:method:: initialize() This base class method initializes common settings and should be called in all inheriting classes. .. py:method:: BeginOfRunActionMasterThread(run_index) .. py:method:: EndOfRunActionMasterThread(run_index) .. py:method:: EndSimulationAction() Default virtual method for inheritance