Export CT voxel data aligned with SAR/EM grid for use in Python
-
I am working with Sim4Life and exporting simulation results for analysis in Python.
I can successfully export SAR volumes and the corresponding grid coordinates. When I plot these in Python, they are correctly aligned. Inside Sim4Life, the SAR and CT images overlap perfectly.
But if I load the original DICOM CT outside of S4L (e.g. with SimpleITK), the CT and SAR do not overlap, origins and orientations differ. This makes me believe that Sim4Life uses its own internal coordinate system for CT, and I need to export the CT from S4L directly in that system (instead of reloading the raw DICOM).My questions are:
How can I export CT (HU values) with the proper coordinate system used inside S4L?
Either on its native voxel grid, Or resampled onto the EM/SAR grid (preferred for direct overlay).
What is the correct way in the Python API to access the CT voxel dataset from the project tree?Thank you in advance!