# When we should resample and resize?

**URL:** <https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378>\
**Category:** Support\
**Tags:** registration\
**Created:** [September 14, 2024, 1:46pm UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378 "2024-09-14T13:46:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajad\_amiri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sajad_amiri/32/78661_2.png) [@sajad\_amiri](https://discourse.slicer.org/u/sajad_amiri)\
**Post date:** [September 14, 2024, 1:46pm UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378/1 "2024-09-14T13:46:54Z")

</div>

I was working with a dataset ([https://www.cancerimagingarchive.net/collection/prostate-mri-us-biopsy/?swpmtx=a4e8067aeba864db9b1451b15a61997c&swpmtxnonce=4475fb572b](https://www.cancerimagingarchive.net/collection/prostate-mri-us-biopsy/?swpmtx=a4e8067aeba864db9b1451b15a61997c&swpmtxnonce=4475fb572b)), and while annotating with both T2 and DWI, the segmentation was accurate in 3D Slicer. However, the sizes of T2 and DWI images differed. How is this possible? Should I resize the images? After resizing, the segmentation appears incorrect!

---

<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:** [September 14, 2024, 3:49pm UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378/2 "2024-09-14T15:49:16Z")

</div>

It is normal that various images are properly aligned in physical space but have completely different geometry (different origin, spacing, axis directions). You don’t need to resample the images, unless you use some software or algorithm that operates in voxel space, i.e., ignores image origin, spacing, axis directions.

---

<div class="post-metadata">

**Author:** ![sajad\_amiri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sajad_amiri/32/78661_2.png) [@sajad\_amiri](https://discourse.slicer.org/u/sajad_amiri)\
**Post date:** [September 14, 2024, 4:13pm UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378/3 "2024-09-14T16:13:34Z")

</div>

I’ve used the code of pyradiomics. Is it okay ? (Like pyradiomic extension )

---

<div class="post-metadata">

**Author:** ![sajad\_amiri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sajad_amiri/32/78661_2.png) [@sajad\_amiri](https://discourse.slicer.org/u/sajad_amiri)\
**Post date:** [September 15, 2024, 7:48pm UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378/4 "2024-09-15T19:48:43Z")

</div>

Hello dear @lassoan I’ve used the code of pyradiomics. Is it okay ? (Like pyradiomic extension )

---

<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:** [September 16, 2024, 1:23am UTC](https://discourse.slicer.org/t/when-we-should-resample-and-resize/38378/5 "2024-09-16T01:23:38Z")

</div>

Pyradiomics takes the image geometry into account, so it should not be necessary to resample.
