# vtkImageReslice "Fills Background" with Zeros. How Can I Change this Behavior?

**URL:** https://discourse.vtk.org/t/vtkimagereslice-fills-background-with-zeros-how-can-i-change-this-behavior/1882
**Category:** Support
**Created:** [October 7, 2019, 9:29pm UTC](https://discourse.vtk.org/t/vtkimagereslice-fills-background-with-zeros-how-can-i-change-this-behavior/1882 "2019-10-07T21:29:46Z")
**Posts on this page:** 1
**Showing post:** 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: [October 18, 2019, 6:31pm UTC](https://discourse.vtk.org/t/vtkimagereslice-fills-background-with-zeros-how-can-i-change-this-behavior/1882/10 "2019-10-18T18:31:14Z")

</div>

Hi David,

I am so grateful for your assistance with this zero-filled background issue as well as the opacity issue ([Cannot Control Opacity of vtkImageActors](https://discourse.vtk.org/t/cannot-control-opacity-of-vtkimageactors/1943/9)) discussed in another thread.

Using the stencil which can optionally be generated by vtkImageReslice was an absolute break-through for me. Finally, the reformatted image overlay makes sense. With your vtkStack, I was able to control the opacity, and with the stencil I was able to remove all of the background zeros.

 ![image](https://discourse.vtk.org/uploads/default/original/1X/df9180640d61382725de6b90e7effea086872102.jpeg)

I am also grateful for all of the help you provide to other vtk users. There is a lot of information in those posts. I have learned so much from you!

Best wishes,  
Michelle

---

_[View the full topic](https://discourse.vtk.org/t/vtkimagereslice-fills-background-with-zeros-how-can-i-change-this-behavior/1882)._
