# dimension images

**URL:** https://discourse.itk.org/t/dimension-images/1890
**Category:** Uncategorized
**Tags:** python, simpleitk
**Created:** [May 17, 2019, 10:27am UTC](https://discourse.itk.org/t/dimension-images/1890 "2019-05-17T10:27:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![safa](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/9fc348/32.png) [@safa](https://discourse.itk.org/u/safa)
#### Post date: [May 17, 2019, 10:27am UTC](https://discourse.itk.org/t/dimension-images/1890/1 "2019-05-17T10:27:17Z")

</div>

![Capture%20du%202019-05-17%2011-30-57](https://discourse.itk.org/uploads/default/original/1X/4adbc03f7baeef321cd63b4cdb6f7c8b8d957981.png)

i can’t upload the segmentation image with the main image any solution please to match the segmentation image with the main image !!!

---

<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: [May 17, 2019, 1:12pm UTC](https://discourse.itk.org/t/dimension-images/1890/2 "2019-05-17T13:12:33Z")

</div>

Hello @safa

The error message in the screenshot clearly identifies the problem:  
Image size - 512x512x216  
Segmentation size - 256x256x256

The sizes are expected to match.

Is this a segmentation you created or was it done by someone else and given to you? Do the two actually occupy the same spatial region (origin, direction cosine matrix, size\*spacing)? If yes, then you can resample the segmentation onto the image and then do the overlay. If not, then you need to identify where was the error introduced.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [May 18, 2019, 3:52pm UTC](https://discourse.itk.org/t/dimension-images/1890/3 "2019-05-18T15:52:20Z")

</div>

You can edit images and segmentations with arbitrary geometry in [3D Slicer](https://www.slicer.org). Resampling is performed internally as needed.
