# Can I specify the value that vtkImageReslice pads output images with (instead of zero)?

**URL:** https://discourse.vtk.org/t/can-i-specify-the-value-that-vtkimagereslice-pads-output-images-with-instead-of-zero/3324
**Category:** Support
**Created:** [May 18, 2020, 2:14pm UTC](https://discourse.vtk.org/t/can-i-specify-the-value-that-vtkimagereslice-pads-output-images-with-instead-of-zero/3324 "2020-05-18T14:14:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MichelleKline](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michellekline/32/2155_2.png) [@MichelleKline](https://discourse.vtk.org/u/MichelleKline)
#### Post date: [May 18, 2020, 2:14pm UTC](https://discourse.vtk.org/t/can-i-specify-the-value-that-vtkimagereslice-pads-output-images-with-instead-of-zero/3324/1 "2020-05-18T14:14:40Z")

</div>

Hello,  
When the vtkImageReslice attribute AutoCropOutput is set to “on”, the output images are either cropped or enlarged by padding. When the output image is padded, vtkImageReslice pads with zeros. Can I control the value that is used for padding? Can I use something other than zeros? Zeros are meaningful values in my output images.  
Thank you,  
Michelle K.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 18, 2020, 3:03pm UTC](https://discourse.vtk.org/t/can-i-specify-the-value-that-vtkimagereslice-pads-output-images-with-instead-of-zero/3324/2 "2020-05-18T15:03:03Z")

</div>

This post should help: [vtkImageReslice "Fills Background" with Zeros. How Can I Change this Behavior?](https://discourse.vtk.org/t/vtkimagereslice-fills-background-with-zeros-how-can-i-change-this-behavior/1882/10)

---

<div class="post-metadata">

### Author: ![MichelleKline](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michellekline/32/2155_2.png) [@MichelleKline](https://discourse.vtk.org/u/MichelleKline)
#### Post date: [May 18, 2020, 3:26pm UTC](https://discourse.vtk.org/t/can-i-specify-the-value-that-vtkimagereslice-pads-output-images-with-instead-of-zero/3324/5 "2020-05-18T15:26:28Z")

</div>

Thank you.

I apologize for not making the obvious connection between my previous question about  
“background filling” of output images and this question about “padding with zeros” of output images. Next time, I will be more thoughtful before posting a new issue.
