# Z spacing when saving dicom

**URL:** https://discourse.itk.org/t/z-spacing-when-saving-dicom/7434
**Category:** Algorithms
**Created:** [February 14, 2025, 5:52am UTC](https://discourse.itk.org/t/z-spacing-when-saving-dicom/7434 "2025-02-14T05:52:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ilan](https://discourse.itk.org/letter_avatar_proxy/v4/letter/i/ecae2f/32.png) [@ilan](https://discourse.itk.org/u/ilan)
#### Post date: [February 14, 2025, 5:52am UTC](https://discourse.itk.org/t/z-spacing-when-saving-dicom/7434/1 "2025-02-14T05:52:07Z")

</div>

Hi, I have image with -let’s say 88 frames. The spacing between frames is changing. It may be 0, 0.04, 0.02 etc. I know to save it correctly with pydicom in python code of course. I need help when savings it with itk. How can I save the z spacing vectot?

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [February 14, 2025, 1:27pm UTC](https://discourse.itk.org/t/z-spacing-when-saving-dicom/7434/2 "2025-02-14T13:27:06Z")

</div>

Hello @ilan,

ITK assumes uniform spacing, so will not work well with the setup you are describing. Please [see this discussion](https://discourse.itk.org/t/account-for-non-uniform-spacing/2797/4) for more details and possible workaround using Slicer.
