[Paraview] 3D contour smoothness

Cory Quammen cory.quammen at kitware.com
Fri Oct 10 13:20:35 EDT 2014


Hi Philipp,

I looked into this more, and it turns out it isn't a bug, but a new
feature in ParaView/VTK that lets provides more flexibility in the
numeric type of the point positions. By default, most filters will set
the numeric type of the output points to the numeric type of their
inputs. In the data set you sent me, the points are set to have type
int (specified on line 7), which means that the points in the output
of the Contour filter will be cast to ints. This explains the jagged
appearance of your surfaces.

The change in VTK that brings about this behavior is:

commit f830ef4cd79b1e7c8af2fae6ed1dd02ffa2cd670
Author: Paul Edwards <Paul.Edwards3 at Rolls-Royce.com>
Date:   Thu Jan 10 10:01:47 2013 -0500

    Fixing loss of point-precision in certain filters.

    Certain filters tend to loose point precision and end up
converting double point
    arrays to flot arrays. This patch address the issue for a few
filters using the
    API added to vtkAlgorithm by commit 49d1f124.

    Change-Id: I8740e4e4bfdd9944fbadb45744038e42eff04830

Now, how to fix your problem? If you change the type of points from
int to double in your data file so that it reads

POINTS 6823544 double

instead of

POINTS 6823544 int

all should work as expected.

Please let me know if that doesn't solve the problem for you.

Best regards,
Cory

On Wed, Oct 8, 2014 at 7:47 AM, Cory Quammen <cory.quammen at kitware.com> wrote:
> Philipp,
>
> I apologize, but I haven't had time to look more into this problem.
> I'll have another look soon.
>
> Thanks,
> Cory
>
> On Wed, Oct 8, 2014 at 3:11 AM, Philipp E <pspeachum at gmail.com> wrote:
>> Hi Cory,
>>
>> can you report any updates for this issue?
>>
>> Best regards and thanks for your efforts
>> Philipp
>>
>> On 09/19/2014 07:17 PM, Cory Quammen wrote:
>>> Just a little more info on this. The problem starts with 3.98.
>>>
>>> On Fri, Sep 19, 2014 at 12:08 PM, Philipp E. <pspeachum at gmail.com> wrote:
>>>> Sorry Cory,
>>>>
>>>> you are right. The cell number is the same.
>>>>
>>>> Regards
>>>> Philipp
>>>>
>>>>
>>>> Am 19.09.2014 um 17:46 schrieb Cory Quammen:
>>>>> Philipp,
>>>>>
>>>>> I can confirm what you see with a pre 4.2 version of ParaView.
>>>>> However, the number of produced cells is the same.
>>>>>
>>>>> I will try to track down why this changed.
>>>>>
>>>>> Thanks,
>>>>> Cory
>>>>>
>>>>> On Fri, Sep 19, 2014 at 11:17 AM, Philipp E <pspeachum at gmail.com> wrote:
>>>>>> Hi Cory
>>>>>>
>>>>>> I managed to compress the data set to a fair size and attached it to
>>>>>> this mail. The data set is pressure, contour value is 0.55.
>>>>>>
>>>>>> By looking again at the data (contour -> information), I just found that
>>>>>> the old version (3.14.1) uses 148432 cells , while the the new one
>>>>>> employs 75232 cells. Hope that helps.
>>>>>>
>>>>>> Kind regards
>>>>>> Philipp
>>>>>>
>>>>>> Errata: I meant 4.2.0RC1 in the previous mails.
>>>>>>
>>>>>> On 09/19/2014 04:59 PM, Cory Quammen wrote:
>>>>>>> Phillipp,
>>>>>>>
>>>>>>> Do you have a data set similar to the one you've shown that you can share?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Cory
>>>>>>>
>>>>>>> On Fri, Sep 19, 2014 at 10:48 AM, Philipp E <pspeachum at gmail.com> wrote:
>>>>>>>> Hi Cory,
>>>>>>>>
>>>>>>>> thank you for your fast feedback.
>>>>>>>>
>>>>>>>> a) Compute normal is checked. (Without normals, the contour is
>>>>>>>> completely stepped)
>>>>>>>> b) Contour values are the same.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Philipp
>>>>>>>>
>>>>>>>> On 09/19/2014 04:40 PM, Cory Quammen wrote:
>>>>>>>>> Philipp,
>>>>>>>>>
>>>>>>>>> In the contour filter, is the option "Compute Normals" checked in 4.0 RC1?
>>>>>>>>>
>>>>>>>>> Also, are the contour values the same between the two versions?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Cory
>>>>>>>>>
>>>>>>>>> On Fri, Sep 19, 2014 at 10:25 AM, Philipp E <pspeachum at gmail.com> wrote:
>>>>>>>>>> Hello everyone,
>>>>>>>>>>
>>>>>>>>>> after extensive search I was desperate enough to post on this list:
>>>>>>>>>>
>>>>>>>>>> It appears that the surface smoothing algorithm of the contour filter
>>>>>>>>>> does not work as "aggressive" as in older version (3.14.1 was the last
>>>>>>>>>> one we found to do so). As an example I prepared this two screenshots,
>>>>>>>>>> VTK data are scalars on a structured grid (200x100x100), legacy format.
>>>>>>>>>> (An additional call of the "smooth" filter does not help.)
>>>>>>>>>>
>>>>>>>>>> 3.14.1
>>>>>>>>>> http://s7.directupload.net/images/140919/euadfvko.png
>>>>>>>>>> 4.0.RC1
>>>>>>>>>> http://s14.directupload.net/images/140919/84y689mi.png
>>>>>>>>>>
>>>>>>>>>> Both versions are running with the shipped settings. Since the effect
>>>>>>>>>> could be reproduced on several workstations, we are wondering whether
>>>>>>>>>> there has been an (undocumented?) change in the filter mechanism or some
>>>>>>>>>> option we/setting/data problem we are not aware of.
>>>>>>>>>>
>>>>>>>>>> Kind regards and thanks in advance
>>>>>>>>>> Philipp Engels.
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>>
>>>>>>>>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>
>>>>>>>>>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>>>>>>>>>
>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>> http://public.kitware.com/mailman/listinfo/paraview
>>


More information about the ParaView mailing list