# Unsymmetric contour rendered by symmetric data

**URL:** https://discourse.vtk.org/t/unsymmetric-contour-rendered-by-symmetric-data/5848
**Category:** Support
**Created:** [May 23, 2021, 9:02pm UTC](https://discourse.vtk.org/t/unsymmetric-contour-rendered-by-symmetric-data/5848 "2021-05-23T21:02:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kamyar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/a5b964/32.png) [@kamyar](https://discourse.vtk.org/u/kamyar)
#### Post date: [May 23, 2021, 9:02pm UTC](https://discourse.vtk.org/t/unsymmetric-contour-rendered-by-symmetric-data/5848/1 "2021-05-23T21:02:41Z")

</div>

Hi,  
The problem of “Unsymmetric contour rendered by symmetric data” explained in Paraview support on the following links:  
[https://discourse.paraview.org/t/unsymmetric-contour-rendered-by-symmetric-data/4118](https://discourse.paraview.org/t/unsymmetric-contour-rendered-by-symmetric-data/4118)  
[https://discourse.paraview.org/t/inconsistent-rendering-of-point-data-in-hexahedrall-cells/6536](https://discourse.paraview.org/t/inconsistent-rendering-of-point-data-in-hexahedrall-cells/6536)

I have the same problem for representing Displacements and Stresses of FEM analysis which shows asymmetry contour for symmetry structural element that is not acceptable!  
I have unstructured quadratic elements and the linear data interpolation shows wrong data in the middle of the cells.  
Is there any straightforward solution for this issue?

---

<div class="post-metadata">

### Author: ![kamyar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/a5b964/32.png) [@kamyar](https://discourse.vtk.org/u/kamyar)
#### Post date: [July 8, 2021, 5:13pm UTC](https://discourse.vtk.org/t/unsymmetric-contour-rendered-by-symmetric-data/5848/2 "2021-07-08T17:13:56Z")

</div>

One solution is using "resampletoimagefilter "  
[https://vtk.org/doc/nightly/html/classvtkResampleToImage.html](https://vtk.org/doc/nightly/html/classvtkResampleToImage.html)  
[vtkPResampleToImage](https://vtk.org/doc/nightly/html/classvtkPResampleToImage.html) is a filter that resamples the input dataset on a uniform grid. It internally uses [vtkProbeFilter](https://vtk.org/doc/nightly/html/classvtkProbeFilter.html) to do the probing.

The following code works with VTK \> version 7

```auto
            vtkGeometryFilter GeometryFilter = vtkGeometryFilter.New();
            GeometryFilter.SetInputData(uGrid);
            GeometryFilter.Update();

            vtkResampleToImage resampletoimagefilter = vtkResampleToImage.New();
            resampletoimagefilter.SetInputConnection(GeometryFilter.GetOutputPort());
            resampletoimagefilter.SetSamplingDimensions(20, 10, 1);
            resampletoimagefilter.UseInputBoundsOn();
            resampletoimagefilter.Update();

            vtkImageDataGeometryFilter imageDataGeometryFilter = vtkImageDataGeometryFilter.New();
            imageDataGeometryFilter.SetInputConnection(resampletoimagefilter.GetOutputPort());
            imageDataGeometryFilter.Update();

            mapper2.SetInputData(imageDataGeometryFilter.GetOutput());
            mapper2.Update();

```
