pytomography 3.0.0__tar.gz → 3.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. {pytomography-3.0.0 → pytomography-3.1.2}/PKG-INFO +3 -2
  2. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/algorithms/fbp/index.rst +2 -2
  3. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/algorithms/index.rst +20 -5
  4. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/algorithms/preconditioned_gradient_ascent/index.rst +43 -13
  5. pytomography-3.1.2/docs/source/autoapi/pytomography/io/CT/dicom_ct_pd/index.rst +26 -0
  6. pytomography-3.1.2/docs/source/autoapi/pytomography/io/CT/index.rst +15 -0
  7. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/index.rst +0 -1
  8. {pytomography-3.0.0/docs/source/autoapi/pytomography/io/CT → pytomography-3.1.2/docs/source/autoapi/pytomography/io/SPECT}/attenuation_map/index.rst +16 -16
  9. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/SPECT/dicom/index.rst +44 -24
  10. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/SPECT/index.rst +9 -8
  11. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/shared/dicom/index.rst +15 -1
  12. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/shared/index.rst +3 -1
  13. pytomography-3.1.2/docs/source/autoapi/pytomography/metadata/CT/ct_conebeam_flatpanel_metadata/index.rst +36 -0
  14. pytomography-3.1.2/docs/source/autoapi/pytomography/metadata/CT/ct_gen3_metadata/index.rst +38 -0
  15. pytomography-3.1.2/docs/source/autoapi/pytomography/metadata/CT/index.rst +66 -0
  16. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/index.rst +1 -0
  17. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/priors/index.rst +10 -2
  18. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/priors/nearest_neighbour/index.rst +2 -2
  19. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/priors/prior/index.rst +8 -0
  20. pytomography-3.1.2/docs/source/autoapi/pytomography/projectors/CT/ct_conebeam_flatpanel_system_matrix/index.rst +137 -0
  21. pytomography-3.1.2/docs/source/autoapi/pytomography/projectors/CT/ct_gen3_system_matrix/index.rst +107 -0
  22. pytomography-3.1.2/docs/source/autoapi/pytomography/projectors/CT/index.rst +221 -0
  23. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/PET/index.rst +8 -0
  24. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/PET/petlm_system_matrix/index.rst +8 -0
  25. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/SPECT/index.rst +18 -2
  26. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/SPECT/spect_system_matrix/index.rst +18 -2
  27. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/index.rst +9 -0
  28. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/system_matrix/index.rst +8 -0
  29. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/SPECT/attenuation/index.rst +3 -1
  30. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/SPECT/index.rst +3 -1
  31. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/index.rst +1 -1
  32. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/misc/index.rst +1 -1
  33. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/index.md +2 -1
  34. pytomography-3.1.2/docs/source/notebooks/run_all_notebooks.py +27 -0
  35. pytomography-3.1.2/docs/source/notebooks/t_CT_GEN3.ipynb +468 -0
  36. pytomography-3.1.2/docs/source/notebooks/t_CT_microct.ipynb +305 -0
  37. pytomography-3.1.2/docs/source/notebooks/t_GE_HDF5.ipynb +572 -0
  38. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_DIP.ipynb +1133 -0
  39. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_LM.ipynb +504 -0
  40. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_scat_lm.ipynb → pytomography-3.1.2/docs/source/notebooks/t_PETGATE_scat_lm copy.ipynb +85 -29
  41. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_scat_lm.ipynb +1062 -0
  42. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_scat_lmTOF.ipynb +1056 -0
  43. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_scat_sino.ipynb +1547 -0
  44. pytomography-3.1.2/docs/source/notebooks/t_PETGATE_scat_sinoTOF.ipynb +1097 -0
  45. pytomography-3.1.2/docs/source/notebooks/t_dicomdata.ipynb +1344 -0
  46. pytomography-3.1.2/docs/source/notebooks/t_dicommultibed.ipynb +945 -0
  47. pytomography-3.1.2/docs/source/notebooks/t_examplesystemmatrix.ipynb +2650 -0
  48. pytomography-3.1.2/docs/source/notebooks/t_siminddata.ipynb +1957 -0
  49. pytomography-3.1.2/docs/source/notebooks/t_uncertainty_spect.ipynb +955 -0
  50. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/usage.md +3 -3
  51. {pytomography-3.0.0 → pytomography-3.1.2}/pyproject.toml +4 -2
  52. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/__init__.py +3 -1
  53. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/algorithms/fbp.py +4 -7
  54. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/algorithms/preconditioned_gradient_ascent.py +103 -85
  55. pytomography-3.1.2/src/pytomography/data/ct_table.csv +421 -0
  56. pytomography-3.1.2/src/pytomography/io/CT/__init__.py +1 -0
  57. pytomography-3.1.2/src/pytomography/io/CT/dicom_ct_pd.py +52 -0
  58. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/gate.py +2 -1
  59. {pytomography-3.0.0/src/pytomography/io/CT → pytomography-3.1.2/src/pytomography/io/SPECT}/attenuation_map.py +2 -2
  60. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/SPECT/dicom.py +124 -86
  61. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/shared/dicom.py +45 -12
  62. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/shared/interfile.py +1 -1
  63. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/likelihoods/likelihood.py +2 -1
  64. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/likelihoods/mse_objective.py +1 -0
  65. pytomography-3.1.2/src/pytomography/metadata/CT/__init__.py +2 -0
  66. pytomography-3.1.2/src/pytomography/metadata/CT/ct_conebeam_flatpanel_metadata.py +70 -0
  67. pytomography-3.1.2/src/pytomography/metadata/CT/ct_gen3_metadata.py +86 -0
  68. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/SPECT/spect_metadata.py +1 -1
  69. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/priors/nearest_neighbour.py +19 -15
  70. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/priors/prior.py +9 -1
  71. pytomography-3.1.2/src/pytomography/projectors/CT/__init__.py +6 -0
  72. pytomography-3.1.2/src/pytomography/projectors/CT/ct_conebeam_flatpanel_system_matrix.py +234 -0
  73. pytomography-3.1.2/src/pytomography/projectors/CT/ct_gen3_system_matrix.py +160 -0
  74. pytomography-3.1.2/src/pytomography/projectors/PET/__init__.py +6 -0
  75. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/PET/pet_sinogram_system_matrix.py +1 -4
  76. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/PET/petlm_system_matrix.py +34 -10
  77. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/SPECT/spect_system_matrix.py +34 -31
  78. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/system_matrix.py +9 -1
  79. pytomography-3.1.2/src/pytomography/tests/test_multi_bed_recon.py +78 -0
  80. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/SPECT/attenuation.py +5 -2
  81. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/SPECT/psf.py +1 -1
  82. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/shared/filters.py +1 -0
  83. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/misc.py +2 -2
  84. pytomography-3.1.2/src/pytomography/utils/scatter.py +104 -0
  85. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/sss.py +10 -6
  86. pytomography-3.0.0/docs/source/autoapi/pytomography/io/CT/index.rst +0 -48
  87. pytomography-3.0.0/docs/source/autoapi/pytomography/io/PET/shared-copy/index.rst +0 -194
  88. pytomography-3.0.0/docs/source/notebooks/t_GE_HDF5.ipynb +0 -245
  89. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_DIP.ipynb +0 -574
  90. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_LM.ipynb +0 -445
  91. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_scat_lmTOF.ipynb +0 -604
  92. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_scat_sino.ipynb +0 -840
  93. pytomography-3.0.0/docs/source/notebooks/t_PETGATE_scat_sinoTOF.ipynb +0 -660
  94. pytomography-3.0.0/docs/source/notebooks/t_dicomdata.ipynb +0 -624
  95. pytomography-3.0.0/docs/source/notebooks/t_dicommultibed.ipynb +0 -462
  96. pytomography-3.0.0/docs/source/notebooks/t_examplesystemmatrix.ipynb +0 -1490
  97. pytomography-3.0.0/docs/source/notebooks/t_siminddata.ipynb +0 -976
  98. pytomography-3.0.0/docs/source/notebooks/t_uncertainty_spect.ipynb +0 -439
  99. pytomography-3.0.0/src/pytomography/io/CT/__init__.py +0 -3
  100. pytomography-3.0.0/src/pytomography/projectors/PET/__init__.py +0 -2
  101. pytomography-3.0.0/src/pytomography/utils/scatter.py +0 -35
  102. {pytomography-3.0.0 → pytomography-3.1.2}/.github/workflows/publish-to-test-pypi.yml +0 -0
  103. {pytomography-3.0.0 → pytomography-3.1.2}/.gitignore +0 -0
  104. {pytomography-3.0.0 → pytomography-3.1.2}/.readthedocs.yaml +0 -0
  105. {pytomography-3.0.0 → pytomography-3.1.2}/LICENSE +0 -0
  106. {pytomography-3.0.0 → pytomography-3.1.2}/README.md +0 -0
  107. {pytomography-3.0.0 → pytomography-3.1.2}/docs/Makefile +0 -0
  108. {pytomography-3.0.0 → pytomography-3.1.2}/docs/make.bat +0 -0
  109. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/index.rst +0 -0
  110. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/attribute.rst +0 -0
  111. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/class.rst +0 -0
  112. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/data.rst +0 -0
  113. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/exception.rst +0 -0
  114. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/function.rst +0 -0
  115. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/method.rst +0 -0
  116. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/module.rst +0 -0
  117. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/package.rst +0 -0
  118. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/_templates/autoapi/python/property.rst +0 -0
  119. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/index.rst +0 -0
  120. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/algorithms/dip_recon/index.rst +0 -0
  121. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/callbacks/callback/index.rst +0 -0
  122. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/callbacks/data_saving/index.rst +0 -0
  123. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/callbacks/index.rst +0 -0
  124. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/index.rst +0 -0
  125. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/clinical/index.rst +0 -0
  126. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/gate/index.rst +0 -0
  127. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/petsird/index.rst +0 -0
  128. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/_binary/index.rst +0 -0
  129. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/_dtypes/index.rst +0 -0
  130. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/_ndjson/index.rst +0 -0
  131. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/binary/index.rst +0 -0
  132. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/index.rst +0 -0
  133. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/ndjson/index.rst +0 -0
  134. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/protocols/index.rst +0 -0
  135. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/types/index.rst +0 -0
  136. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/prd/yardl_types/index.rst +0 -0
  137. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/PET/shared/index.rst +0 -0
  138. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/SPECT/shared/index.rst +0 -0
  139. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/SPECT/simind/index.rst +0 -0
  140. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/index.rst +0 -0
  141. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/shared/dicom_creation/index.rst +0 -0
  142. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/io/shared/interfile/index.rst +0 -0
  143. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/likelihoods/index.rst +0 -0
  144. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/likelihoods/likelihood/index.rst +0 -0
  145. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/likelihoods/mse_objective/index.rst +0 -0
  146. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/likelihoods/poisson_log_likelihood/index.rst +0 -0
  147. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/PET/index.rst +0 -0
  148. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/PET/pet_sinogram_metadata/index.rst +0 -0
  149. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/PET/pet_tof_metadata/index.rst +0 -0
  150. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/PET/petlm_metadata/index.rst +0 -0
  151. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/SPECT/index.rst +0 -0
  152. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/SPECT/spect_metadata/index.rst +0 -0
  153. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/metadata/metadata/index.rst +0 -0
  154. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/PET/pet_sinogram_system_matrix/index.rst +0 -0
  155. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/shared/index.rst +0 -0
  156. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/shared/kem_system_matrix/index.rst +0 -0
  157. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/projectors/shared/motion_correction_system_matrix/index.rst +0 -0
  158. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/SPECT/psf/index.rst +0 -0
  159. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/index.rst +0 -0
  160. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/shared/filters/index.rst +0 -0
  161. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/shared/index.rst +0 -0
  162. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/shared/kem/index.rst +0 -0
  163. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/shared/motion/index.rst +0 -0
  164. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/shared/spatial/index.rst +0 -0
  165. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/transforms/transform/index.rst +0 -0
  166. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/fourier_filters/index.rst +0 -0
  167. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/nist_data/index.rst +0 -0
  168. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/scatter/index.rst +0 -0
  169. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/spatial/index.rst +0 -0
  170. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/autoapi/pytomography/utils/sss/index.rst +0 -0
  171. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/conf.py +0 -0
  172. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/developers_guide.md +0 -0
  173. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/external_data.md +0 -0
  174. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/PT1.png +0 -0
  175. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/coordinate_conventions.png +0 -0
  176. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/emission.png +0 -0
  177. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/example_scanner_sm.png +0 -0
  178. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/figure4.jpg +0 -0
  179. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/figure5.jpg +0 -0
  180. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/images/pytomo_front_title.png +0 -0
  181. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/conventions.ipynb +0 -0
  182. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/script_to_generate_eta_for_petsird.py +0 -0
  183. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/t_PETGATE_SINO.ipynb +0 -0
  184. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/t_PETSIRD.ipynb +0 -0
  185. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/t_fbp.ipynb +0 -0
  186. {pytomography-3.0.0 → pytomography-3.1.2}/docs/source/notebooks/t_quantitative.ipynb +0 -0
  187. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/algorithms/__init__.py +0 -0
  188. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/algorithms/dip_recon.py +0 -0
  189. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/callbacks/__init__.py +0 -0
  190. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/callbacks/callback.py +0 -0
  191. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/callbacks/data_saving.py +0 -0
  192. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/adipose.csv +0 -0
  193. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/air.csv +0 -0
  194. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/aluminum.csv +0 -0
  195. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/bonecortical.csv +0 -0
  196. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/boneequivplastic.csv +0 -0
  197. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/breast.csv +0 -0
  198. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/lead.csv +0 -0
  199. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/lungtissue.csv +0 -0
  200. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/muscle.csv +0 -0
  201. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/tissueequivplastic.csv +0 -0
  202. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/tungsten.csv +0 -0
  203. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/NIST_attenuation_data/water.csv +0 -0
  204. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/collim.col +0 -0
  205. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/data/pet_scanner_info.txt +0 -0
  206. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/__init__.py +0 -0
  207. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/clinical.py +0 -0
  208. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/petsird.py +0 -0
  209. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/__init__.py +0 -0
  210. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/_binary.py +0 -0
  211. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/_dtypes.py +0 -0
  212. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/_ndjson.py +0 -0
  213. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/binary.py +0 -0
  214. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/ndjson.py +0 -0
  215. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/protocols.py +0 -0
  216. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/types.py +0 -0
  217. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/prd/yardl_types.py +0 -0
  218. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/PET/shared.py +0 -0
  219. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/SPECT/__init__.py +0 -0
  220. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/SPECT/shared.py +0 -0
  221. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/SPECT/simind.py +0 -0
  222. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/__init__.py +0 -0
  223. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/shared/__init__.py +0 -0
  224. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/io/shared/dicom_creation.py +0 -0
  225. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/likelihoods/__init__.py +0 -0
  226. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/likelihoods/poisson_log_likelihood.py +0 -0
  227. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/PET/__init__.py +0 -0
  228. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/PET/pet_sinogram_metadata.py +0 -0
  229. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/PET/pet_tof_metadata.py +0 -0
  230. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/PET/petlm_metadata.py +0 -0
  231. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/SPECT/__init__.py +0 -0
  232. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/__init__.py +0 -0
  233. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/metadata/metadata.py +0 -0
  234. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/priors/__init__.py +0 -0
  235. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/SPECT/__init__.py +0 -0
  236. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/__init__.py +0 -0
  237. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/shared/__init__.py +0 -0
  238. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/shared/kem_system_matrix.py +0 -0
  239. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/projectors/shared/motion_correction_system_matrix.py +0 -0
  240. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/SPECT/__init__.py +0 -0
  241. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/__init__.py +0 -0
  242. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/shared/__init__.py +0 -0
  243. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/shared/kem.py +0 -0
  244. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/shared/motion.py +0 -0
  245. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/shared/spatial.py +0 -0
  246. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/transforms/transform.py +0 -0
  247. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/__init__.py +0 -0
  248. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/fourier_filters.py +0 -0
  249. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/nist_data.py +0 -0
  250. {pytomography-3.0.0 → pytomography-3.1.2}/src/pytomography/utils/spatial.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytomography
3
- Version: 3.0.0
3
+ Version: 3.1.2
4
4
  Summary: Package to perform tomographic image reconstruction
5
5
  Project-URL: Homepage, https://github.com/qurit/PyTomography
6
6
  Project-URL: Bug Tracker, https://github.com/qurit/PyTomography/issues
@@ -9,13 +9,14 @@ License-File: LICENSE
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.11
12
+ Requires-Python: >=3.9
13
13
  Requires-Dist: fft-conv-pytorch>=1.2.0
14
14
  Requires-Dist: h5py>=3.11.0
15
15
  Requires-Dist: kornia>=0.6.12
16
16
  Requires-Dist: matplotlib>=3.8.0
17
17
  Requires-Dist: nibabel>=5.1.0
18
18
  Requires-Dist: numpy>=1.24.2
19
+ Requires-Dist: pandas>=2.2
19
20
  Requires-Dist: pydicom>=2.0.0
20
21
  Requires-Dist: rt-utils>=1.2.0
21
22
  Requires-Dist: scipy>=1.10.1
@@ -22,7 +22,7 @@ Classes
22
22
 
23
23
 
24
24
 
25
- .. py:class:: FilteredBackProjection(projections, system_matrix, filter=None)
25
+ .. py:class:: FilteredBackProjection(projections, system_matrix, filter=RampFilter)
26
26
 
27
27
  Implementation of filtered back projection reconstruction :math:`\hat{f} = \frac{\pi}{N_{\text{proj}}} \mathcal{R}^{-1}\mathcal{F}^{-1}\Pi\mathcal{F} g` where :math:`N_{\text{proj}}` is the number of projections, :math:`\mathcal{R}` is the 3D radon transform, :math:`\mathcal{F}` is the 2D Fourier transform (applied to each projection seperately), and :math:`\Pi` is the filter applied in Fourier space, which is by default the ramp filter.
28
28
 
@@ -33,7 +33,7 @@ Classes
33
33
  :param filter: Additional Fourier space filter (applied after Ramp Filter) used during reconstruction.
34
34
  :type filter: Callable, optional
35
35
 
36
- .. py:method:: __call__()
36
+ .. py:method:: __call__(projections)
37
37
 
38
38
  Applies reconstruction
39
39
 
@@ -282,11 +282,11 @@ Classes
282
282
 
283
283
 
284
284
 
285
- .. py:class:: SART(system_matrix, projections, additive_term = None, object_initial = None)
285
+ .. py:class:: SART(system_matrix, projections, additive_term = None, object_initial = None, relaxation_sequence = lambda _: 1)
286
286
 
287
- Bases: :py:obj:`OSEM`
287
+ Bases: :py:obj:`PreconditionedGradientAscentAlgorithm`
288
288
 
289
- Implementation of the SART algorithm (OSEM with SARTWeightedNegativeMSELikelihood). This algorithm takes as input the system matrix and projections (as opposed to a likelihood) since SART is OSEM with a negative MSE likelihood.
289
+ Implementation of the SART algorithm. This algorithm takes as input the system matrix and projections (as opposed to a likelihood). This is an implementation of equation 3 of https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8506772/
290
290
 
291
291
  :param system_matrix: System matrix for the imaging system.
292
292
  :type system_matrix: SystemMatrix
@@ -297,6 +297,21 @@ Classes
297
297
  :param object_initial: Initial object for reconstruction algorithm. If None, then an object with 1 in every voxel is used. Defaults to None.
298
298
  :type object_initial: torch.Tensor | None, optional
299
299
 
300
+ .. py:method:: _compute_preconditioner(object, n_iter, n_subset)
301
+
302
+ Computes the preconditioner factor :math:`C^n(f^n) = \frac{1}{H_n^T+\nabla_f V(f^n)}`
303
+
304
+ :param object: Object estimate :math:`f^n`
305
+ :type object: torch.Tensor
306
+ :param n_iter: iteration number
307
+ :type n_iter: int
308
+ :param n_subset: subset number
309
+ :type n_subset: int
310
+
311
+ :returns: preconditioner factor.
312
+ :rtype: torch.Tensor
313
+
314
+
300
315
 
301
316
  .. py:class:: PGAAMultiBedSPECT(files_NM, reconstruction_algorithms)
302
317
 
@@ -390,7 +405,7 @@ Classes
390
405
 
391
406
 
392
407
 
393
- .. py:class:: FilteredBackProjection(projections, system_matrix, filter=None)
408
+ .. py:class:: FilteredBackProjection(projections, system_matrix, filter=RampFilter)
394
409
 
395
410
  Implementation of filtered back projection reconstruction :math:`\hat{f} = \frac{\pi}{N_{\text{proj}}} \mathcal{R}^{-1}\mathcal{F}^{-1}\Pi\mathcal{F} g` where :math:`N_{\text{proj}}` is the number of projections, :math:`\mathcal{R}` is the 3D radon transform, :math:`\mathcal{F}` is the 2D Fourier transform (applied to each projection seperately), and :math:`\Pi` is the filter applied in Fourier space, which is by default the ramp filter.
396
411
 
@@ -401,7 +416,7 @@ Classes
401
416
  :param filter: Additional Fourier space filter (applied after Ramp Filter) used during reconstruction.
402
417
  :type filter: Callable, optional
403
418
 
404
- .. py:method:: __call__()
419
+ .. py:method:: __call__(projections)
405
420
 
406
421
  Applies reconstruction
407
422
 
@@ -159,20 +159,35 @@ Classes
159
159
  :rtype: float | Sequence[float]
160
160
 
161
161
 
162
- .. py:method:: _compute_uncertainty_matrix(mask, data_storage_callback, n, include_additive_term)
162
+ .. py:method:: _compute_Q(input, data_storage_callback, n)
163
163
 
164
- Computes the quantity :math:`V^{n+1}\chi = V^{n} Q^{n} \chi + B^{n}\chi` where :math:`Q^{n} = \left[\nabla_{ff} L(g^n|f^n) - \nabla_{ff} U(f^n)\right] D^{n} \text{diag}\left(f^{n}\right) + \text{diag}\left(f^{n+1}/f^n\right)` and :math:`B^{n}=\nabla_{gf} L(g^n|f^n) D^n \text{diag}\left(f^{n}\right)` and :math:`V^{0} = 0 . This function is meant to be called recursively.
164
+ Computes the operation of :math:`Q` on an input object; this is a helper function for ``compute_uncertainty``. For more details, see the uncertainty paper.
165
165
 
166
- :param mask: Masked region :math:`\chi`.
167
- :type mask: torch.Tensor
168
- :param data_storage_callback: Callback that has been used in a reconstruction algorithm.
169
- :type data_storage_callback: DataStorageCallback
170
- :param n: Subiteration number.
166
+ :param input: Object on which Q operates
167
+ :type input: torch.Tensor
168
+ :param data_storage_callback: Data storage callback containing all objects and forward projections at each subiteration
169
+ :type data_storage_callback: Callback
170
+ :param n: Subiteration number
171
171
  :type n: int
172
- :param include_additive_term: Whether or not to include uncertainty contribution from the additive term. This requires the ``additive_term_variance_estimate`` as an argument to the initialized likelihood.
173
- :type include_additive_term: bool
174
172
 
175
- :returns: the quantity :math:`V^{n+1}\chi`
173
+ :returns: Resulting output object from the operation of :math:`Q` on the input object
174
+ :rtype: torch.Tensor
175
+
176
+
177
+ .. py:method:: _compute_B(input, data_storage_callback, n, include_additive_term = False)
178
+
179
+ Computes the operation of :math:`B` on an input object; this is a helper function for ``compute_uncertainty``. For more details, see the uncertainty paper.
180
+
181
+ :param input: Object on which B operates
182
+ :type input: torch.Tensor
183
+ :param data_storage_callback: Data storage callback containing all objects and forward projections at each subiteration
184
+ :type data_storage_callback: Callback
185
+ :param n: Subiteration number
186
+ :type n: int
187
+ :param include_additive_term: Whether or not to include uncertainty estimation for the additive term. Defaults to False.
188
+ :type include_additive_term: bool, optional
189
+
190
+ :returns: Resulting output projections from the operation of :math:`B` on the input object
176
191
  :rtype: torch.Tensor
177
192
 
178
193
 
@@ -380,11 +395,11 @@ Classes
380
395
 
381
396
 
382
397
 
383
- .. py:class:: SART(system_matrix, projections, additive_term = None, object_initial = None)
398
+ .. py:class:: SART(system_matrix, projections, additive_term = None, object_initial = None, relaxation_sequence = lambda _: 1)
384
399
 
385
- Bases: :py:obj:`OSEM`
400
+ Bases: :py:obj:`PreconditionedGradientAscentAlgorithm`
386
401
 
387
- Implementation of the SART algorithm (OSEM with SARTWeightedNegativeMSELikelihood). This algorithm takes as input the system matrix and projections (as opposed to a likelihood) since SART is OSEM with a negative MSE likelihood.
402
+ Implementation of the SART algorithm. This algorithm takes as input the system matrix and projections (as opposed to a likelihood). This is an implementation of equation 3 of https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8506772/
388
403
 
389
404
  :param system_matrix: System matrix for the imaging system.
390
405
  :type system_matrix: SystemMatrix
@@ -395,6 +410,21 @@ Classes
395
410
  :param object_initial: Initial object for reconstruction algorithm. If None, then an object with 1 in every voxel is used. Defaults to None.
396
411
  :type object_initial: torch.Tensor | None, optional
397
412
 
413
+ .. py:method:: _compute_preconditioner(object, n_iter, n_subset)
414
+
415
+ Computes the preconditioner factor :math:`C^n(f^n) = \frac{1}{H_n^T+\nabla_f V(f^n)}`
416
+
417
+ :param object: Object estimate :math:`f^n`
418
+ :type object: torch.Tensor
419
+ :param n_iter: iteration number
420
+ :type n_iter: int
421
+ :param n_subset: subset number
422
+ :type n_subset: int
423
+
424
+ :returns: preconditioner factor.
425
+ :rtype: torch.Tensor
426
+
427
+
398
428
 
399
429
  .. py:class:: PGAAMultiBedSPECT(files_NM, reconstruction_algorithms)
400
430
 
@@ -0,0 +1,26 @@
1
+ :py:mod:`pytomography.io.CT.dicom_ct_pd`
2
+ ========================================
3
+
4
+ .. py:module:: pytomography.io.CT.dicom_ct_pd
5
+
6
+
7
+ Module Contents
8
+ ---------------
9
+
10
+
11
+ Functions
12
+ ~~~~~~~~~
13
+
14
+ .. autoapisummary::
15
+
16
+ pytomography.io.CT.dicom_ct_pd.get_geometry_info_from_datasets_gen3
17
+ pytomography.io.CT.dicom_ct_pd.get_projections_and_metadata_gen3
18
+
19
+
20
+
21
+ .. py:function:: get_geometry_info_from_datasets_gen3(paths)
22
+
23
+
24
+ .. py:function:: get_projections_and_metadata_gen3(paths)
25
+
26
+
@@ -0,0 +1,15 @@
1
+ :py:mod:`pytomography.io.CT`
2
+ ============================
3
+
4
+ .. py:module:: pytomography.io.CT
5
+
6
+
7
+ Submodules
8
+ ----------
9
+ .. toctree::
10
+ :titlesonly:
11
+ :maxdepth: 1
12
+
13
+ dicom_ct_pd/index.rst
14
+
15
+
@@ -28,6 +28,5 @@ Submodules
28
28
  gate/index.rst
29
29
  petsird/index.rst
30
30
  shared/index.rst
31
- shared copy/index.rst
32
31
 
33
32
 
@@ -1,11 +1,11 @@
1
- :py:mod:`pytomography.io.CT.attenuation_map`
2
- ============================================
1
+ :py:mod:`pytomography.io.SPECT.attenuation_map`
2
+ ===============================================
3
3
 
4
- .. py:module:: pytomography.io.CT.attenuation_map
4
+ .. py:module:: pytomography.io.SPECT.attenuation_map
5
5
 
6
6
  .. autoapi-nested-parse::
7
7
 
8
- This module is used to create attenuation maps from CT images required for SPECT/PET attenuation correction.
8
+ This module is used to create attenuation maps from CT images required for SPECT/PET attenuation correction using cortical bone peaks. For typical radionuclides, the standard table should be used.
9
9
 
10
10
 
11
11
 
@@ -18,13 +18,13 @@ Functions
18
18
 
19
19
  .. autoapisummary::
20
20
 
21
- pytomography.io.CT.attenuation_map.bilinear_transform
22
- pytomography.io.CT.attenuation_map.get_HU_from_spectrum_interp
23
- pytomography.io.CT.attenuation_map.get_HU_mu_curve
24
- pytomography.io.CT.attenuation_map.HU_to_mu
25
- pytomography.io.CT.attenuation_map.get_HU_corticalbone
26
- pytomography.io.CT.attenuation_map.get_ECT_from_corticalbone_HU
27
- pytomography.io.CT.attenuation_map.get_HU2mu_conversion
21
+ pytomography.io.SPECT.attenuation_map.bilinear_transform
22
+ pytomography.io.SPECT.attenuation_map.get_HU_from_spectrum_interp
23
+ pytomography.io.SPECT.attenuation_map.get_HU_mu_curve
24
+ pytomography.io.SPECT.attenuation_map.HU_to_mu
25
+ pytomography.io.SPECT.attenuation_map.get_HU_corticalbone
26
+ pytomography.io.SPECT.attenuation_map.get_ECT_from_corticalbone_HU
27
+ pytomography.io.SPECT.attenuation_map.get_HU2mu_conversion
28
28
 
29
29
 
30
30
 
@@ -33,11 +33,11 @@ Attributes
33
33
 
34
34
  .. autoapisummary::
35
35
 
36
- pytomography.io.CT.attenuation_map.module_path
37
- pytomography.io.CT.attenuation_map.DATADIR
38
- pytomography.io.CT.attenuation_map.FILE_WATER
39
- pytomography.io.CT.attenuation_map.FILE_AIR
40
- pytomography.io.CT.attenuation_map.FILE_CBONE
36
+ pytomography.io.SPECT.attenuation_map.module_path
37
+ pytomography.io.SPECT.attenuation_map.DATADIR
38
+ pytomography.io.SPECT.attenuation_map.FILE_WATER
39
+ pytomography.io.SPECT.attenuation_map.FILE_AIR
40
+ pytomography.io.SPECT.attenuation_map.FILE_CBONE
41
41
 
42
42
 
43
43
  .. py:data:: module_path
@@ -22,10 +22,11 @@ Functions
22
22
  pytomography.io.SPECT.dicom.get_attenuation_map_from_file
23
23
  pytomography.io.SPECT.dicom.get_psfmeta_from_scanner_params
24
24
  pytomography.io.SPECT.dicom.CT_to_mumap
25
+ pytomography.io.SPECT.dicom.bilinear_transform
26
+ pytomography.io.SPECT.dicom.get_HU2mu_conversion
25
27
  pytomography.io.SPECT.dicom.get_attenuation_map_from_CT_slices
26
28
  pytomography.io.SPECT.dicom._get_affine_spect_projections
27
29
  pytomography.io.SPECT.dicom.load_multibed_projections
28
- pytomography.io.SPECT.dicom.load_multibed_projections
29
30
  pytomography.io.SPECT.dicom.stitch_multibed
30
31
  pytomography.io.SPECT.dicom.get_aligned_rtstruct
31
32
  pytomography.io.SPECT.dicom.get_aligned_nifti_mask
@@ -162,7 +163,7 @@ Functions
162
163
  :rtype: SPECTPSFMeta
163
164
 
164
165
 
165
- .. py:function:: CT_to_mumap(CT, files_CT, file_NM, index_peak=0)
166
+ .. py:function:: CT_to_mumap(CT, files_CT, file_NM, index_peak = 0, technique = 'from_table')
166
167
 
167
168
  Converts a CT image to a mu-map given SPECT projection data. The CT data must be aligned with the projection data already; this is a helper function for ``get_attenuation_map_from_CT_slices``.
168
169
 
@@ -174,12 +175,48 @@ Functions
174
175
  :type file_NM: str
175
176
  :param index_peak: Index of EnergyInformationSequence corresponding to the photopeak. Defaults to 0.
176
177
  :type index_peak: int, optional
178
+ :param technique: Technique to convert HU to attenuation coefficients. The default, 'from_table', uses a table of coefficients for bilinear curves obtained for a variety of common radionuclides. The technique 'from_cortical_bone_fit' looks for a cortical bone peak in the scan and uses that to obtain the bilinear coefficients. For phantom scans where the attenuation coefficient is always significantly less than bone, the cortical bone technique will still work, since the first part of the bilinear curve (in the air to water range) does not depend on the cortical bone fit. Alternatively, one can provide an arbitrary function here which takes in a 3D scan with units of HU and converts to mu.
179
+ :type technique: str, optional
177
180
 
178
181
  :returns: Attenuation map in units of 1/cm
179
182
  :rtype: torch.tensor
180
183
 
181
184
 
182
- .. py:function:: get_attenuation_map_from_CT_slices(files_CT, file_NM = None, index_peak = 0, keep_as_HU = False, mode = 'constant', CT_output_shape = None, apply_affine = True)
185
+ .. py:function:: bilinear_transform(HU, a1, a2, b1, b2)
186
+
187
+ Function used to convert between Hounsfield Units at an effective CT energy and linear attenuation coefficient at a given SPECT radionuclide energy. It consists of two distinct linear curves in regions :math:`HU<0` and :math:`HU \geq 0`.
188
+
189
+ :param HU: Hounsfield units at CT energy
190
+ :type HU: float
191
+ :param a1: Fit parameter 1
192
+ :type a1: float
193
+ :param a2: Fit parameter 2
194
+ :type a2: float
195
+ :param b1: Fit parameter 3
196
+ :type b1: float
197
+ :param b2: Fit parameter 4
198
+ :type b2: float
199
+
200
+ :returns: Linear attenuation coefficient at SPECT energy
201
+ :rtype: float
202
+
203
+
204
+ .. py:function:: get_HU2mu_conversion(files_CT, E_SPECT)
205
+
206
+ Obtains the HU to mu conversion function that converts CT data to the required linear attenuation value in units of 1/cm required for attenuation correction in SPECT/PET imaging.
207
+
208
+ :param files_CT: CT data files
209
+ :type files_CT: Sequence[str]
210
+ :param CT_kvp: kVp value for CT scan
211
+ :type CT_kvp: float
212
+ :param E_SPECT: Energy of photopeak in SPECT scan
213
+ :type E_SPECT: float
214
+
215
+ :returns: Conversion function from HU to mu.
216
+ :rtype: function
217
+
218
+
219
+ .. py:function:: get_attenuation_map_from_CT_slices(files_CT, file_NM = None, index_peak = 0, mode = 'constant', HU2mu_technique = 'from_table')
183
220
 
184
221
  Converts a sequence of DICOM CT files (corresponding to a single scan) into a torch.Tensor object usable as an attenuation map in PyTomography.
185
222
 
@@ -189,12 +226,10 @@ Functions
189
226
  :type file_NM: str
190
227
  :param index_peak: Index corresponding to photopeak in projection data. Defaults to 0.
191
228
  :type index_peak: int, optional
192
- :param keep_as_HU: If True, then don't convert to linear attenuation coefficient and keep as Hounsfield units. Defaults to False
193
- :type keep_as_HU: bool
194
- :param CT_output_shape: If not None, then the CT is returned with the desired dimensions. Otherwise, it defaults to the shape in the file_NM data.
195
- :type CT_output_shape: Sequence, optional
196
- :param apply_affine: Whether or not to align CT with NM.
197
- :type apply_affine: bool
229
+ :param mode: Mode for affine transformation interpolation
230
+ :type mode: str
231
+ :param HU2mu_technique: Technique to convert HU to attenuation coefficients. The default, 'from_table', uses a table of coefficients for bilinear curves obtained for a variety of common radionuclides. The technique 'from_cortical_bone_fit' looks for a cortical bone peak in the scan and uses that to obtain the bilinear coefficients. For phantom scans where the attenuation coefficient is always significantly less than bone, the cortical bone technique will still work, since the first part of the bilinear curve (in the air to water range) does not depend on the cortical bone fit. Alternatively, one can provide an arbitrary function here which takes in a 3D scan with units of HU and converts to mu.
232
+ :type HU2mu_technique: str
198
233
 
199
234
  :returns: Tensor of shape [Lx, Ly, Lz] corresponding to attenuation map.
200
235
  :rtype: torch.Tensor
@@ -211,21 +246,6 @@ Functions
211
246
  :rtype: np.array
212
247
 
213
248
 
214
- .. py:function:: load_multibed_projections(files_NM, index_lower = 20, index_upper = 106)
215
-
216
- This function loads projection data from each of the files in files_NM; for locations outside the FOV in each projection, it appends the data from the adjacent projection. The field of view (in z) is specified by ``index_lower`` and ``index_upper``. The default values of 20 and 106 seem to be sufficient for most scanners.
217
-
218
- :param files_NM: Filespaths for each of the projections
219
- :type files_NM: str
220
- :param index_lower: Z-pixel index specifying the lower boundary of the FOV. Defaults to 20.
221
- :type index_lower: int, optional
222
- :param index_upper: Z-pixel index specifying the upper boundary of the FOV. Defaults to 106.
223
- :type index_upper: int, optional
224
-
225
- :returns: Tensor of shape ``[N_bed_positions, N_energy_windows, Ltheta, Lr, Lz]``.
226
- :rtype: torch.Tensor
227
-
228
-
229
249
  .. py:function:: load_multibed_projections(files_NM)
230
250
 
231
251
  This function loads projection data from each of the files in files_NM; for locations outside the FOV in each projection, it appends the data from the adjacent projection (it uses the midway point between the projection overlap).
@@ -15,6 +15,7 @@ Submodules
15
15
  :titlesonly:
16
16
  :maxdepth: 1
17
17
 
18
+ attenuation_map/index.rst
18
19
  dicom/index.rst
19
20
  shared/index.rst
20
21
  simind/index.rst
@@ -77,7 +78,7 @@ Functions
77
78
  :rtype: torch.Tensor
78
79
 
79
80
 
80
- .. py:function:: get_attenuation_map_from_CT_slices(files_CT, file_NM = None, index_peak = 0, keep_as_HU = False, mode = 'constant', CT_output_shape = None, apply_affine = True)
81
+ .. py:function:: get_attenuation_map_from_CT_slices(files_CT, file_NM = None, index_peak = 0, mode = 'constant', HU2mu_technique = 'from_table')
81
82
 
82
83
  Converts a sequence of DICOM CT files (corresponding to a single scan) into a torch.Tensor object usable as an attenuation map in PyTomography.
83
84
 
@@ -87,12 +88,10 @@ Functions
87
88
  :type file_NM: str
88
89
  :param index_peak: Index corresponding to photopeak in projection data. Defaults to 0.
89
90
  :type index_peak: int, optional
90
- :param keep_as_HU: If True, then don't convert to linear attenuation coefficient and keep as Hounsfield units. Defaults to False
91
- :type keep_as_HU: bool
92
- :param CT_output_shape: If not None, then the CT is returned with the desired dimensions. Otherwise, it defaults to the shape in the file_NM data.
93
- :type CT_output_shape: Sequence, optional
94
- :param apply_affine: Whether or not to align CT with NM.
95
- :type apply_affine: bool
91
+ :param mode: Mode for affine transformation interpolation
92
+ :type mode: str
93
+ :param HU2mu_technique: Technique to convert HU to attenuation coefficients. The default, 'from_table', uses a table of coefficients for bilinear curves obtained for a variety of common radionuclides. The technique 'from_cortical_bone_fit' looks for a cortical bone peak in the scan and uses that to obtain the bilinear coefficients. For phantom scans where the attenuation coefficient is always significantly less than bone, the cortical bone technique will still work, since the first part of the bilinear curve (in the air to water range) does not depend on the cortical bone fit. Alternatively, one can provide an arbitrary function here which takes in a 3D scan with units of HU and converts to mu.
94
+ :type HU2mu_technique: str
96
95
 
97
96
  :returns: Tensor of shape [Lx, Ly, Lz] corresponding to attenuation map.
98
97
  :rtype: torch.Tensor
@@ -140,7 +139,7 @@ Functions
140
139
  :rtype: SPECTPSFMeta
141
140
 
142
141
 
143
- .. py:function:: CT_to_mumap(CT, files_CT, file_NM, index_peak=0)
142
+ .. py:function:: CT_to_mumap(CT, files_CT, file_NM, index_peak = 0, technique = 'from_table')
144
143
 
145
144
  Converts a CT image to a mu-map given SPECT projection data. The CT data must be aligned with the projection data already; this is a helper function for ``get_attenuation_map_from_CT_slices``.
146
145
 
@@ -152,6 +151,8 @@ Functions
152
151
  :type file_NM: str
153
152
  :param index_peak: Index of EnergyInformationSequence corresponding to the photopeak. Defaults to 0.
154
153
  :type index_peak: int, optional
154
+ :param technique: Technique to convert HU to attenuation coefficients. The default, 'from_table', uses a table of coefficients for bilinear curves obtained for a variety of common radionuclides. The technique 'from_cortical_bone_fit' looks for a cortical bone peak in the scan and uses that to obtain the bilinear coefficients. For phantom scans where the attenuation coefficient is always significantly less than bone, the cortical bone technique will still work, since the first part of the bilinear curve (in the air to water range) does not depend on the cortical bone fit. Alternatively, one can provide an arbitrary function here which takes in a 3D scan with units of HU and converts to mu.
155
+ :type technique: str, optional
155
156
 
156
157
  :returns: Attenuation map in units of 1/cm
157
158
  :rtype: torch.tensor
@@ -16,6 +16,7 @@ Functions
16
16
  pytomography.io.shared.dicom._get_affine_multifile
17
17
  pytomography.io.shared.dicom.open_multifile
18
18
  pytomography.io.shared.dicom.compute_max_slice_loc_multifile
19
+ pytomography.io.shared.dicom.compute_min_slice_loc_multifile
19
20
  pytomography.io.shared.dicom.compute_slice_thickness_multifile
20
21
  pytomography.io.shared.dicom.align_images_affine
21
22
 
@@ -34,12 +35,14 @@ Functions
34
35
  :rtype: np.array
35
36
 
36
37
 
37
- .. py:function:: open_multifile(files)
38
+ .. py:function:: open_multifile(files, return_object_meta = False)
38
39
 
39
40
  Given a list of seperate DICOM files, opens them up and stacks them together into a single CT image.
40
41
 
41
42
  :param files: List of CT DICOM filepaths corresponding to different z slices of the same scan.
42
43
  :type files: Sequence[str]
44
+ :param return_object_meta: Whether or not to return object metadata corresponding to opened file
45
+ :type return_object_meta: bool
43
46
 
44
47
  :returns: CT scan in units of Hounsfield Units at the effective CT energy.
45
48
  :rtype: np.array
@@ -56,6 +59,17 @@ Functions
56
59
  :rtype: float
57
60
 
58
61
 
62
+ .. py:function:: compute_min_slice_loc_multifile(files)
63
+
64
+ Obtains the minimum z-location from a list of DICOM slice files
65
+
66
+ :param files: List of DICOM filepaths corresponding to different z slices of the same scan.
67
+ :type files: Sequence[str]
68
+
69
+ :returns: Minimum location
70
+ :rtype: float
71
+
72
+
59
73
  .. py:function:: compute_slice_thickness_multifile(files)
60
74
 
61
75
  Compute the slice thickness for files that make up a scan. Though this information is often contained in the DICOM file, it is sometimes inconsistent with the ImagePositionPatient attribute, which gives the true location of the slices.
@@ -83,12 +83,14 @@ Functions
83
83
  :rtype: torch.Tensor[batch_size, Lx, Ly, Lz]
84
84
 
85
85
 
86
- .. py:function:: open_multifile(files)
86
+ .. py:function:: open_multifile(files, return_object_meta = False)
87
87
 
88
88
  Given a list of seperate DICOM files, opens them up and stacks them together into a single CT image.
89
89
 
90
90
  :param files: List of CT DICOM filepaths corresponding to different z slices of the same scan.
91
91
  :type files: Sequence[str]
92
+ :param return_object_meta: Whether or not to return object metadata corresponding to opened file
93
+ :type return_object_meta: bool
92
94
 
93
95
  :returns: CT scan in units of Hounsfield Units at the effective CT energy.
94
96
  :rtype: np.array
@@ -0,0 +1,36 @@
1
+ :py:mod:`pytomography.metadata.CT.ct_conebeam_flatpanel_metadata`
2
+ =================================================================
3
+
4
+ .. py:module:: pytomography.metadata.CT.ct_conebeam_flatpanel_metadata
5
+
6
+
7
+ Module Contents
8
+ ---------------
9
+
10
+ Classes
11
+ ~~~~~~~
12
+
13
+ .. autoapisummary::
14
+
15
+ pytomography.metadata.CT.ct_conebeam_flatpanel_metadata.CTConeBeamFlatPanelProjMeta
16
+
17
+
18
+
19
+
20
+ .. py:class:: CTConeBeamFlatPanelProjMeta(angles, z_locations, detector_radius, beam_radius, shape, dr, COR=None)
21
+
22
+ Bases: :py:obj:`pytomography.metadata.ProjMeta`
23
+
24
+ Parent class for all different types of Projection Space Metadata. Implementation and required parameters will differ significantly between different imaging modalities.
25
+
26
+
27
+ .. py:method:: _get_CORs()
28
+
29
+
30
+ .. py:method:: _get_detector_pixel_s_v(device=None)
31
+
32
+
33
+ .. py:method:: _get_detector_coordinates(idx)
34
+
35
+
36
+
@@ -0,0 +1,38 @@
1
+ :py:mod:`pytomography.metadata.CT.ct_gen3_metadata`
2
+ ===================================================
3
+
4
+ .. py:module:: pytomography.metadata.CT.ct_gen3_metadata
5
+
6
+
7
+ Module Contents
8
+ ---------------
9
+
10
+ Classes
11
+ ~~~~~~~
12
+
13
+ .. autoapisummary::
14
+
15
+ pytomography.metadata.CT.ct_gen3_metadata.CTGen3ProjMeta
16
+
17
+
18
+
19
+
20
+ .. py:class:: CTGen3ProjMeta(source_phis, source_rhos, source_zs, source_phi_offsets, source_rho_offsets, source_z_offsets, detector_centers_col_idx, detector_centers_row_idx, col_det_spacing, row_det_spacing, DSD, shape)
21
+
22
+ Bases: :py:obj:`pytomography.metadata.ProjMeta`
23
+
24
+ Parent class for all different types of Projection Space Metadata. Implementation and required parameters will differ significantly between different imaging modalities.
25
+
26
+
27
+ .. py:method:: get_detector_coordinates(idxs)
28
+
29
+ Obtain detector coordinates and the angles corresponding to idxs
30
+
31
+ :param idxs: Angle indices
32
+ :type idxs: torch.Tensor[int]
33
+
34
+ :returns: Detector coordinates (in XYZ) at all angle indices.
35
+ :rtype: torch.Tensor
36
+
37
+
38
+
@@ -0,0 +1,66 @@
1
+ :py:mod:`pytomography.metadata.CT`
2
+ ==================================
3
+
4
+ .. py:module:: pytomography.metadata.CT
5
+
6
+
7
+ Submodules
8
+ ----------
9
+ .. toctree::
10
+ :titlesonly:
11
+ :maxdepth: 1
12
+
13
+ ct_conebeam_flatpanel_metadata/index.rst
14
+ ct_gen3_metadata/index.rst
15
+
16
+
17
+ Package Contents
18
+ ----------------
19
+
20
+ Classes
21
+ ~~~~~~~
22
+
23
+ .. autoapisummary::
24
+
25
+ pytomography.metadata.CT.CTConeBeamFlatPanelProjMeta
26
+ pytomography.metadata.CT.CTGen3ProjMeta
27
+
28
+
29
+
30
+
31
+ .. py:class:: CTConeBeamFlatPanelProjMeta(angles, z_locations, detector_radius, beam_radius, shape, dr, COR=None)
32
+
33
+ Bases: :py:obj:`pytomography.metadata.ProjMeta`
34
+
35
+ Parent class for all different types of Projection Space Metadata. Implementation and required parameters will differ significantly between different imaging modalities.
36
+
37
+
38
+ .. py:method:: _get_CORs()
39
+
40
+
41
+ .. py:method:: _get_detector_pixel_s_v(device=None)
42
+
43
+
44
+ .. py:method:: _get_detector_coordinates(idx)
45
+
46
+
47
+
48
+ .. py:class:: CTGen3ProjMeta(source_phis, source_rhos, source_zs, source_phi_offsets, source_rho_offsets, source_z_offsets, detector_centers_col_idx, detector_centers_row_idx, col_det_spacing, row_det_spacing, DSD, shape)
49
+
50
+ Bases: :py:obj:`pytomography.metadata.ProjMeta`
51
+
52
+ Parent class for all different types of Projection Space Metadata. Implementation and required parameters will differ significantly between different imaging modalities.
53
+
54
+
55
+ .. py:method:: get_detector_coordinates(idxs)
56
+
57
+ Obtain detector coordinates and the angles corresponding to idxs
58
+
59
+ :param idxs: Angle indices
60
+ :type idxs: torch.Tensor[int]
61
+
62
+ :returns: Detector coordinates (in XYZ) at all angle indices.
63
+ :rtype: torch.Tensor
64
+
65
+
66
+
@@ -15,6 +15,7 @@ Subpackages
15
15
  :titlesonly:
16
16
  :maxdepth: 3
17
17
 
18
+ CT/index.rst
18
19
  PET/index.rst
19
20
  SPECT/index.rst
20
21