# Get the same array size after transform

**URL:** <https://discourse.slicer.org/t/get-the-same-array-size-after-transform/30782>\
**Category:** Support\
**Tags:** registration, python, 3d-model\
**Created:** [July 25, 2023, 1:35pm UTC](https://discourse.slicer.org/t/get-the-same-array-size-after-transform/30782 "2023-07-25T13:35:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Mitura](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jakub_mitura/32/8858_2.png) [@Jakub\_Mitura](https://discourse.slicer.org/u/Jakub_Mitura)\
**Post date:** [July 25, 2023, 1:35pm UTC](https://discourse.slicer.org/t/get-the-same-array-size-after-transform/30782/1 "2023-07-25T13:35:03Z")

</div>

Hello, I use Fiducial registration to obtain linear transform. I saved markup points, transform, original 3d images, and transformed 3d image (checked apply transform when saving file).

After applying this transform, images appearing in the slicer are well registered  
However, after I load them by simple itk into python they have different array sizes (one has more slices than the other)

Is there a way to get a uniform size for both images ? - I assume it just requires some padding- but I have no idea how to get the correct padding in this scenario.

thanks for any suggestions !

---

<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:** [July 27, 2023, 5:54pm UTC](https://discourse.slicer.org/t/get-the-same-array-size-after-transform/30782/2 "2023-07-27T17:54:11Z")

</div>

You can specify a reference geometry using another volume to resample with [this module](https://slicer.readthedocs.io/en/latest/user_guide/modules/resamplescalarvectordwivolume.html) before exporting.
