Trouble with volume rendering (Paraview User Guide Programmable Source Example)


I am trying to run this example (in link) of reading a 3D image as a programmable source.

Paraview User Guide, Reading Binary 2D Image
However, unlike the example. I am unable to view as a volume render. No volume or slice options in representation section.

I ran the example as is, on the same file. Paraview version 5.8, Fedora 32

Any help appreciated, thanks

Please share your data.

Here, it is.

HeadMRVolume.raw (122.1 KB)

First Make sure to select vtkImageData in output type.
Second, there is a small typo in the exemple, replace this :

assert data.shape[0] == dims[0]*dims[1]*dims[2],
     "dimension mismatch"


assert data.shape[0] == dims[0]*dims[1]*dims[2], "dimension mismatch"

This should fix it.


Thank you for your input and suggesstions. I am not sure how to duplicate this error. But it seems that you have to set the correct output type on first run, any modifications after that don’t seem to work. I have to delete the source and run it again.

However, I now seem to be getting the same problem in Windows however. Sometimes (not sure why), it works right away and paraview automatically sets Outline as the render type and I can find Volume view in the selection. But most times, I only get what you see in the screenshot.

Could, this be some kind of update issue ?, I mean it seems that the rendering is running before the source has loaded the data.