# Align dicom series

**URL:** <https://discourse.slicer.org/t/align-dicom-series/5630>\
**Category:** Support\
**Tags:** registration, dicom, python\
**Created:** [February 3, 2019, 5:52pm UTC](https://discourse.slicer.org/t/align-dicom-series/5630 "2019-02-03T17:52:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stweie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stweie/32/4374_2.png) [@Stweie](https://discourse.slicer.org/u/Stweie)\
**Post date:** [February 3, 2019, 5:52pm UTC](https://discourse.slicer.org/t/align-dicom-series/5630/1 "2019-02-03T17:52:44Z")

</div>

Hello Everyone,  
I am fairly new to CT image. I am struggling with coordinate transformation. I have data of the same patient with following details:

Series 1  
‘ImagePositionPatient’,  
[’-205.0966796875’, ‘-384.0966796875’, ‘-1496.5’]  
‘Pixelspacing’,[‘0.806640625’, ‘0.806640625’]  
slice Thickness’ 2mm  
Image Orientation (Patient)[‘1’, ‘0’, ‘0’, ‘0’, ‘1’, ‘0’]

Series 2  
‘ImagePositionPatient’,  
[’-171.650390625’, ‘-356.650390625’, ‘-1099.7’]  
‘Pixelspacing’, [‘0.69921875’, ‘0.69921875’]  
‘slice Thickness’, 2mm  
Image Orientation (Patient)[‘1’, ‘0’, ‘0’, ‘0’, ‘1’, ‘0’]  
In both series slices are of 512\*512 in size

What I want to do is translate coordinates of series 1 to coordinates of series 2 and vice versa. I know this can be done by interpolation. But I want to know what would be the affine transformation matrix to do that job ? I tried to formulate but failed.  
Any code example in python or the formula would be great help.  
Thanks a lot in advance.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 3, 2019, 7:41pm UTC](https://discourse.slicer.org/t/align-dicom-series/5630/2 "2019-02-03T19:41:51Z")

</div>

This page may help in getting started: [https://www.slicer.org/wiki/Coordinate\_systems](https://www.slicer.org/wiki/Coordinate_systems)

---

<div class="post-metadata">

**Author:** ![Stweie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stweie/32/4374_2.png) [@Stweie](https://discourse.slicer.org/u/Stweie)\
**Post date:** [February 3, 2019, 7:45pm UTC](https://discourse.slicer.org/t/align-dicom-series/5630/3 "2019-02-03T19:45:31Z")

</div>

I have already read. Converted nifti to dicom coordinate. But now trying to align one dicom to another dicom series. To do that how can I construct the transformation matrix ?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 4, 2019, 12:11pm UTC](https://discourse.slicer.org/t/align-dicom-series/5630/4 "2019-02-04T12:11:15Z")

</div>

You can compute transformation between physical coordinate system of images by using any of the registration modules, such as:

- intensity-based registration (e.g., General registration (BRAINS) module)
- landmark-based registration (e.g., Fiducial Registration Wizard module in SlicerIGT extension)
- segmentation based registration (Segment Registration module in SegmentRegistration extension)
