[vtk-developers] Bug in vtk 6.0 - vtkGenericEnSightReader

Joachim Pouderoux joachim.pouderoux at kitware.com
Mon Jun 22 03:30:46 EDT 2015


Hello,

I am not sure to understand why this would be a bug?
The geometry filter will indeed extract the boundary polygons of the
provided input.
There is no specific guaranty that the filter will shallow copy (ie. pass)
the input points from the input to the output (and its even more true for
structured data that have implicit point set). As far as the output of the
geometry filter contains a point set (vtkPoints) that contains all the
points needed to represent the 'crust', everything is OK.
Take a look at DataSetSurfaceFilter v6.x (internally called bu
CompositeDataGeometryFilter), if the data is unstructured (I guess it is
your case), it will call the vtkUnstructuredGridGeometryFilter. What this
filter does is that it will shallow copy input point set to the output if
the grid does not contains any quadratic cells, otherwise it will create a
new point set and add only points needed for boundary polygon cells.
In VTK 5.8, this all happens in vtkGeometryFilter.cxx instead, and no
support was done for quadratic cells, in all cases the points were pass
from the input to the output.

So if you need to know the number of the input grid, just call
reader->GetOutput()->GetNumberOfPoints(), it will always be safer!

Best,


*Joachim Pouderoux*

*PhD, Technical Expert*
*Kitware SAS <http://www.kitware.fr>*


2015-06-22 5:34 GMT+02:00 madz <madaramh at gmail.com>:

> I have tried to read an EnsightFile in vtk version 6.2 but it seems that I
> was not getting the correct result, so I tested the code in vtk version 6.0
> it gives an erroneous value for the number of points as well;
>
>
>         vtkSmartPointer<vtkGenericEnSightReader> reader  =
> vtkSmartPointer<vtkGenericEnSightReader>::New();
>         reader->SetCaseFileName(name);
>         reader->Update();
>         vtkSmartPointer<vtkCompositeDataGeometryFilter> compositeFilter =
> vtkSmartPointer<vtkCompositeDataGeometryFilter>::New();
>         compositeFilter->SetInputConnection(reader->GetOutputPort());
>         compositeFilter->Update();
>
>         int num  = compositeFilter->GetOutput()->GetNumberOfPoints(); //for
> vs 6.0 and 6.2 this gives 163736 but in vtk 5.8 it gives 1098108
>
> I have tried the same code in vtk version 5.8 and it seems to give the
> correct value, which is almost 7 times as large. I think that the latter
> versions omit the points inside the model and only gives the boundary
> points. What sort of workaround should I use to get the correct results in
> vtk 6.2?
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Bug-in-vtk-6-0-vtkGenericEnSightReader-tp5732470.html
> Sent from the VTK - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150622/f5d8749a/attachment.html>


More information about the vtk-developers mailing list