Convert a .vtk to a 3D voxel-based image

Hello,
I am a beginner in paraview,

I am trying to convert a .vtk Data file (DATASET POLYDATA) to a 3D voxel-based image having a .raw or .tif format. So I need to voxelise the domain(sample of particles) and to saved the data into a binary file (.raw or .tif) consisting of voxels with a value of either 0 or 255 which represent if the voxel is inside a particle or in a void space.
The .vtk file corresponds to slices of ellipsoid particles taken from a DEM software.
I was searching and I found that it could be possible to do using DataSet Resampling Filters but this function was disabled in my case.
I am using paraview 5.0.1

Thank you for helping me.

Here is an example for the data of a .vtk file of 1 particle with only three slices (to reduce the data):

# vtk DataFile Version 2.0
Sway data processing
ASCII
DATASET POLYDATA
POINTS   18 float
0.0027844392648 0.00563003547056 0.00338288761005
0.0027844392648 0.00563003547056 0.00338288761005
0.0027844392648 0.00563003547056 0.00338288761005
0.0027844392648 0.00563003547056 0.00338288761005
0.0027844392648 0.00563003547056 0.00338288761005
0.0027844392648 0.00563003547056 0.00338288761005
-0.00244453183833 -4.5732163164e-05 0.00509855744152
-0.0055502958195 0.00307391120888 0.00413183342481
-0.00548856609027 0.00336799271205 0.00164995802301
-0.00232107237987 0.000542430843166 0.000134806637937
0.0007846916013 -0.00257721252888 0.00110153065465
0.000722961872072 -0.00287129403205 0.00358340605645
-0.007550043483 -0.00513333679056 0.00185047646941
-0.007550043483 -0.00513333679056 0.00185047646941
-0.007550043483 -0.00513333679056 0.00185047646941
-0.007550043483 -0.00513333679056 0.00185047646941
-0.007550043483 -0.00513333679056 0.00185047646941
-0.007550043483 -0.00513333679056 0.00185047646941
POLYGONS 12 60
4 0 1 7 6 
4 1 2 8 7 
4 2 3 9 8 
4 3 4 10 9 
4 4 5 11 10 
4 5 0 6 11 
4 6 7 13 12 
4 7 8 14 13 
4 8 9 15 14 
4 9 10 16 15 
4 10 11 17 16 
4 11 6 12 17

There is no data to resample, only geometry.

Thank you very much for your reply,
So as I understand it is impossible to transfer this geometry to a 3D voxel-based image using Paraview.
Do you know if there is any free software that can do this job.
Thank you.

It would be possible if you had data arrays on your file, but you do not have any.

It doesn’t make sense to resample a dataset without any data arrays.

Thank you very much for your help!

Is it possible by paraview to take slices and export images accordingly, then I will have my “slices” folder which I could construct into a single .tif using imageJ?
Same way to get “slices” from tomography reconstruction.
If yes I would really appreciate if you give me the main points on how to do that.

Thank you!!

Slice filter should do the trick.

Thanks boss!