# Pad volume to match reference image

**URL:** <https://discourse.slicer.org/t/pad-volume-to-match-reference-image/14772>\
**Category:** Support\
**Created:** [November 25, 2020, 7:05pm UTC](https://discourse.slicer.org/t/pad-volume-to-match-reference-image/14772 "2020-11-25T19:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carlp/32/8981_2.png) [@Carlp](https://discourse.slicer.org/u/Carlp)\
**Post date:** [November 25, 2020, 7:05pm UTC](https://discourse.slicer.org/t/pad-volume-to-match-reference-image/14772/1 "2020-11-25T19:05:49Z")

</div>

Operating system: Win10  
Slicer version: 4.11.20200930

Basically, I have a set of abdominal CTs, all of which have a full volume and one that is cropped to a VOI (volume of interest), see below screenshot of compared volumes.

What I want to do is to pad the VOI volume so that it corresponds exactly to the size of the full volume, adding zeros in the superior and inferior of the VOI. I have found how to to this with segmentations, but not with grey-scale volumes. … Is there such a feature in Slicer?

 ![0](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/7/572ba3f8ae38752237fea2741d9ff44be9bc9c55.jpeg)

---

<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:** [November 25, 2020, 7:45pm UTC](https://discourse.slicer.org/t/pad-volume-to-match-reference-image/14772/2 "2020-11-25T19:45:13Z")

</div>

You can resample (including any padding or cropping) an image using one of the image resampling modules. For example, using “Resample Scalar/Vector/DWI Volume”. Choose the full volume as “Reference volume”. You can set background voxel value in Advanced resampling parameters / Default pixel value.

---

<div class="post-metadata">

**Author:** ![Carlp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carlp/32/8981_2.png) [@Carlp](https://discourse.slicer.org/u/Carlp)\
**Post date:** [November 25, 2020, 7:48pm UTC](https://discourse.slicer.org/t/pad-volume-to-match-reference-image/14772/3 "2020-11-25T19:48:45Z")

</div>

It worked straight away. Thank you!
