vtkConnectivityFilter

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkConnectivityFilter

SM Rolfe
Hello,
I have been using the vtkConnectivityFilter successfully on polydata stored as .vtp files. I just used it on a new file, and instead of getting the correct number of components, the number of regions was equal to the number of cells. Looking at files, I don't see any obvious differences. Any insight on what could cause this type of error would be helpful. 
Thanks,
Sara

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

David Doria-2-3
On Fri, Oct 21, 2016 at 5:36 PM, SM Rolfe <[hidden email]> wrote:
Hello,
I have been using the vtkConnectivityFilter successfully on polydata stored as .vtp files. I just used it on a new file, and instead of getting the correct number of components, the number of regions was equal to the number of cells. Looking at files, I don't see any obvious differences. Any insight on what could cause this type of error would be helpful. 
Thanks,
Sara

My guess is that the cells don't actually share geometry/points. That is, imagine two triangles that share an edge. This should be only 4 points (ABC and BCD, where the shared edge is BC). If instead the data has 6 points (ABC and DEF), even if the coordinates of B are the same as E and the coordinates of C are the same as F, they are not "connected" in a topological sense.

David

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

David Doria-2-3
On Fri, Oct 21, 2016 at 10:42 PM, SM Rolfe <[hidden email]> wrote:
Thanks David, I think you're right. When I try using the vtkDataSetSurfaceFilter or vtkExtractEdges I can get a connected surface, but it changes the original mesh points. Do you have any advice on the best way to correct the connectivity without altering these points? I am guessing I could go through each mesh point, look for repeats and add connectivity, but I'm wondering if there's a more efficient way?

Thanks for your help,
Sara

David

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

SM Rolfe
Hi David,
Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also looks like it's reducing the resolution of the output mesh significantly. If it's only deleting the repeated points, I don't think this should be occurring?
Thanks,
Sara

On Sat, Oct 22, 2016 at 5:36 AM, David Doria <[hidden email]> wrote:
On Fri, Oct 21, 2016 at 10:42 PM, SM Rolfe <[hidden email]> wrote:
Thanks David, I think you're right. When I try using the vtkDataSetSurfaceFilter or vtkExtractEdges I can get a connected surface, but it changes the original mesh points. Do you have any advice on the best way to correct the connectivity without altering these points? I am guessing I could go through each mesh point, look for repeats and add connectivity, but I'm wondering if there's a more efficient way?

Thanks for your help,
Sara

David


_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

David Doria-2-3
On Sat, Oct 22, 2016 at 11:11 AM, SM Rolfe <[hidden email]> wrote:
Hi David,
Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also looks like it's reducing the resolution of the output mesh significantly. If it's only deleting the repeated points, I don't think this should be occurring?
Thanks,
Sara

Sorry, I'm not sure about that. It'd probably help your question if you could produce a small example data set that demonstrates the problem.

David
 

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

Bill Lorensen
CleanPolyData with its default settings should not reduce the
resolution of the mesh.


On Sat, Oct 22, 2016 at 1:03 PM, David Doria <[hidden email]> wrote:

> On Sat, Oct 22, 2016 at 11:11 AM, SM Rolfe <[hidden email]> wrote:
>>
>> Hi David,
>> Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also
>> looks like it's reducing the resolution of the output mesh significantly. If
>> it's only deleting the repeated points, I don't think this should be
>> occurring?
>> Thanks,
>> Sara
>
>
> Sorry, I'm not sure about that. It'd probably help your question if you
> could produce a small example data set that demonstrates the problem.
>
> David
>
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

Cory Quammen-2
In reply to this post by SM Rolfe
Is the resolution really reduced, or does it just look more faceted because surface normals have been lost or modified? Try connecting a vtkPolyDataNormals filter after the vtkCleanPolyDataFilter if that is the case.

HTH,
Cory

On Sat, Oct 22, 2016 at 12:11 PM, SM Rolfe <[hidden email]> wrote:
Hi David,
Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also looks like it's reducing the resolution of the output mesh significantly. If it's only deleting the repeated points, I don't think this should be occurring?
Thanks,
Sara

On Sat, Oct 22, 2016 at 5:36 AM, David Doria <[hidden email]> wrote:
On Fri, Oct 21, 2016 at 10:42 PM, SM Rolfe <[hidden email]> wrote:
Thanks David, I think you're right. When I try using the vtkDataSetSurfaceFilter or vtkExtractEdges I can get a connected surface, but it changes the original mesh points. Do you have any advice on the best way to correct the connectivity without altering these points? I am guessing I could go through each mesh point, look for repeats and add connectivity, but I'm wondering if there's a more efficient way?

Thanks for your help,
Sara

David


_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

David Thompson-2
> Is the resolution really reduced, or does it just look more faceted because surface normals have been lost or modified? Try connecting a vtkPolyDataNormals filter after the vtkCleanPolyDataFilter if that is the case.

I was thinking it might be because the vtkCleanPolyData filter averages point-scalar values used for coloring when it merges coincident vertices. That makes the mesh appear to lose resolution because it has... there are not as many unique points after coincident vertices are merged. Shy of perturbing coincident points and inserting lots of tiny little triangles to fill the gaps, I don't see a way to get around it and be left with a connected mesh.

        David

> On Sat, Oct 22, 2016 at 12:11 PM, SM Rolfe <[hidden email]> wrote:
> Hi David,
> Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also looks like it's reducing the resolution of the output mesh significantly. If it's only deleting the repeated points, I don't think this should be occurring?
> Thanks,
> Sara
>
> On Sat, Oct 22, 2016 at 5:36 AM, David Doria <[hidden email]> wrote:
> On Fri, Oct 21, 2016 at 10:42 PM, SM Rolfe <[hidden email]> wrote:
> Thanks David, I think you're right. When I try using the vtkDataSetSurfaceFilter or vtkExtractEdges I can get a connected surface, but it changes the original mesh points. Do you have any advice on the best way to correct the connectivity without altering these points? I am guessing I could go through each mesh point, look for repeats and add connectivity, but I'm wondering if there's a more efficient way?
>
> Thanks for your help,
> Sara
>
> I think vtkCleanPolyData does that: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CleanPolyData 
>
> David
>
>
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkConnectivityFilter

SM Rolfe
Thanks, I noticed when I viewed the mesh instead of the surface, that the resolution had not actually changed, but as Cory suggested, the rendered surface just appeared more faceted. 

Recalculating the surface normals using vtkPolyDataNormals greatly improved the appearance of the surface. Thanks again for your input.

On Mon, Oct 24, 2016 at 6:57 AM, David Thompson <[hidden email]> wrote:
> Is the resolution really reduced, or does it just look more faceted because surface normals have been lost or modified? Try connecting a vtkPolyDataNormals filter after the vtkCleanPolyDataFilter if that is the case.

I was thinking it might be because the vtkCleanPolyData filter averages point-scalar values used for coloring when it merges coincident vertices. That makes the mesh appear to lose resolution because it has... there are not as many unique points after coincident vertices are merged. Shy of perturbing coincident points and inserting lots of tiny little triangles to fill the gaps, I don't see a way to get around it and be left with a connected mesh.

        David

> On Sat, Oct 22, 2016 at 12:11 PM, SM Rolfe <[hidden email]> wrote:
> Hi David,
> Thanks! The vtkCleanPolyData filter solves the connectivity issue. It also looks like it's reducing the resolution of the output mesh significantly. If it's only deleting the repeated points, I don't think this should be occurring?
> Thanks,
> Sara
>
> On Sat, Oct 22, 2016 at 5:36 AM, David Doria <[hidden email]> wrote:
> On Fri, Oct 21, 2016 at 10:42 PM, SM Rolfe <[hidden email]> wrote:
> Thanks David, I think you're right. When I try using the vtkDataSetSurfaceFilter or vtkExtractEdges I can get a connected surface, but it changes the original mesh points. Do you have any advice on the best way to correct the connectivity without altering these points? I am guessing I could go through each mesh point, look for repeats and add connectivity, but I'm wondering if there's a more efficient way?
>
> Thanks for your help,
> Sara
>
> I think vtkCleanPolyData does that: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CleanPolyData
>
> David
>
>
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers