|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A "voxelized shape". More...
#include <egs_voxelized_shape.h>
Public Member Functions | |
| EGS_VoxelizedShape (int file_format, const char *fname, const string &Name="", EGS_ObjectFactory *f=0) | |
| Conctructor. More... | |
| void | EGS_VoxelizedShapeFormat0 (const char *fname, const string &Name="", EGS_ObjectFactory *f=0) |
| EGS_Vector | getPoint (EGS_RandomGenerator *rndm) |
| bool | isValid () const |
Public Member Functions inherited from EGS_BaseShape | |
| EGS_BaseShape (const string &Name="", EGS_ObjectFactory *f=0) | |
| Construct a shape named Name. | |
| virtual | ~EGS_BaseShape () |
Destructor. Deletes T if it is not null. | |
| virtual EGS_Vector | getRandomPoint (EGS_RandomGenerator *rndm) |
| Returns a random 3D vector. More... | |
| void | setTransformation (EGS_Input *inp) |
| Set the transformation attached to this shape. More... | |
| void | setTransformation (EGS_AffineTransform *t) |
| Set the transformation attached to this shape. More... | |
| const EGS_AffineTransform * | getTransform () const |
| Get a pointer to the affine transformation attached to this shape. | |
| virtual bool | supportsDirectionMethod () const |
| virtual void | getNextShapePosition (EGS_RandomGenerator *rndm) |
| virtual void | getPointSourceDirection (const EGS_Vector &xo, EGS_RandomGenerator *rndm, EGS_Vector &u, EGS_Float &wt) |
| virtual EGS_Float | area () const |
| virtual void | updatePosition (EGS_Float time) |
| Update the position of the shape if it is in motion. | |
Public Member Functions inherited from EGS_Object | |
| EGS_Object (const string &Name="", EGS_ObjectFactory *f=0) | |
| Create an EGS_Object named Name belonging to the object factory f. More... | |
| EGS_Object (EGS_Input *inp, EGS_ObjectFactory *f=0) | |
| Create an EGS_Object from the information pointed to by inp that belongs to object factory f. More... | |
| const string & | getObjectName () const |
| Get the object name. | |
| void | setObjectName (const string &Name) |
| Set the object name to Name. | |
| const string & | getObjectType () const |
| Get the object type. | |
| virtual EGS_Object * | createObject (EGS_Input *inp) |
| Create an object from the infromation pointed to by inp. More... | |
| void | setName (EGS_Input *inp) |
| Set the name of the object from the information provided by inp. More... | |
| int | ref () |
| Increase the reference count to this object. | |
| int | deref () |
| Decrease the reference count to this object. | |
| void | setFactory (EGS_ObjectFactory *f) |
| Set the factory to which the object belongs. More... | |
Protected Attributes | |
| EGS_SimpleAliasTable * | prob |
| EGS_Float * | xpos |
| ! The alias table for randomly picking voxels | |
| EGS_Float * | ypos |
| ! The x-positions of the grid | |
| EGS_Float * | zpos |
| ! The y-positions of the grid | |
| int * | map |
| ! The z-positions of the grid | |
| int | nx |
| ! Voxel map (for type=1) | |
| int | ny |
| int | nz |
| int | nxy |
| int | nreg |
| int | type |
Protected Attributes inherited from EGS_BaseShape | |
| EGS_AffineTransform * | T |
| The affine transformation attached to the shape. | |
Protected Attributes inherited from EGS_Object | |
| string | name |
| The object name. | |
| string | otype |
| The object type. | |
| int | nref |
| Number of references to the object. | |
| EGS_ObjectFactory * | factory |
| The factory this object belongs to. | |
Additional Inherited Members | |
Static Public Member Functions inherited from EGS_BaseShape | |
| static EGS_BaseShape * | createShape (EGS_Input *inp) |
| Create a shape from the information pointed to by inp. More... | |
| static EGS_BaseShape * | getShape (const string &Name) |
| Get a pointer to the shape named Name. More... | |
Static Public Member Functions inherited from EGS_Object | |
| static string | getUniqueName (const EGS_Object *o=0) |
| Create and return a unique object name. More... | |
| static void | deleteObject (EGS_Object *o) |
| Delete an object. More... | |
A "voxelized shape".
A shape of this type can be used to pick points randomly within a XYZ grid where each voxel has a given probability to be selected. This is useful, for instance, to model a radioactivity distribution. This shape is specified via
:start shape:
library = egs_voxelized_shape
file name = some_file
:stop shape:
The some_file file must be a binary file containing the following information:
Definition at line 97 of file egs_voxelized_shape.h.
| EGS_VoxelizedShape::EGS_VoxelizedShape | ( | int | file_format, |
| const char * | fname, | ||
| const string & | Name = "", |
||
| EGS_ObjectFactory * | f = 0 |
||
| ) |
Conctructor.
Construct a voxelized shape from the data provided in the binary file fname
Definition at line 181 of file egs_voxelized_shape.cpp.
References egsFatal, egsInformation, egsWarning, loopMax, nx, and EGS_Object::otype.
1.9.1