opengate.actors.actoroutput =========================== .. py:module:: opengate.actors.actoroutput Classes ------- .. autoapisummary:: opengate.actors.actoroutput.BaseUserInterfaceToActorOutput opengate.actors.actoroutput.UserInterfaceToActorOutputUsingDataItemContainer opengate.actors.actoroutput.UserInterfaceToActorOutputImage opengate.actors.actoroutput.ActorOutputBase opengate.actors.actoroutput.MergeableActorOutput opengate.actors.actoroutput.ActorOutputUsingDataItemContainer opengate.actors.actoroutput.ActorOutputImage opengate.actors.actoroutput.ActorOutputSingleImage opengate.actors.actoroutput.ActorOutputSingleMeanImage opengate.actors.actoroutput.ActorOutputSingleImageWithVariance opengate.actors.actoroutput.ActorOutputQuotientImage opengate.actors.actoroutput.ActorOutputQuotientMeanImage opengate.actors.actoroutput.ActorOutputRoot Functions --------- .. autoapisummary:: opengate.actors.actoroutput._setter_hook_belongs_to opengate.actors.actoroutput._setter_hook_active Module Contents --------------- .. py:class:: BaseUserInterfaceToActorOutput(belongs_to_actor, user_output_name, kwargs_for_interface_calls=None) .. py:attribute:: _known_attributes :value: ('__setstate__', '__getstate__', 'user_output_name', 'belongs_to_actor', '_kwargs_for_interface_calls') .. py:attribute:: user_output_name .. py:attribute:: belongs_to_actor .. py:method:: __getstate__() For earlier python version (<3.11), __getstate__ may not be defined. We provide a simple workaround here to return a copy of the internal dict. .. py:property:: _user_output .. py:property:: active .. py:method:: get_output_path(**kwargs) .. py:property:: write_to_disk .. py:property:: output_filename .. py:property:: item_suffix .. py:method:: __getattr__(item) .. py:method:: __setattr__(item, value) .. py:class:: UserInterfaceToActorOutputUsingDataItemContainer(*args, item=0, **kwargs) Bases: :py:obj:`BaseUserInterfaceToActorOutput` .. py:class:: UserInterfaceToActorOutputImage(*args, item=0, **kwargs) Bases: :py:obj:`UserInterfaceToActorOutputUsingDataItemContainer` .. py:property:: image .. py:function:: _setter_hook_belongs_to(self, belongs_to) .. py:function:: _setter_hook_active(self, active) .. py:class:: ActorOutputBase(*args, **kwargs) Bases: :py:obj:`opengate.base.GateObject` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: belongs_to :type: str .. py:attribute:: keep_data_in_memory :type: bool .. py:attribute:: _default_interface_class .. py:attribute:: default_suffix :value: None .. py:attribute:: user_info_defaults .. py:method:: get_default_interface_class() :classmethod: .. py:attribute:: data_per_run .. py:attribute:: merged_data :value: None .. py:attribute:: __can_be_deactivated__ :value: False .. py:method:: __len__() .. py:method:: set_write_to_disk(value, **kwargs) :abstractmethod: .. py:method:: get_write_to_disk(**kwargs) :abstractmethod: .. py:method:: set_output_filename(value, **kwargs) :abstractmethod: .. py:method:: get_output_filename(**kwargs) :abstractmethod: .. py:method:: get_active(**kwargs) :abstractmethod: .. py:method:: set_active(value, **kwargs) :abstractmethod: .. py:method:: get_item_suffix(**kwargs) .. py:method:: set_item_suffix(value, **kwargs) :abstractmethod: .. py:property:: belongs_to_actor .. py:method:: initialize() .. py:method:: _generate_auto_output_filename(**kwargs) .. py:method:: _compose_output_path(which, output_filename) .. py:method:: get_output_path(which='merged', **kwargs) .. py:method:: get_output_path_as_string(**kwargs) .. py:method:: close() Dummy implementation for inherited classes which do not implement this method. .. py:method:: get_data(**kwargs) :abstractmethod: .. py:method:: store_data(*args, **kwargs) :abstractmethod: .. py:method:: write_data(*args, **kwargs) :abstractmethod: .. py:method:: write_data_if_requested(**kwargs) :abstractmethod: .. py:method:: load_data(which) :abstractmethod: .. py:class:: MergeableActorOutput(*args, **kwargs) Bases: :py:obj:`ActorOutputBase` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: merge_data_after_simulation :type: bool .. py:attribute:: keep_data_per_run :type: bool .. py:attribute:: user_info_defaults .. py:method:: merge_data_from_runs() .. py:method:: merge_into_merged_data(data) .. py:method:: end_of_run(run_index) .. py:method:: end_of_simulation(**kwargs) .. py:class:: ActorOutputUsingDataItemContainer(*args, **kwargs) Bases: :py:obj:`MergeableActorOutput` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_item_config :type: Optional[box.Box] .. py:attribute:: user_info_defaults .. py:attribute:: data_container_class :value: None .. py:attribute:: _default_interface_class .. py:method:: initialize_cpp_parameters() .. py:method:: _fatal_unknown_item(item) .. py:method:: set_write_to_disk(value, item=0) .. py:method:: get_write_to_disk(item=0) .. py:method:: set_active(value, item=0) .. py:method:: get_active(item=0) .. py:method:: set_output_filename(value, item=0) .. py:method:: get_output_filename(item=0) .. py:method:: get_item_suffix(item=0, **kwargs) .. py:method:: set_item_suffix(value, item=0, **kwargs) .. py:method:: _generate_auto_output_filename(item=0) .. py:method:: _insert_item_suffix(output_filename, item) .. py:method:: _collect_item_identifiers(item) .. py:method:: get_output_path(which='merged', item=0, always_return_dict=False, **kwargs) .. py:method:: get_data_container(which) .. py:method:: get_data(which='merged', item=0) .. py:method:: store_data(which, *data) data can be either the user data to be wrapped into a DataContainer class or an already wrapped DataContainer class. .. py:method:: store_meta_data(which, **meta_data) data can be either the user data to be wrapped into a DataContainer class or an already wrapped DataContainer class. .. py:method:: load_data(which) :abstractmethod: .. py:method:: collect_data(which, return_identifier=False) .. py:method:: write_data(which='all', item='all', **kwargs) .. py:method:: write_data_if_requested(which='all', item='all', **kwargs) .. py:method:: end_of_simulation(item='all', **kwargs) .. py:class:: ActorOutputImage(*args, **kwargs) Bases: :py:obj:`ActorOutputUsingDataItemContainer` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: _default_interface_class .. py:attribute:: default_suffix :value: 'mhd' .. py:method:: set_image_properties(which, **kwargs) .. py:method:: get_image_properties(which, item=0) .. py:method:: create_empty_image(run_index, size, spacing, origin=None, **kwargs) .. py:class:: ActorOutputSingleImage(*args, **kwargs) Bases: :py:obj:`ActorOutputImage` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_container_class .. py:class:: ActorOutputSingleMeanImage(*args, **kwargs) Bases: :py:obj:`ActorOutputImage` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_container_class .. py:class:: ActorOutputSingleImageWithVariance(*args, **kwargs) Bases: :py:obj:`ActorOutputImage` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_container_class .. py:class:: ActorOutputQuotientImage(*args, **kwargs) Bases: :py:obj:`ActorOutputImage` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_container_class .. py:class:: ActorOutputQuotientMeanImage(*args, **kwargs) Bases: :py:obj:`ActorOutputImage` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: data_container_class .. py:class:: ActorOutputRoot(*args, **kwargs) Bases: :py:obj:`ActorOutputBase` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: output_filename :type: str .. py:attribute:: write_to_disk :type: bool .. py:attribute:: keep_data_in_memory :type: bool .. py:attribute:: user_info_defaults .. py:attribute:: default_suffix :value: 'root' .. py:method:: get_output_path(*args, **kwargs) .. py:method:: initialize() .. py:method:: initialize_cpp_parameters()