-
Notifications
You must be signed in to change notification settings - Fork 98
Description
The mMR and other scanners use "virtual" crystals. In GATE you have to simulate the true crystal block, but when reading the ROOT file, it would make sense to insert the virtual crystal to be able to reproduce sinograms like the scanner does.
This was implemented on the GATE_ROOT branch. In particular, in the lines
STIR/src/utilities/Bin_GATE.cxx
Lines 317 to 320 in dd5af80
| crystal1 = rsectorID1 * N_MOD_xy * N_SMOD_xy * N_CRY_xy | |
| + (moduleID1%N_MOD_xy) * N_SMOD_xy * N_CRY_xy | |
| + (submoduleID1%N_SMOD_xy) * N_CRY_xy | |
| + (crystalID1%8); |
N_CRY_xy was set to 9, above while the crystal is computed modulo 8 (also using 8 for the ring.
Equivalent lines are in
STIR/src/IO/InputStreamFromROOTFileForCylindricalPET.cxx
Lines 93 to 109 in 4064c0d
| int ring1 = static_cast<int>(crystalID1/crystal_repeater_y) | |
| + static_cast<int>(submoduleID1/submodule_repeater_y)*crystal_repeater_z | |
| + static_cast<int>(moduleID1/module_repeater_y)*submodule_repeater_z*crystal_repeater_z; | |
| int ring2 = static_cast<int>(crystalID2/crystal_repeater_y) | |
| + static_cast<int>(submoduleID2/submodule_repeater_y)*crystal_repeater_z | |
| + static_cast<int>(moduleID2/module_repeater_y)*submodule_repeater_z*crystal_repeater_z; | |
| int crystal1 = rsectorID1 * module_repeater_y * submodule_repeater_y * crystal_repeater_y | |
| + (moduleID1%module_repeater_y) * submodule_repeater_y * crystal_repeater_y | |
| + (submoduleID1%submodule_repeater_y) * crystal_repeater_y | |
| + (crystalID1%crystal_repeater_y); | |
| int crystal2 = rsectorID2 * module_repeater_y * submodule_repeater_y * crystal_repeater_y | |
| + (moduleID2%module_repeater_y) * submodule_repeater_y * crystal_repeater_y | |
| + (submoduleID2% submodule_repeater_y) * crystal_repeater_y | |
| + (crystalID2%crystal_repeater_y); |
STIR/src/IO/InputStreamFromROOTFileForECATPET.cxx
Lines 89 to 99 in 4064c0d
| int ring1 = static_cast<Int_t>(crystalID1/crystal_repeater_z) | |
| + static_cast<Int_t>(blockID1/ block_repeater)*crystal_repeater_z; | |
| int ring2 = static_cast<Int_t>(crystalID2/crystal_repeater_z) | |
| + static_cast<Int_t>(blockID2/block_repeater)*crystal_repeater_z; | |
| int crystal1 = (blockID1%block_repeater) * crystal_repeater_y | |
| + (crystalID1%crystal_repeater_z); | |
| int crystal2 = (blockID2%block_repeater) * crystal_repeater_y | |
| + (crystalID2%crystal_repeater_z); |
#352 introduces Scanner::get_num_virtual_axial_crystals_per_block() and Scanner::get_num_virtual_transaxial_crystals_per_block(). It seems that we could use these.