# Edit the IJK to RAS Matrix in 3D Slicer

**URL:** <https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129>\
**Category:** Support\
**Tags:** registration, dicom, transforms, nrrd\
**Created:** [March 1, 2023, 10:28pm UTC](https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129 "2023-03-01T22:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elrond11](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/elrond11/32/18421_2.png) [@elrond11](https://discourse.slicer.org/u/elrond11)\
**Post date:** [March 1, 2023, 10:28pm UTC](https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129/1 "2023-03-01T22:28:46Z")

</div>

I am working on registering two nrrd files. I have noticed that one of the images appears flipped in the x and y direction resulting in inaccurate registration results. The two volumes have different IJK to RAS Matrix. One of the images has a diagonal of 1,1,1, and the other has a diagonal of -1,-1,1. I was initially applying a linear transformation but that appears to transform all 3 views of the image rather then just the x and y.

---

<div class="post-metadata">

**Author:** ![JourneyDentalLab](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@JourneyDentalLab](https://discourse.slicer.org/u/JourneyDentalLab)\
**Post date:** [October 12, 2023, 2:29pm UTC](https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129/2 "2023-10-12T14:29:12Z")

</div>

Having the same challenge. Did you ever find a solution?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 12, 2023, 2:32pm UTC](https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129/3 "2023-10-12T14:32:46Z")

</div>

See the information here: [Coordinate systems - Slicer Wiki](https://www.slicer.org/wiki/Coordinate_systems)

---

<div class="post-metadata">

**Author:** ![elrond11](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/elrond11/32/18421_2.png) [@elrond11](https://discourse.slicer.org/u/elrond11)\
**Post date:** [October 12, 2023, 2:47pm UTC](https://discourse.slicer.org/t/edit-the-ijk-to-ras-matrix-in-3d-slicer/28129/4 "2023-10-12T14:47:33Z")

</div>

I ended up reorientating the images in Python by flipping them around the access so they can match up and then loaded them into Slicer. Not the most elegant solution. It was hard too try and register the moving image to the fixed image when the orientation was so different.
