# SPECT/CT Attenuation Correction

**URL:** <https://pytomography.discourse.group/t/spect-ct-attenuation-correction/49>\
**Category:** General\
**Created:** [July 9, 2024, 3:03pm UTC](https://pytomography.discourse.group/t/spect-ct-attenuation-correction/49 "2024-07-09T15:03:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gh031883](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@gh031883](https://pytomography.discourse.group/u/gh031883)\
**Post date:** [July 9, 2024, 3:03pm UTC](https://pytomography.discourse.group/t/spect-ct-attenuation-correction/49/1 "2024-07-09T15:03:39Z")

</div>

Hi Luke,  
I tried performing attenuation correction (AC) on SPECT images using CT and the Attenuation Map, but the results were not the same. I used pytomography version 3.0.0.

 ![image](https://global.discourse-cdn.com/free1/uploads/pytomography/original/1X/93132e8dc9343559fbbc98b9a50cd50e510c7c88.png)  
I attempted to use the new version, but the Attenuation Map did not save properly.  
 ![photo_5789414820800479528_w](https://global.discourse-cdn.com/free1/uploads/pytomography/original/1X/c51230f2ae651ccff5de46890f4444834edc4aad.jpeg)

Can I use the previous version 3.0.0 for attenuation correction (AC)?

Why are the results of SPECT AC with the CT file and the Attenuation Map different? I used the following code to read the Attenuation Map. I must mention that I saved the Attenuation Map using your save DICOM function.

```
    dicom.save_dcm(
        save_path = save_atm,
        object = attenuation_map,
        file_NM = file_NM,
        recon_name = 'AttenMap')

```

atm=nib.load(f’path/to/file/{pid}.nii.gz’).get\_fdata()  
atm=torch.from\_numpy(atm).to(torch.float32)  
psf\_meta = dicom.get\_psfmeta\_from\_scanner\_params(‘SY-LEHR’, energy\_keV=140.5)  
psf\_transform = SPECTPSFTransform(psf\_meta)  
att\_transform = SPECTAttenuationTransform(atm)  
att\_transform.configure(object\_meta, proj\_meta)  
attenuation\_map = att\_transform.attenuation\_map

Best regards,  
Ghasem

---

<div class="post-metadata">

**Author:** ![lukepolson](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@lukepolson](https://pytomography.discourse.group/u/lukepolson)\
**Post date:** [July 16, 2024, 5:19am UTC](https://pytomography.discourse.group/t/spect-ct-attenuation-correction/49/2 "2024-07-16T05:19:04Z")

</div>

Hi Ghasem, this is very strange; is it possible to share those files so I could take a look?

---

<div class="post-metadata">

**Author:** ![gh031883](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@gh031883](https://pytomography.discourse.group/u/gh031883)\
**Post date:** [July 16, 2024, 7:15am UTC](https://pytomography.discourse.group/t/spect-ct-attenuation-correction/49/3 "2024-07-16T07:15:40Z")

</div>

Thank you so much,  
I will send you the images via email.
