-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from KrisThielemans/GeometricDescription
scanner geometry
- Loading branch information
Showing
13 changed files
with
537 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ python/prd/ | |
~$* | ||
*~ | ||
*.bak | ||
\#* | ||
*# | ||
.#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# A shape filled with a uniform material | ||
SolidVolume<Shape>: !record | ||
fields: | ||
shape: Shape | ||
# identifier referring to `ScannerInformation.bulkMaterials` list | ||
materialId: uint | ||
|
||
BoxSolidVolume: SolidVolume<BoxShape> | ||
GenericSolidVolume: SolidVolume<GeometricShape> | ||
|
||
# A list of identical SolidVolumes<BoxShape> at different locations | ||
ReplicatedBoxSolidVolume: ReplicatedObject< BoxSolidVolume > | ||
|
||
# A list of identical SolidVolumes<BGeometricShape> at different locations | ||
ReplicatedGenericSolidVolume: ReplicatedObject< GenericSolidVolume > | ||
|
||
# Top-level detector structure, consisting of one or more lists of detecting elements (or "crystals") | ||
# This allows having different types of detecting elements (e.g. for phoswich detectors) | ||
# TODO this could be made into a hierarchical structure | ||
DetectorModule: !record | ||
fields: | ||
detectingElements: ReplicatedBoxSolidVolume* | ||
# list of unique ids for every replicated solid volume | ||
# constraint: size(detectingElements) == size(detectingElementsIds) | ||
detectingElementIds: uint* | ||
# optional list describing shielding/optical reflectors etc | ||
nonDetectingElements: ReplicatedGenericSolidVolume* | ||
|
||
# A list of identical modules at different locations | ||
ReplicatedDetectorModule: ReplicatedObject< DetectorModule > | ||
|
||
# Full definition of the geometry of the scanner, consisting of | ||
# one of more types of modules replicated in space and (optional) other structures (e.g. side-shielding) | ||
ScannerGeometry: !record | ||
fields: | ||
# list of different types of replicated modules | ||
replicatedModules: ReplicatedDetectorModule* | ||
# list of unique ids for every replicated module | ||
# constraint: size(replicated_modules) == size(ids) | ||
ids: uint* | ||
# shielding etc | ||
nonDetectingVolumes: GenericSolidVolume*? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Type definitions related to geometry and coordinates | ||
|
||
# 3D coordinates (in mm) | ||
Coordinate: !record | ||
fields: | ||
c: float[3] | ||
|
||
# 3D direction vector (normalized to 1) | ||
Direction: !record | ||
fields: | ||
c: float[3] | ||
|
||
# Orthonormal matrix | ||
# direction_of_first_axis = matrix * [1, 0 ,0] (as a column vector) | ||
DirectionMatrix: !record | ||
fields: | ||
matrix: float[3, 3] | ||
|
||
# Rigid transformation, encoded via homogenous transformation | ||
# transformed_coord = matrix * [c, 1] (where [c,1] is a column vector) | ||
# with `c` of type `Coordinate` | ||
RigidTransformation: !record | ||
fields: | ||
matrix: float[3, 4] | ||
|
||
# A list of identical objects at different locations | ||
ReplicatedObject<T>: !record | ||
fields: | ||
object: T | ||
# list of transforms | ||
# constraint: length >= 1 | ||
transforms: RigidTransformation* | ||
# list of unique ids for every replicated solid volume | ||
# constraint: size(transforms) == size(ids) | ||
ids: uint* | ||
computedFields: | ||
numberOfObjects: size(transforms) | ||
|
||
# A box-shape specified by 8 corners (e.g. cuboid, wedge, etc.) | ||
# TODO need to think about a clear definition of planes | ||
# We do not want to have to check about intersection planes | ||
# Potential mechanisms: | ||
# - lexicographical ordering of corner coordinates? | ||
# - first 4 coordinates give first plane, 5th and 6th need to define plane with first 2, etc. | ||
BoxShape: !record | ||
fields: | ||
corners: Coordinate*8 | ||
|
||
# Annulus of certain thickness centered at [0,0,0] and oriented along the [0,0,1] axis | ||
# in radians. An angle of 0 corresponds to the [1,0,0] axis, Pi/2 corresponds to the [0,1,0] axis. | ||
AnnulusShape: !record | ||
fields: | ||
# inner radius (in mm) | ||
innerRadius: float | ||
# outer radius (in mm) | ||
outerRadius: float | ||
# thickness of the annulus, i.e. length along the axis (in mm) | ||
thickness: float | ||
# start-stop angle (in radians) | ||
angularRange: float*2 | ||
# center point of the cylinder defining the annulus | ||
|
||
# Union of all possible shapes | ||
GeometricShape: [BoxShape, AnnulusShape] |
Oops, something went wrong.