# Resample to Image returns an empty field

**URL:** https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347
**Category:** ParaView Support
**Created:** [November 26, 2023, 6:15pm UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347 "2023-11-26T18:15:07Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 26, 2023, 6:15pm UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/1 "2023-11-26T18:15:07Z")

</div>

Hello, I am trying to resample the FE stress data in the attachment to a structured regular grid using Resample to Image. However, when I do this, only outline and gaussianpoints are returned. I cannot plot the surface and no points are visible.

I am very confused as when I did this resample to image operation to a different 3D model it worked?

Any help would be appreciated

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 26, 2023, 6:25pm UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/2 "2023-11-26T18:25:07Z")

</div>

[https://drive.google.com/file/d/1hSdU8BMtZGCZ0nyPYw4ltI8GElkQow7D/view?usp=drive\_link](https://drive.google.com/file/d/1hSdU8BMtZGCZ0nyPYw4ltI8GElkQow7D/view?usp=drive_link)

Attached is model

---

<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: [November 27, 2023, 8:22am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/3 "2023-11-27T08:22:40Z")

</div>

Please provide access to the file

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 8:38am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/4 "2023-11-27T08:38:37Z")

</div>

Just given you access now! Let me know if any issues. Thanks.

---

<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: [November 27, 2023, 9:09am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/5 "2023-11-27T09:09:50Z")

</div>

RessampleToImage is not intended to work on 2D data.

You can use ExtractSurface and LinearExtrusion to have result looking like this:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/3/3b78fc321fa5fdac6cbfded6289f924f10c0fa4f.png)

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 9:24am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/6 "2023-11-27T09:24:55Z")

</div>

I used ExtractSurface and LinearExtrusion to achieve the same 3D result, but when I apply resample to image to this it still does not give me the resampled surface?

---

<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: [November 27, 2023, 9:35am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/7 "2023-11-27T09:35:09Z")

</div>

Indeed, this is definitely not trivial to do but it should be, here is how to do it.

- Open your file, apply
- Filters → Transfrom → Scale X and Y by 100
- Sources → Wavelet → 0 2000, 0 2000, 0 0, Apply
- Click on transform
- Filters → ResampleWithData, Select wavelet as Destination mesh, Apply

 ![image](https://discourse.paraview.org/uploads/default/original/2X/9/996c889aa7b22b7c327f3189661c36bad5b93976.png)

This should be supported out of the box by the ResampleToImage filter, feel free to open an issue:

[https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 9:46am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/8 "2023-11-27T09:46:45Z")

</div>

Firstly I’m amazed by how fast you solve these issues.

However, I’m having trouble with the fourth step ‘click on transform’ this is where i get to [see image]. Also with regards to setting a resolution for the sampling, with this new method, how would i change from a resolution of 100x100 to say 50x50. I agree I might open an issue later on.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/7/76a3b4614959a0427c3026060de76bbcadb1b94e.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: [November 27, 2023, 9:48am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/9 "2023-11-27T09:48:18Z")

</div>

> [@OIOIOI](#):
>
> fourth step ‘click on transform’ this is where i get to

Top-left, in the Pipeline Browser, Click on the “Transform” filter to make it the active source.

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 9:59am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/10 "2023-11-27T09:59:46Z")

</div>

Ok so I get to this [see image], but the image does not look like it has a structured grid like it did in your screenshot?

Also if the transform is the source and the destination for the resample to dataset, what is the point of the wavelet? I don’t think I understand the intuition behind how your sequence of operations works essentially.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/5/5ba840094e3607cb7d1e7b66b18361ec5ec056a9.jpeg)

---

<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: [November 27, 2023, 10:01am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/11 "2023-11-27T10:01:53Z")

</div>

This is wrong, you did not pick the destination mesh as instructed, see my pipeline browser:

![a](https://discourse.paraview.org/uploads/default/original/2X/6/676f21ab4042fd8343491250321c8bfaf64a7299.png)

Please note I edited my post above.

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 10:18am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/12 "2023-11-27T10:18:23Z")

</div>

When I follow your instructions i reached the erroneous pipeline, as both the source and destination are transform.  
When I choose transform as the source and wavelet as the destination I achieve this pipeline youve just shared, which I think is the correct result?

---

<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: [November 27, 2023, 10:30am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/13 "2023-11-27T10:30:59Z")

</div>

> [@OIOIOI](#):
>
> When I choose transform as the source and wavelet as the destination I achieve this pipeline youve just shared

Correct, it was an error on my side.

---

<div class="post-metadata">

### Author: ![OIOIOI](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/54ee81/32.png) [@OIOIOI](https://discourse.paraview.org/u/OIOIOI)
#### Post date: [November 27, 2023, 10:32am UTC](https://discourse.paraview.org/t/resample-to-image-returns-an-empty-field/13347/14 "2023-11-27T10:32:46Z")

</div>

Thank you for your help!
