# How to adjust the distorted image?

**URL:** <https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817>\
**Category:** Support\
**Created:** [August 3, 2017, 5:15pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817 "2017-08-03T17:15:34Z")\
**Posts on this page:** 20\
**Page:** 3

<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:** [November 11, 2017, 6:01pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/41 "2017-11-11T18:01:26Z")

</div>

@laura_rodriguez is is possible you could share these files for debugging? Or if you want to debug yourself, you could try loading the data into the DICOM database and then going into advanced mode and looking at the metadata. As you scroll through the slices you can look at the ImagePositionPatient and see how it is changing and compare this to the slice spacing shown for the loaded volume in the Volumes module. You could also change the spacing to find out what value matches the Mimics view. Also you could check the error logs for any diagnostic information.

---

<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:** [November 11, 2017, 6:03pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/42 "2017-11-11T18:03:10Z")

</div>

@doc-xie importing through the DICOM module in the current nightly should autocorrect the gantry tilt if the files are like the examples I have here (the ones I posted earlier in this thread). If neither that nor the manual shear technique are working on other data then I’m not sure what else to suggest…

---

<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:** [November 11, 2017, 7:24pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/43 "2017-11-11T19:24:19Z")

</div>

You can now also filter for tags and copy value of all frames at once. It would help us a lot if you could copy-paste here value of `Image Position Patient` tag for all frames.

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 13, 2017, 3:46pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/44 "2017-11-13T15:46:57Z")

</div>

@pieper it looks to be everything ok in medata about the patient position…

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

See this one too

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/0/e0b5ea2553a02ec068efdf0d14dba55f60dc24c6.png)

You are saying that I can change the paramaters, can you explain me how?

---

<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:** [November 13, 2017, 3:54pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/45 "2017-11-13T15:54:16Z")

</div>

You can view/adjust voxel size in `Volumes` module: `Volume information` section, `Image Spacing` values.

---

<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:** [November 13, 2017, 3:56pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/46 "2017-11-13T15:56:27Z")

</div>

@laura_rodriguez Could you please enter `ImagePositionPatient` into the `Search...` box, click `Copy all files metadata` button (it copies all ImagePositionPatient values to the clipboard), and paste the clipboard content here? We could then double-check that all position values are correct.

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 13, 2017, 5:24pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/47 "2017-11-13T17:24:56Z")

</div>

It does not me allow to send you the complete file because i have to many files…

Can I send you in another way? Thank you

L

---

<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:** [November 13, 2017, 5:32pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/48 "2017-11-13T17:32:58Z")

</div>

If you follow my instructions above (enter filter criteria in search box and click copy all files metadata), field values are copied to the clipboard. Then, you can just paste the clipboard content here. There are no files involved.

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 13, 2017, 5:50pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/49 "2017-11-13T17:50:03Z")

</div>

Neither, this is what the app is telling me:

Body is limited to 36500 characters; you entered 81668.

---

<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:** [November 13, 2017, 5:52pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/50 "2017-11-13T17:52:37Z")

</div>

I see, the info is too long. Then please copy into notepad or word, save the file to dropbox (or onedrive, or google drive) and paste here the link to the file. Thanks!

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 13, 2017, 5:57pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/51 "2017-11-13T17:57:29Z")

</div>

[https://drive.google.com/open?id=1UKJOAO7wYRQ27sQIBuT1oUBALbRB9E0x](https://drive.google.com/open?id=1UKJOAO7wYRQ27sQIBuT1oUBALbRB9E0x)

---

<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:** [November 13, 2017, 6:14pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/52 "2017-11-13T18:14:07Z")

</div>

Thank you. The file shows that distance between all neighbor slices are 0.5mm. What are the 3 Image Spacing values in Volumes module / Volume information section?

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 13, 2017, 6:50pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/53 "2017-11-13T18:50:36Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/2/f2b6c8c84c9a2f7a621314a15e533d3c2b7f0776.png)

---

<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:** [November 13, 2017, 7:04pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/54 "2017-11-13T19:04:03Z")

</div>

Correct values would be 0.35026, 0.35026, 0.5.

@pieper Do you know what could cause seeing 1,1,1 spacing, while the slice position seems to be correct and pixel spacing tag is present?

@laura_rodriguez Could you share the DICOM files and post the link here? (make sure data is anonymized, if belongs to patients)

---

<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:** [November 13, 2017, 7:27pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/55 "2017-11-13T19:27:01Z")

</div>

@lassoan no, I’n not sure why that would be happening but I would like to figure it out. The slice thickness is set to be 1mm, but the spacing is clearly 0.5mm.

@laura_rodriguez it really would help to have a look at the data. If you can’t share it publicly with a link on the forum perhaps you could share it privately with me and @lassoan. Also do you know if this data was processed in any way or did it come straight from a scanner?

---

<div class="post-metadata">

**Author:** ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)\
**Post date:** [November 14, 2017, 7:51am UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/56 "2017-11-14T07:51:36Z")

</div>

Hello,Professor Lassoan!  
How can you get the values(0.35026,0.35026,0.5) basing the Image Spacing(1mm,1mm,1mm) and what should do in the next in order to correct the images?  
Thanks a lot!  
Doc-xie

---

<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:** [November 14, 2017, 3:43pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/57 "2017-11-14T15:43:46Z")

</div>

> [@doc-xie](#):
>
> How can you get the values(0.35026,0.35026,0.5)

0.35026, 0.35026 values come from Pixel Spacing tag (I could see it in the screenshots).

0.5 is computed from values in Image Position Patient tags (slice position difference between neighbor slices).

---

<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:** [November 14, 2017, 3:44pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/58 "2017-11-14T15:44:46Z")

</div>

> [@doc-xie](#):
>
> what should do in the next in order to correct the images?

If you can share the data set then we can make sure that Slicer loads it correctly.

---

<div class="post-metadata">

**Author:** ![laura\_rodriguez](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laura\_rodriguez](https://discourse.slicer.org/u/laura_rodriguez)\
**Post date:** [November 14, 2017, 4:22pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/59 "2017-11-14T16:22:40Z")

</div>

Ok, it is working now, Changing the values, thank you very much for this. I will continue “playing with the software”

I cannot share the data with you through here, because they are highly confidential. sorry. I do not have problems in sharing a partial part. if that can work to you

---

<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:** [November 14, 2017, 4:37pm UTC](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817/60 "2017-11-14T16:37:46Z")

</div>

Getting 3-5 neighbor slices would probably be enough (you can choose frames that are almost empty, as for the testing we only need the DICOM tags).

[Previous page](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817.md?page=2)

[Next page](https://discourse.slicer.org/t/how-to-adjust-the-distorted-image/817.md?page=4)
