# Applying ProbeFIlter to volumetric mesh and generate 3D image

**URL:** https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283
**Category:** ParaView Support
**Created:** [September 7, 2020, 11:22am UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283 "2020-09-07T11:22:37Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 7, 2020, 11:22am UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/1 "2020-09-07T11:22:37Z")

</div>

I have created a volumetric mesh (FEM) using gmsh and exported it as a .vtk file (i.e. unstructuredGrid). This FE model consists of a box with an ellipsoid where ellipsoid is located inside of the box. (Scalar range is 1 to 2)  
Then I loaded it to the ParaView and applied threshold filter to this volumetric mesh as you can see below images.

Now I want to apply probe filter and generate a 3D image (i.e. mhd file) from this volumetric mesh. Can you please elaborate with the steps that I need to follow ?

clipping view for entire volumetric mesh (i.e. including the ellipsoid inside of the box)

 ![clipping_view_for_entire_vlumetric_mesh](https://discourse.paraview.org/uploads/default/original/2X/c/c09002d639f1e860031794df80d305850a3b62de.png)

Clipping view after applying the threshold filter to remove the ellipsoid

 ![clipping_view_after_thresold](https://discourse.paraview.org/uploads/default/original/2X/9/9b0147f992720317254900fe86db13c2099662f6.png)

volumetric box without ellipsoid in it (i.e. changing the threshold filter values)

 ![volumetric_box_without_ellipsoid_inside](https://discourse.paraview.org/uploads/default/original/2X/0/059df9d4ae4057203ef9489a37c996cbfd6826b4.png)

volumetric ellipsoid after applying the threshold filter to remove the outer box

 ![ellipsoid_threshold](https://discourse.paraview.org/uploads/default/original/2X/7/73b5bc42b9c245ef36ec0f6396585e063ac4887a.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 7, 2020, 1:08pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/2 "2020-09-07T13:08:54Z")

</div>

Filters -\> ResampleToImage should do the trick.

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 7, 2020, 2:08pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/3 "2020-09-07T14:08:00Z")

</div>

I just applied ResampleToImage filter **but, unfortunately I have got the below output.**

Is there having any additional steps that I need to follow ?

 ![Image_resample](https://discourse.paraview.org/uploads/default/original/2X/6/64ef03c1dfa283297fc8d08cee68191d8fecf327.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 7, 2020, 3:18pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/4 "2020-09-07T15:18:59Z")

</div>

This is the outline of the image. Use a surface representation to see it.

You can then save as a .mhd file.

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 7, 2020, 3:35pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/5 "2020-09-07T15:35:20Z")

</div>

Thank you very much.

**Now I have another issue. When I clip the output to see the interior after applying the ResampleToImage filter, the ellipsoid region is not in there (see the attached image).**  
**Did I missing something ?**

**Please help me on this matter as well.**  
**Thanks in advance for your time and consideration.**

 ![output_resample_image_clip](https://discourse.paraview.org/uploads/default/original/2X/b/be9a12172a4059fea670ca9c7f08dc4a7ff6246c.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 7, 2020, 3:36pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/6 "2020-09-07T15:36:05Z")

</div>

you have to color witrh a scalar array.

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 7, 2020, 3:47pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/7 "2020-09-07T15:47:08Z")

</div>

But my FE model consists of different scalars as you can see in the earlier attached images.  
**Is there a way to do it with the GUI tool ? If possible can you please specify the steps ?**

---

<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 7, 2020, 3:51pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/8 "2020-09-07T15:51:50Z")

</div>

Please share your data.

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 7, 2020, 4:13pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/9 "2020-09-07T16:13:55Z")

</div>

I have shared it with my google drive since the upload limit exceeds.

> **[example\_vol\_vtk.rar](https://drive.google.com/file/d/17PYwgI9HDsonK0vb3PXVrMF4syzp1g24/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 8, 2020, 10:35am UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/10 "2020-09-08T10:35:07Z")

</div>

Can I ask any possible solution to my issue please ? Thanks in advance for your time and consideration.

---

<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 8, 2020, 12:31pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/11 "2020-09-08T12:31:29Z")

</div>

It’s there. The field is called `CellEntityIds`. It gets changed from cell data to point data because that is the nature of sampling.

 ![2020-09-08_06-28-49](https://discourse.paraview.org/uploads/default/original/2X/6/686acf0b88d39a3a4aa3e4e5c20f47b65e3b63c1.png)

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 8, 2020, 12:38pm UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/12 "2020-09-08T12:38:56Z")

</div>

Thank you very much. I just switched Solid Colour to CellEntityIds in the colouring section after applying the ResampleToImage Filter and now I can see the voxelized ellipsoid inside the box after applying the clipping view.

**One more issue,**

**I just tried to save it as a .mhd file (File-\>Save Data-\>Select Meta Image File Format and then save), but unfortunately, the output file is always empty and only contains the header. Any possible reason to this ?**  
**Please help me on this matter as well.**

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 9, 2020, 9:22am UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/13 "2020-09-09T09:22:19Z")

</div>

I have saved the output as .mhd format, but unfortunately the file is empty. Any reason or did I forget any steps before saving it as .mhd file ?

I herewith attached the generated .mhd file for your further reference.

[resampled\_img\_mhd.zip](https://discourse.paraview.org/uploads/short-url/ArBBvYv6T0Wzcle4D7j0qiuNvnT.zip) (485 Bytes)

---

<div class="post-metadata">

### Author: ![chathu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@chathu](https://discourse.paraview.org/u/chathu)
#### Post date: [September 10, 2020, 10:04am UTC](https://discourse.paraview.org/t/applying-probefilter-to-volumetric-mesh-and-generate-3d-image/5283/14 "2020-09-10T10:04:28Z")

</div>

May I ask for a solution to my problem? Is this functionality not properly working ?

Thank you very much for your time and consideration.
