Skip to content

WIP: Less empty space in previews

When using the preview mode in Paraview (View->Preview) the widget is locked into sizes that are integral multiples of the target resolution. This has as a result a lot of empty space in the preview window. How about filling this space by scaling the rendered image so that it fills the widget while keeping the aspect ratio same with the target?

For example:

  1. Start paraview with paraview -dr
  2. Create a dataset and pick as preview resolution 1920x1080. This will give you the first image. While the same steps with the new approach with result into the second image.

Due to integer rounding the achieved resolution may not be an integral multiple of the target resolution but it will have (approximately) the same aspect ratio.

To prevent the preview modifications from affecting the resolution of screenshots, we switch to the vtkResizingWindowToImageFilter which resizes the vtkRenderWindow internally (using offscreen buffers).

Depends on qttesting!26 (merged) for testing and vtk/vtk!7014 (merged) for screenshot saving using offscreen buffers.

Edited by Christos Tsolakis

Merge request reports