# Why Resample to Image filter returns empty files?

**URL:** https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190
**Category:** ParaView Support
**Created:** [September 16, 2025, 4:45pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190 "2025-09-16T16:45:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 16, 2025, 4:45pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/1 "2025-09-16T16:45:37Z")

</div>

Hello everyone, I want to save my work as .mhd file, but when I apply Resample to Image to my input, the result is zero. Since the plane that I want to save is thin, I have tried even applying linear extrusion first and then Resample to Image, but again the result is empty. Do you what is the problem?

 ![Screenshot (294)](https://discourse.paraview.org/uploads/default/original/3X/b/6/b6abf99a41f04c1652a6d0b184d50f6f220ada4a.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2025, 4:47pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/2 "2025-09-16T16:47:45Z")

</div>

Use ResampleWithDataSet instead.

---

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 16, 2025, 5:07pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/3 "2025-09-16T17:07:01Z")

</div>

Thanks for your reply. What should I consider as source data array?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2025, 5:18pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/4 "2025-09-16T17:18:22Z")

</div>

the volume containing the data.

---

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 16, 2025, 5:26pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/5 "2025-09-16T17:26:36Z")

</div>

I got error using ResampleWithDataSet!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2025, 5:30pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/6 "2025-09-16T17:30:37Z")

</div>

please share your data

---

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 16, 2025, 5:46pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/7 "2025-09-16T17:46:04Z")

</div>

[test.pvsm](https://discourse.paraview.org/uploads/short-url/nNTMbxayl3zRxQPs206HjRq4E4M.pvsm) (1.0 MB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 17, 2025, 7:06am UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/8 "2025-09-17T07:06:03Z")

</div>

please share your data, not a statefile 🙂

---

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 18, 2025, 11:56am UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/9 "2025-09-18T11:56:30Z")

</div>

My data are heavy I cannot share them. I have found the problem. ResampletoImage only works when the slice is aligned with the 3axis of the reference system. For my workflow, the direction of slice is super important so I cannot do anything about it. Do you any other strategies to apply to save slices as .mhd file?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 18, 2025, 11:58am UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/10 "2025-09-18T11:58:23Z")

</div>

Maybe you want to use the Slice filter then ?

---

<div class="post-metadata">

### Author: ![Paria\_Maleki](https://discourse.paraview.org/user_avatar/discourse.paraview.org/paria_maleki/32/17010_2.png) [@Paria\_Maleki](https://discourse.paraview.org/u/Paria_Maleki)
#### Post date: [September 18, 2025, 11:59am UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/11 "2025-09-18T11:59:57Z")

</div>

I have used slice filter, now I want to save the slice as image(.mhd)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 18, 2025, 12:07pm UTC](https://discourse.paraview.org/t/why-resample-to-image-filter-returns-empty-files/17190/12 "2025-09-18T12:07:38Z")

</div>

This is not a great solution, but if you know the orientation of the plane you want to resample on, perhaps you could use the `Transform` filter to rotate the data to be parallel with the x-y plane.

If you follow this approach, you will probably need to do the linear extrusion you mentioned earlier.
