# Aligning PET image with CT

**URL:** <https://discourse.slicer.org/t/aligning-pet-image-with-ct/42444>\
**Category:** Support\
**Created:** [April 5, 2025, 2:01pm UTC](https://discourse.slicer.org/t/aligning-pet-image-with-ct/42444 "2025-04-05T14:01:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [April 5, 2025, 2:01pm UTC](https://discourse.slicer.org/t/aligning-pet-image-with-ct/42444/1 "2025-04-05T14:01:37Z")

</div>

Hi everyone,

This may seem like a simple question but I am having trouble understanding how to do it correctly on 3D Slicer.

I have a CT image with the following .mhd file description:

ObjectType = Image  
NDims = 3  
BinaryData = True  
BinaryDataByteOrderMSB = False  
CompressedData = False  
TransformMatrix = 1 0 0 0 1 0 0 0 1  
Offset = 91.654800415039062 140.35000610351562 -140.18800354003906  
CenterOfRotation = 0 0 0  
AnatomicalOrientation = LPI  
ElementSpacing = 2.2100000381469727 2.2100000381469727 2.2100000381469727  
DimSize = 125 122 93  
ElementType = MET\_FLOAT  
ElementDataFile = ct\_pet\_y90.raw

However, on Volume Information on 3D Slicer, a different Image offset and matrix show up:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/b/db2e3d1b19a40032fb4854b315cc4da17d650cd1.png)

I am trying to align this CT image with my obtained reconstruction PET image, which has this image info:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/c/accb13c6efee0213e9e8fb986191042ec8ccc33c.png)

The offset on the .hdr headfile says that it’s zero. However, when opening it on 3D Slicer it shows different values, as you can see.

I tried applying a Linear Transformation, but I still can’t seem to get them aligned correctly. Can someone please help me do this? I would really appreciate any insights.

Thank you!

Greetings,  
Beatriz

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 11, 2025, 12:25pm UTC](https://discourse.slicer.org/t/aligning-pet-image-with-ct/42444/2 "2025-04-11T12:25:37Z")

</div>

Based on the fact that instead of DICOM you use a research file format, I assume that these two images do not come from a PET-CT machine (that ensures that the two images have the same frame of reference), but two different machines. In that case you’ll need to align the two volumes yourself. However, the two modalities are very different, and manual alignment may not be possible without some landmarks.  
Using the sliders in the Transforms module is very inconvenient for this. I suggest using the recently added transform interactions. You can turn it on in the Data module after right-clicking the eye in the row of the volume you want to move:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/b/ab4d78d40b6022ed81ca3c2f70f7e03f1429ea72.png)

(We should really update this section to contain this information: [Registration — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/registration.html#manual-registration))

By the way the different origin is simply due to the LPS-RAS conversion. Read about this [here](https://slicer.readthedocs.io/en/latest/user_guide/coordinate_systems.html).
