Visualizing 2D image as a surface

Hello, I would like to know how to visualize a 2D matrix/array stored in a greyscale image file (e.g. tiff) as a surface in Paraview. This sounds straightforward, but just no tutorial to be found on this topic…Many thanks!

This is fairly straightforward in ParaView:

  • Choose the File -> Open… menu item.
  • Choose the image file you wish to load.
  • Once it is loaded, you should see it in the main RenderView.
  • If you wish to warp the image according to the scalar field in the image, use the Warp Scalar filter.

With these steps, you can load an image like

and produce a height field like

(Image data from https://cartographicperspectives.org/index.php/journal/article/view/cp74-huffman-patterson/html).

4 Likes

Hi Cory, thanks.
I loaded the image as a jpeg file and displayed it as a surface or slice, which looked fine. However, in either case, the option to apply a warp scalar filter is greyed out, so I cannot do anything afterwards than adjusting the colormap. My version of Paraview is 5.4.1.

Ah, your JPEG probably is loading into an RGB image (RGB components are treated as a vector) whereas my example was a grayscale image (treated as a scalar). In Settings or Preferences, you can enable the option Auto Convert Properties. This will make the magnitude of your image available as a scalar, and then you can apply Warp Scalar with that array.

Apologies for restarting an old thread, but I’m trying to repeat Cory’s example above with the world elevation map and can’t manipulate the RenderView in 3D - I can only zoom in and rotate the 2D map, even after applying the WarpScalars filter. It looks like you were able to tilt the camera so you could see the elevation relief detail; I cannot do this. Could you tell me how to do this? Apologies as I am new to PV.

Hi Sam ,

you need to switch the interaction mode from 2D to 3D see below:
Screenshot from 2022-03-27 20-36-10

If you have more questions please create a new post.

1 Like