DataSet Resampling Filters

Recently, we added two new filters to the Visualization Toolkit (VTK) and ParaView. These filters can sample the point and cell data of one dataset on to the points of another dataset. Under VTK, these filters are implemented in vtkResampleWithDataSet and vtkResampleToImage. There are also parallel, distributed versions of these filters called vtkPResampleWithDataSet and vtkPResampleToImage. In ParaView, these filters are called “Resample With Dataset” and “Resample To Image.”

ResampleScreenShot1

The new filters are implemented using Diy2, a block-parallel library. Diy2 provides an abstraction over Message Passing Interface (MPI). It has built-in facilities for complex communication patterns like neighbor exchange and swap-reduce, and commonly used algorithms such as domain decomposition. Diy2 greatly simplifies the process of implementing parallel programs such as dataset resampling filters.

Following is a brief description of the two filters and their usage in ParaView:

Resample With Dataset

This filter takes two inputs: Input and Source, which can be any DataSet or Composite DataSet type. The filter samples the point and cell data of Input on the points of Source. The output DataSet has the same structure as Source, and its point data contains the resampled values from Input.

Resample With Dataset also works in parallel with distributed datasets. The output dataset will have the same distribution as Source.

ResampleWithDataset-small

ParaView displays an example of Resample With Dataset. The left-hand side contains a multiblock tetrahedra mesh (Input). The middle portion of the image shows a multiblock unstructured grid (Source). The outline of Input is also shown in this view. The right-hand side displays the result of applying the filter.

Resample To Image

This filter is a specialization of Resample With Dataset. The filter takes one input and samples its point and cell data onto a uniform grid of points. It is possible to specify the bounds and extents of the uniform grid using the properties panel. By default, the bounds are set to the bounds of the input dataset. The output of the filter is an Image-Data.

ResampleToImageProperties

In the properties panel for Resample To Image, unchecking “Use Input Bounds” allows the output bounds to be set manually.

Some operations can be performed more efficiently on uniform grid datasets. The Resample to Image filter can be used to convert any dataset to Image-Data before performing such operations. For example, Resample To Image can resample an unstructured grid dataset to an Image-Data to efficiently volume-render the data.

ResampleToImageExample-small

The top-left portion shows Input (unstructured grid), and the bottom-left area displays the output Image-Data. The colors represent the distribution of the data among the nodes. The right-hand side illustrates a volume rendering of the resampled data.

Like Resample With Dataset, Resample To Image can accept any type of DataSet or Composite DataSet as input and can work in parallel distributed environments. The output of Resample To Image is distributed evenly among the processes.

Resample With Dataset and Resample To Image replace or supercede existing filters (“Resample With Dataset and “Image Resampling) that had inefficient implementations. Resample To Image is already available in VTK 7.0 and ParaView 5.1. We expect to release Resample With Dataset with VTK 7.1 and ParaView 5.2.

12 Responses to DataSet Resampling Filters

  1. Pingback: Tristan Coulange

    • Pingback: Sujin Philip

      • Pingback: Tristan Coulange

  2. Pingback: Anubhav

    • Pingback: Sujin Philip

  3. Pingback: Lars Bilke

    • Pingback: Sujin Philip

  4. Pingback: Dennis Conklin

    • Pingback: Nicola Paola

  5. Pingback: Alejandro

    • Pingback: Sujin Philip

  6. Pingback: Ali Kadar

Questions or comments are always welcome!

X