# Should I resample on z-axis if forcing 2D feature extraction?

**URL:** <https://discourse.slicer.org/t/should-i-resample-on-z-axis-if-forcing-2d-feature-extraction/28295>\
**Category:** Support\
**Created:** [March 10, 2023, 8:19pm UTC](https://discourse.slicer.org/t/should-i-resample-on-z-axis-if-forcing-2d-feature-extraction/28295 "2023-03-10T20:19:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabio.b](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fabio.b/32/18710_2.png) [@fabio.b](https://discourse.slicer.org/u/fabio.b)\
**Post date:** [March 10, 2023, 8:19pm UTC](https://discourse.slicer.org/t/should-i-resample-on-z-axis-if-forcing-2d-feature-extraction/28295/1 "2023-03-10T20:19:17Z")

</div>

Dear all,  
I have a question about a problem I am facing.  
I am currently working on MRI images with a slice thickness which is either 2 mm (in some patients) or 3 mm (in some other patients). And I would like to extract 2D features.  
My question is:

- Should I resample the images on the z-axis in order to get a common thickness? (e.g. specifying “resampledPixelSpacing: [1, 1, 2.5]”).
- Or should I not resample the z-axis? (e.g. specifying “resampledPixelSpacing: [1, 1, 0]”), therefore accepting the fact that the z dimension can differ from patient to patient?

Thank you in advance!  
Fabio

---

<div class="post-metadata">

**Author:** ![fabio.b](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fabio.b/32/18710_2.png) [@fabio.b](https://discourse.slicer.org/u/fabio.b)\
**Post date:** [March 15, 2023, 9:50am UTC](https://discourse.slicer.org/t/should-i-resample-on-z-axis-if-forcing-2d-feature-extraction/28295/2 "2023-03-15T09:50:32Z")

</div>

Hi everyone!  
Is there any idea or suggestion?  
Thank you very very much!!  
Kind regards,  
Fabio
