marios_geo
(Marios Karaoulis)
December 13, 2023, 9:53am
1
I have a 2d unstructured mesh, that I want to resample to image (pixel based) . If I use the filter resample to image, I get an empty figure (it seems it takes only only triangle?)
I follow the steps mentioned here, Resampling using cell data?
but still, I can’t get an output of this.
Could someone explain how to do this?
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:10am
2
Sadly resampling 2D data is not easy in ParaView, can you give it some depth ?
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:13am
3
Sure, I can follow this
RessampleToImage is not intended to work on 2D data.
You can use ExtractSurface and LinearExtrusion to have result looking like this:
[image]
to get a 3d version of my data.
1 Like
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:14am
4
Then resampling should work
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:16am
5
I still get an empty image
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:17am
7
resistivity.vtk (573.2 KB)
The data shared
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:21am
8
nevermind, ResampleToImage seems to work fine with 2D data!
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:23am
9
For me, it returns an empty figure.
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:25am
10
Change outline representation to surface
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:25am
11
And closing the app and start again, it’s working !
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:29am
12
Something is off. The pixels, do not have a solid color. In other words, I was expecting that each pixel to have one color.
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:29am
13
This is expected with point data. Use Cell Data instead. You can convert using PointDataToCellData filter.
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:32am
14
Sorry, can’t seem to find this filter. I can only seer CellDataToPoint data.
Can you help me out?
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:38am
15
Filters → Alphabetical → PointDataToCellData
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:41am
16
It’s not there for me. I guess it’s because the original vtk is already cell?
mwestphal
(Mathieu Westphal (Kitware))
December 13, 2023, 10:42am
17
Yes, use the filter on the ResampleToImage instead.
1 Like
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:44am
18
Thanks a lot, that worked.
marios_geo
(Marios Karaoulis)
December 13, 2023, 10:55am
19
Follow up:
I have now a 3d volume, which I make slices out of it. Now the same filter, isn’t working the same way. What is the procedure for 3d?
Slice
3D unstructured mesh