Skip to content

Commit

Permalink
Fix #36 Allow transformed XYZ geometries (#42)
Browse files Browse the repository at this point in the history
* Allow transformed XYZ geometries

Add transformed XYZ geometries to list of geometries that have getMass() / getVolume() methods and that can write 3ddose files.

* Warn about bounds of transformed XYZ

Transformed XYZ geometries do not describe their bounds, so warn the user that this information will be incorrect within the egslog, 3ddose, and egsphant output files.
  • Loading branch information
mchamberland authored Dec 22, 2022
1 parent 017681e commit 7ddc4bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions egs_brachy/egs_brachy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ void EB_Application::describeSimulation() {
);
}

if (type == "EGS_XYZGeometryT") {
egsWarning("\n***WARNING***\nPhantom of type transformed XYZ geometry used. The bounds of the phantom reported in the egslog, 3ddose, and egsphant files will be incorrect due to limitations of the geometry library.\n***WARNING***\n");
}

}

egsInformation("\n\negs_brachy Volume correction details\n%s\n", string(80, '-').c_str());
Expand Down
4 changes: 2 additions & 2 deletions egs_brachy/phantom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ string space2underscore(std::string text) {
* without specifying their volumes. Other geometry type need to have their
* volumes specified using `phantom region volumes` inputs.
* */
const string EB_Phantom::autovol_phantom_geom_types[] = {"EGS_cSpheres", "EGS_cSphericalShell", "EGS_XYZGeometry", "EGS_RZ"};
const string EB_Phantom::autovol_phantom_geom_types[] = {"EGS_cSpheres", "EGS_cSphericalShell", "EGS_XYZGeometry", "EGS_XYZGeometryT", "EGS_RZ"};


/* geometries that support 3ddose files */
const string EB_Phantom::threeddose_geom_types[] = {"EGS_cSpheres", "EGS_cSphericalShell", "EGS_XYZGeometry", "EGS_RZ"};
const string EB_Phantom::threeddose_geom_types[] = {"EGS_cSpheres", "EGS_cSphericalShell", "EGS_XYZGeometry", "EGS_XYZGeometryT", "EGS_RZ"};

/* initializer for phantom class */
EB_Phantom::EB_Phantom(EGS_Application *parent, EGS_BaseGeometry *geom, set<int> global_regions, int nsource,
Expand Down

0 comments on commit 7ddc4bc

Please sign in to comment.