3.10.1.11.1.4. opengate.geometry.volumes

3.10.1.11.1.4.1. Classes

VolumeBase

Store information about a geometry volume:

RepeatableVolume

Store information about a geometry volume:

BooleanVolume

Volume resulting from a boolean operation of the solids contained in two volumes.

BoxVolume

Volume with a box shape.

HexagonVolume

Volume with a hexagon shape.

ConsVolume

Volume with the shape of a cone or conical section.

PolyhedraVolume

Volume with a polyhedral shape.

SphereVolume

Volume with a sphere or spherical shell shape.

TrapVolume

Volume with a generic trapezoidal shape.

TrdVolume

Volume with a symmetric trapezoidal shape.

TubsVolume

Volume with a tube or cylindrical section shape.

TesselatedVolume

Volume based on a mesh volume by reading an STL file.

RepeatParametrisedVolume

Volume created from another volume via translations.

ImageVolume

Store information about a voxelized volume

ParallelWorldVolume

VolumeTreeRoot

Small class to provide a root for the volume tree.

3.10.1.11.1.4.2. Functions

_setter_hook_user_info_rotation(self, rotation_user)

Internal function associated with user_info rotation to check its validity.

_getter_hook_user_info_rotation(self, rotation)

_setter_hook_user_info_translation(self, translation_user)

_getter_hook_user_info_translation(self, translation)

_setter_hook_user_info_mother(self, mother)

Hook to be attached to property setter of user info 'mother' in all volumes.

_setter_hook_voxel_materials(self, voxel_materials)

_setter_hook_ensure_array(self, input)

_make_boolean_volume(volume_1, volume_2, operation[, ...])

intersect_volumes(volume_1, volume_2[, translation, ...])

unite_volumes(volume_1, volume_2[, translation, ...])

subtract_volumes(volume_1, volume_2[, translation, ...])

3.10.1.11.1.4.3. Module Contents

opengate.geometry.volumes._setter_hook_user_info_rotation(self, rotation_user)[source]

Internal function associated with user_info rotation to check its validity.

opengate.geometry.volumes._getter_hook_user_info_rotation(self, rotation)[source]
opengate.geometry.volumes._setter_hook_user_info_translation(self, translation_user)[source]
opengate.geometry.volumes._getter_hook_user_info_translation(self, translation)[source]
opengate.geometry.volumes._setter_hook_user_info_mother(self, mother)[source]

Hook to be attached to property setter of user info ‘mother’ in all volumes.

Checks if new mother is actually different from stored one.

If so, it also tries to inform the volume manager that the volume tree needs an update.

This latter part only applies for volumes which have a volume manager,

i.e. which have been added to a simulation.

opengate.geometry.volumes._setter_hook_voxel_materials(self, voxel_materials)[source]
opengate.geometry.volumes._setter_hook_ensure_array(self, input)[source]
class opengate.geometry.volumes.VolumeBase(*args, **kwargs)[source]

Bases: opengate.base.DynamicGateObject, anytree.NodeMixin

Store information about a geometry volume: - G4 objects: Solid, LogicalVolume, PhysicalVolume - user parameters: user_info - additional data such as: mother, material etc

user_info_defaults[source]
parent = None[source]
_is_constructed = False[source]
volume_engine = None[source]
g4_world_log_vol = None[source]
g4_logical_volume = None[source]
g4_vis_attributes = None[source]
g4_physical_volumes = [][source]
g4_material = None[source]
close()[source]
release_g4_references()[source]
__getstate__()[source]
_update_node()[source]

Internal method which retrieves the volume object from the volume manager based on the mother’s name stored as user info ‘mother’

_request_volume_tree_update()[source]
property simulation[source]
property volume_type[source]
property world_volume[source]
property volume_depth_in_tree[source]
property ancestor_volumes[source]
property children_volumes[source]
property number_of_repetitions[source]
get_g4_physical_volume(index)[source]
property translation_list[source]

Utility property which always returns a list of translations, even if the volume is not repeated and has thus only one translation vector.

property rotation_list[source]

Utility property which always returns a list of rotations, even if the volume is not repeated and has thus only one rotation vector.

property g4_region[source]
property g4_physical_volume[source]
property g4_translation[source]
property g4_rotation[source]
property g4_transform[source]
property mother_g4_logical_volume[source]
property mother_volume[source]
construct()[source]
construct_material()[source]
construct_logical_volume()[source]
construct_physical_volume()[source]
_make_physical_volume(volume_name, g4_transform, copy_index=0)[source]
create_changers()[source]
set_production_cut(particle_name, value)[source]
set_max_step_size(max_step_size)[source]
set_max_track_length(max_track_length)[source]
set_min_ekine(min_ekine)[source]
set_max_time(max_time)[source]
set_min_range(min_range)[source]
class opengate.geometry.volumes.RepeatableVolume(*args, **kwargs)[source]

Bases: VolumeBase

Store information about a geometry volume: - G4 objects: Solid, LogicalVolume, PhysicalVolume - user parameters: user_info - additional data such as: mother, material etc

get_repetition_name_from_index(index)[source]
get_repetition_index_from_name(name)[source]
construct_physical_volume()[source]
add_dynamic_parametrisation(repetition_index=0, **params)[source]
class opengate.geometry.volumes.BooleanVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.BooleanSolid

Volume resulting from a boolean operation of the solids contained in two volumes.

opengate.geometry.volumes._make_boolean_volume(volume_1, volume_2, operation, translation=None, rotation=None, new_name=None)[source]
opengate.geometry.volumes.intersect_volumes(volume_1, volume_2, translation=None, rotation=None, new_name=None)[source]
opengate.geometry.volumes.unite_volumes(volume_1, volume_2, translation=None, rotation=None, new_name=None)[source]
opengate.geometry.volumes.subtract_volumes(volume_1, volume_2, translation=None, rotation=None, new_name=None)[source]
class opengate.geometry.volumes.BoxVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.BoxSolid

Volume with a box shape.

class opengate.geometry.volumes.HexagonVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.HexagonSolid

Volume with a hexagon shape.

class opengate.geometry.volumes.ConsVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.ConsSolid

Volume with the shape of a cone or conical section.

class opengate.geometry.volumes.PolyhedraVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.PolyhedraSolid

Volume with a polyhedral shape.

class opengate.geometry.volumes.SphereVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.SphereSolid

Volume with a sphere or spherical shell shape.

class opengate.geometry.volumes.TrapVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.TrapSolid

Volume with a generic trapezoidal shape.

class opengate.geometry.volumes.TrdVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.TrdSolid

Volume with a symmetric trapezoidal shape.

class opengate.geometry.volumes.TubsVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.TubsSolid

Volume with a tube or cylindrical section shape.

class opengate.geometry.volumes.TesselatedVolume(*args, **kwargs)[source]

Bases: RepeatableVolume, opengate.geometry.solids.TesselatedSolid

Volume based on a mesh volume by reading an STL file.

class opengate.geometry.volumes.RepeatParametrisedVolume(repeated_volume, *args, **kwargs)[source]

Bases: VolumeBase

Volume created from another volume via translations.

user_info_defaults[source]
type_name = 'RepeatParametrised'[source]
repeated_volume[source]
repeat_parametrisation = None[source]
close()[source]
construct()[source]
construct_physical_volume()[source]
create_repeat_parametrisation()[source]
class opengate.geometry.volumes.ImageVolume(*args, **kwargs)[source]

Bases: VolumeBase, opengate.geometry.solids.ImageSolid

Store information about a voxelized volume

user_info_defaults[source]
material_to_label_lut = None[source]
itk_image = None[source]
label_image = None[source]
g4_physical_x = None[source]
g4_physical_y = None[source]
g4_physical_z = None[source]
g4_logical_x = None[source]
g4_logical_y = None[source]
g4_logical_z = None[source]
g4_voxel_param = None[source]
__getstate__()[source]
close()[source]
release_g4_references()[source]
property size_pix[source]
property spacing[source]
construct()[source]
construct_physical_volume()[source]
construct_logical_volume()[source]
create_material_to_label_lut(material=None, voxel_materials=None)[source]
read_input_image(path=None)[source]
create_label_image(itk_image=None)[source]
create_image_parametrisation(label_image=None)[source]
update_label_image(label_image)[source]

Needed for dynamic image parametrisation.

save_label_image(path=None)[source]
create_changers()[source]
class opengate.geometry.volumes.ParallelWorldVolume(name, volume_manager)[source]

Bases: anytree.NodeMixin

name[source]
volume_manager[source]
parent[source]
parallel_world_engine = None[source]
g4_world_phys_vol = None[source]
g4_world_log_vol = None[source]
release_g4_references()[source]
close()[source]
__getstate__()[source]
construct()[source]
_update_node()[source]
class opengate.geometry.volumes.VolumeTreeRoot(volume_manager)[source]

Bases: anytree.NodeMixin

Small class to provide a root for the volume tree.

volume_manager[source]
volume_engine = None[source]
name = 'volume_tree_root'[source]
parent = None[source]
__getstate__()[source]
close()[source]