# Slicer loads wrong image spacing

**URL:** <https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453>\
**Category:** Support\
**Created:** [June 7, 2017, 4:35pm UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453 "2017-06-07T16:35:07Z")\
**Posts on this page:** 5\
**Page:** 2

<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 11, 2019, 6:25pm UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/25 "2019-10-11T18:25:08Z")

</div>

Hi @Juicy - I’m glad it works for you!

The commit message linked below has more of the details. Happy to answer other questions if it’s not clear. It’s a particularly gratifying piece of code because the problem had bothered me for years and finally the nonlinear transform support in Slicer matured to the point that this approach is at least fairly straightforward and I believe it solves the problem the “Right Way”.

When the feature was new we disabled it by default, but for [Slicer5 we plan to turn it on by default](https://www.slicer.org/wiki/Documentation/Labs/Slicer5-roadmap#Acquisition_transform).

> <https://github.com/Slicer/Slicer/commit/b7650af3c27f34fc894bfdd587f2a4c02ba62a8b>

---

<div class="post-metadata">

**Author:** ![evan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evan/32/4953_2.png) [@evan](https://discourse.slicer.org/u/evan)\
**Post date:** [November 4, 2019, 7:11pm UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/26 "2019-11-04T19:11:58Z")

</div>

Hi @pieper.

Would you mind explaining how to properly harden the volume with the transform that results from the _Apply regularization transform_ option?

As previously mentioned the volume resolution is severely degraded after using the _Harden Transform_ function. I followed the link ([resampling documentation](https://www.slicer.org/wiki/Documentation/4.10/Modules/Resampling)) you provided, but could not figure out how to achieve this. Is there a way to do this without degrading resolution?

Thanks

---

<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 4, 2019, 7:32pm UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/27 "2019-11-04T19:32:38Z")

</div>

Harden transform applies the original resolution of the volume to the resampled volume. If the original resolution was low or highly anisotropic then you may see visible degradation. In this case, probably the simplest is to use `Crop volume` module with “Interpolated cropping” and “Isotropic spacing” enabled and with a “Spacing scale” that is low enough to preserve all relevant details but still large enough so that you don’t end up with a huge image (something between 0.2-0.8 should work).

---

<div class="post-metadata">

**Author:** ![evan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evan/32/4953_2.png) [@evan](https://discourse.slicer.org/u/evan)\
**Post date:** [November 12, 2019, 7:48pm UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/28 "2019-11-12T19:48:35Z")

</div>

Thanks for the response! I followed those steps and was able to resample the volume. I am seeking an “automatic” or “one-click” solution to fix this DICOM spacing error as I have a large batch of samples to process with this issue. I see now that it must be manually handled via the Volumes or Crop Volume modules. If I end up programming a simple module to help with this I will reference it here.

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [November 13, 2023, 8:44am UTC](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/29 "2023-11-13T08:44:20Z")

</div>

NOTE: Support for regularization transform hardening in DICOM Scalar plugin has been added. See [link](https://discourse.slicer.org/t/enh-support-regularization-transform-hardening-in-dicom-scalar-plugin/32772).

Although the resamplig [step](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453/27) with Crop Volume for the moment is not applied automatically.

[Previous page](https://discourse.slicer.org/t/slicer-loads-wrong-image-spacing/453.md?page=1)
