EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
GeomInfo Class Reference

a container for organizing meta data about the geometries More...

#include <ginfo.h>

Collaboration diagram for GeomInfo:
Collaboration graph
[legend]

Public Member Functions

 GeomInfo ()
 
 ~GeomInfo ()
 
int initializeFromInput (EGS_Input *input)
 Initialize the GeomInfo structure (ginfo) This function reads the geometry input block, ensures all the required keys are present and pulls out information like which geometries are phantoms and sources.
 
void setGeometryIndexes (EGS_BaseGeometry *sim_geom)
 Setup all arrays required to decide which geometry/phantom a region is in and whether or not we are scoring dose in it.
 
int phantomFromRegion (int ir)
 return the phantom index for this region number or -1 if region is not in a phantom
 
GeomRegT globalToLocal (int ir)
 convert global region number to (EGS_BaseGeometry, local_reg_num) pair
 
int globalToLocalReg (int ir)
 convert global region number to local_reg_num
 
int localToGlobal (GeomRegT)
 
bool isPhantom (int ir)
 
bool isSource (int ir)
 
void printInfo ()
 

Public Attributes

string sim_geom_name
 
string source_envelope_name
 
vector< string > phantom_names
 
vector< string > source_names
 
Nodegeom_tree
 
int ngeom
 total number of geometries created
 
int nreg_total
 total number of regions in the simulation geometry
 
vector< GeomRegionInfoordered_geom_data
 
map< EGS_BaseGeometry *, GeomRegionInfogeom_to_regioninfo
 
vector< EB_Phantom * > phantom_geoms
 pointers to all of the phantom objects
 

Private Member Functions

vector< string > getChildren (string name, EGS_Input *inp)
 
void getGeomRegs (Node, vector< GeomRegionInfo > &, int)
 
void setGeomMap ()
 
Node build_tree (string root, vector< Node > &children)
 

Private Attributes

vector< int > global_ir_to_phant
 array of size nreg mapping global region number to
 
vector< int > global_ir_to_source
 the phantoms geometry index or -1 if not a phant
 
vector< EGS_BaseGeometry * > global_ir_to_geom
 the source geometry index or -1 if not a source
 
vector< int > global_ir_to_local_ir
 pointer for the geometry it belongs to
 
GeomRegionInfoMapT gmap
 

Detailed Description

a container for organizing meta data about the geometries

Definition at line 99 of file ginfo.h.

Constructor & Destructor Documentation

◆ GeomInfo()

GeomInfo::GeomInfo ( )
inline

Definition at line 142 of file ginfo.h.

◆ ~GeomInfo()

GeomInfo::~GeomInfo ( )
inline

Definition at line 143 of file ginfo.h.

Member Function Documentation

◆ build_tree()

Node GeomInfo::build_tree ( string  root,
vector< Node > &  children 
)
private

Definition at line 71 of file ginfo.cpp.

◆ getChildren()

vector< string > GeomInfo::getChildren ( string  name,
EGS_Input *  inp 
)
private

Definition at line 332 of file ginfo.cpp.

◆ getGeomRegs()

void GeomInfo::getGeomRegs ( Node  root,
vector< GeomRegionInfo > &  ordered,
int  start 
)
private

Definition at line 417 of file ginfo.cpp.

◆ globalToLocal()

GeomRegT GeomInfo::globalToLocal ( int  ir)

convert global region number to (EGS_BaseGeometry, local_reg_num) pair

Definition at line 479 of file ginfo.cpp.

◆ globalToLocalReg()

int GeomInfo::globalToLocalReg ( int  ir)

convert global region number to local_reg_num

Definition at line 487 of file ginfo.cpp.

◆ initializeFromInput()

int GeomInfo::initializeFromInput ( EGS_Input *  input)

Initialize the GeomInfo structure (ginfo) This function reads the geometry input block, ensures all the required keys are present and pulls out information like which geometries are phantoms and sources.

Note since we can't do a deep copy of the input we have to take all the geometry input items and then re-write them to the ginput

Definition at line 85 of file ginfo.cpp.

◆ isPhantom()

bool GeomInfo::isPhantom ( int  ir)

Definition at line 498 of file ginfo.cpp.

◆ isSource()

bool GeomInfo::isSource ( int  ir)

Definition at line 503 of file ginfo.cpp.

◆ localToGlobal()

int GeomInfo::localToGlobal ( GeomRegT  local)

Definition at line 492 of file ginfo.cpp.

◆ phantomFromRegion()

int GeomInfo::phantomFromRegion ( int  ir)

return the phantom index for this region number or -1 if region is not in a phantom

Definition at line 508 of file ginfo.cpp.

◆ printInfo()

void GeomInfo::printInfo ( )

Definition at line 513 of file ginfo.cpp.

◆ setGeometryIndexes()

void GeomInfo::setGeometryIndexes ( EGS_BaseGeometry *  sim_geom)

Setup all arrays required to decide which geometry/phantom a region is in and whether or not we are scoring dose in it.

To setup the arrays we loop through all geometries, decide whether it is a phantom or not, then loop through each region in the geometry and set the local region number phantom index etc

Definition at line 441 of file ginfo.cpp.

◆ setGeomMap()

void GeomInfo::setGeomMap ( )
private

Member Data Documentation

◆ geom_to_regioninfo

map<EGS_BaseGeometry *, GeomRegionInfo> GeomInfo::geom_to_regioninfo

mapping from geometry to info about that geometry

Definition at line 151 of file ginfo.h.

◆ geom_tree

Node* GeomInfo::geom_tree

a tree representing the parent/child relationships of the geometry

Definition at line 136 of file ginfo.h.

◆ global_ir_to_geom

vector<EGS_BaseGeometry *> GeomInfo::global_ir_to_geom
private

the source geometry index or -1 if not a source

array of size nreg mapping global region number to

Definition at line 108 of file ginfo.h.

◆ global_ir_to_local_ir

vector<int> GeomInfo::global_ir_to_local_ir
private

pointer for the geometry it belongs to

array of size nreg mapping global region number to

Definition at line 111 of file ginfo.h.

◆ global_ir_to_phant

vector<int> GeomInfo::global_ir_to_phant
private

array of size nreg mapping global region number to

Definition at line 101 of file ginfo.h.

◆ global_ir_to_source

vector<int> GeomInfo::global_ir_to_source
private

the phantoms geometry index or -1 if not a phant

array of size nreg mapping global region number to

Definition at line 104 of file ginfo.h.

◆ gmap

GeomRegionInfoMapT GeomInfo::gmap
private

the local region number of the geometry it belongs to. e.g. it would look like: global_ir_to_local_ir = [0, 1, 2, 3, 0, 1, 2, 3, 5] for a geometry consisting of two objects, the first with 4 regions and the second with 5 regions

Definition at line 118 of file ginfo.h.

◆ ngeom

int GeomInfo::ngeom

total number of geometries created

Definition at line 138 of file ginfo.h.

◆ nreg_total

int GeomInfo::nreg_total

total number of regions in the simulation geometry

Definition at line 139 of file ginfo.h.

◆ ordered_geom_data

vector<GeomRegionInfo> GeomInfo::ordered_geom_data

All geometries in their constructed order

Definition at line 149 of file ginfo.h.

◆ phantom_geoms

vector<EB_Phantom *> GeomInfo::phantom_geoms

pointers to all of the phantom objects

Definition at line 153 of file ginfo.h.

◆ phantom_names

vector<string> GeomInfo::phantom_names

A list of all geometries to create scoring phantom objects for (arbitrary ordering

Definition at line 132 of file ginfo.h.

◆ sim_geom_name

string GeomInfo::sim_geom_name

name of the simulation geometry

Definition at line 130 of file ginfo.h.

◆ source_envelope_name

string GeomInfo::source_envelope_name

name of the geometry that embeds the sources (required for superpostion mode)

Definition at line 131 of file ginfo.h.

◆ source_names

vector<string> GeomInfo::source_names

Names of geometries the user has specified as being source geoms

Definition at line 134 of file ginfo.h.


The documentation for this class was generated from the following files: