display MHD image as cell not points

I think this might be a very simple question, but I already asked a few colleagues and also searched in the documentation but maybe I’m using the wrong terms… So please bare with me :slightly_smiling_face:

I have some MHD file, which contains CT scans. So each element in the image is actually a single voxel.
But when I open the image in ParaView, I see that each element is converted into a point, which is visible in the information tab, where the image has exactly xyz points.
One colleague suggested there should be some filter which does this but did not recalled how it was called…

Is it possible to load the MHD file in some way that each element in the file is represented as a cell and not a point?

I compiled a short example to show whats the problem:
The attached image has 2x3x4 voxels (cells), but if I load the image into paraview, each voxel is interpreted as a point, hence only 6 cells are shown:


But, I would really like to have the 24 cells show, where each of the cells has the attributes of the points.

File to test:
foobar.mhd (334 Bytes) foobar.raw (48 Bytes)

Is something like that is what you are looking for.

If so, try out the PointGaussian representation.

Okay thanks, this is getting closer. But on larger images, this really messes with the performance. While I can show volume rendering just fine, the point gaussian will freeze Paraview…

Probably the easiest workaround would be to convert the MHD image into format where each voxel is a cell?

And to avoid the XY problem here: I initially tried to threshold an image where I knew that I had over 2900 voxels of value zero. But after thresholding, I could only see 300ish cells.
I figured out, that you can uncheck the “All Scalars” but this does not solve the priblem, as you dont see the voxel where the value is zero…
Here is an example where you see this: There are 6 voxels zero and I want to show them all. I use threshold on the image, but this leads to no shown cells al all. Unchecking “All Scalars” will show 24 cells - which is also misleading.
foobar2.mhd (334 Bytes) foobar2.raw (120 Bytes)

I tried to write an XDMF file for it, but I can not load the values correctly… Somehow I end up with values between -655357 and 655356. But at least I get the cells I want, thats a start.
foobar2.xmf (921 Bytes)

volume rendering just fine, the point gaussian will freeze Paraview

That sounds strange. What are your computer specs ?

Intel® Xeon® CPU E3-1231 v3 @ 3.40GHz
32GB RAM
GeForce GTX 750 Ti

I tried a model with 512x512x192 voxels.

Can you check if that is your RAM, CPU or GPU freezing ParaView ?
you can use htop and nvndia-smi to get this information.

Simply displaying the image is fine. But as soon as I try to rotate the image or change the color scale, GPU goes to 100%, while a single Core on the CPU is loaded. RAM seems to be OK

Btw: I found the potential issue with the XMF file. When using Int16, it seems to load the wrong values? But when I use float32, it works.
So I can have cell based voxel images, by providing a XMF file, under the precondition that the raw data is float.