[vtkusers] TIN to regular mesh

Marc Huber marchuber.hft at gmx.de
Mon Apr 15 04:16:07 EDT 2013


working with PointData worked finally. This was actually what I wanted.
Thank you very much for your help


Am 13.04.2013 20:34, schrieb Bill Lorensen:
> // vtkCellDataToPointData is a filter that transforms cell data (i.e., 
> data
> // specified per cell) into point data (i.e., data specified at cell
> // points). The method of transformation is based on averaging the data
> // values of all cells using a particular point. Optionally, the input 
> cell
> // data can be passed through to the output as well
>
>
>
> On Fri, Apr 12, 2013 at 8:33 AM, Bill Lorensen 
> <bill.lorensen at gmail.com <mailto:bill.lorensen at gmail.com>> wrote:
>
>     Marc,
>
>     I'm pretty sure is works with PointData and not CellData.
>
>     Bill
>
>
>     On Fri, Apr 12, 2013 at 7:08 AM, Marc Huber <marchuber.hft at gmx.de
>     <mailto:marchuber.hft at gmx.de>> wrote:
>
>         This is exactly what I want thanks!
>
>         It just doesnt take my scalar values to build regions
>
>         i have scalar values like e.g.
>         3548
>         3548
>         3549
>         3549
>         3549
>         3549
>         3549
>         3549
>         3550
>         3550
>
>
>         for each value I want to create regions if there is a connection
>         my problem is, that I just get 1 big region, but depending on
>         my values i should get about 100 regions
>
>         My Code:
>
>         polydata->GetCellData()->SetScalars(arr); //arr contains my
>         scalars for each cell (Type: vtkFloatArray)
>         vtkSmartPointer<vtkPolyDataConnectivityFilter> regionFilter =
>         vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
>         regionFilter->SetInputConnection(polydata->GetProducerPort());
>         regionFilter->ScalarConnectivityOn();
>         regionFilter->SetFullScalarConnectivity(1);
>         regionFilter->SetScalarRange(1,9090);
>         regionFilter->SetExtractionModeToAllRegions();
>                 regionFilter->SetColorRegions(1);
>                 regionFilter->Update();
>         vtkSmartPointer<vtkPolyDataMapper> conMapper =
>         vtkSmartPointer<vtkPolyDataMapper>::New();
>         conMapper->SetInputConnection(regionFilter->GetOutputPort());
>                 conMapper->Update();
>         stlActor->SetMapper(conMapper);
>
>         RenderData(stlActor); //my function for rendering
>
>
>
>         Am 11.04.2013 18:07, schrieb Bill Lorensen:
>>         There is a "region growing" filter in VTK.
>>         // .NAME vtkPolyDataConnectivityFilter - extract polygonal
>>         data based on geomet\
>>         ric connectivity
>>         // .SECTION Description
>>         // vtkPolyDataConnectivityFilter is a filter that extracts
>>         cells that
>>         // share common points and/or satisfy a scalar threshold
>>         // criterion. (Such a group of cells is called a region.) The
>>         filter
>>         // works in one of six ways: 1) extract the largest (most
>>         points) connected reg\
>>         ion
>>         // in the dataset; 2) extract specified region numbers; 3)
>>         extract all
>>         // regions sharing specified point ids; 4) extract all
>>         regions sharing
>>         // specified cell ids; 5) extract the region closest to the
>>         specified
>>         // point; or 6) extract all regions (used to color regions).
>>         //
>>
>>
>>
>>
>>         On Thu, Apr 11, 2013 at 11:13 AM, Marc Huber
>>         <marchuber.hft at gmx.de <mailto:marchuber.hft at gmx.de>> wrote:
>>
>>             i want to divide objects into polygons (regions) which
>>             point in a very similiar direction.
>>
>>             I have computed normal vectors for the points of the object.
>>             now i want to extend a method of image processing to 3D.
>>             in an image i'm growing regions with similar color values
>>             starting from different seed points.
>>             this i want to apply in a changed way to the 3D space
>>             my normal vectors are my "color values" and I want to
>>             iterate through the 3D space to grow regions.
>>
>>             if i have no regular spacing between the points i might
>>             get problems
>>
>>
>>
>>             Am 11.04.2013 16:44, schrieb Bill Lorensen:
>>>             You could create a volume of distances to the triangles.
>>>             The distance field will have regular spacing in x,y,z
>>>             but the x,y,z value will be distance to the surface.
>>>
>>>             Are you trying to compute something? Maybe if we know
>>>             what the final problem is we can provide some ideas.
>>>
>>>
>>>
>>>             On Thu, Apr 11, 2013 at 8:54 AM, Marc Huber
>>>             <marchuber.hft at gmx.de <mailto:marchuber.hft at gmx.de>> wrote:
>>>
>>>                 unfortunatelly not. I need it and hoped that vtk is
>>>                 able to do this.
>>>                 I have to iterate through point clouds with a
>>>                 regular spacing like iterating through pixels of an
>>>                 image. So in fact I don't even need te
>>>                 visualization, just the point cloud extracted from
>>>                 the visualization.
>>>                 thanks for your help
>>>                 Best regards
>>>                 Marc
>>>                 *Gesendet:* Donnerstag, 11. April 2013 um 14:45 Uhr
>>>
>>>                 *Von:* "Bill Lorensen" <bill.lorensen at gmail.com
>>>                 <mailto:bill.lorensen at gmail.com>>
>>>                 *An:* "Marc Huber" <marchuber.hft at gmx.de
>>>                 <mailto:marchuber.hft at gmx.de>>
>>>                 *Cc:* "VTK Users" <vtkusers at vtk.org
>>>                 <mailto:vtkusers at vtk.org>>
>>>                 *Betreff:* Re: Re: [vtkusers] TIN to regular mesh
>>>                 I don't know of a vtk filter that does this.
>>>                 Do you have a reference for an algorithm that does this?
>>>                 On Thu, Apr 11, 2013 at 8:43 AM, Marc Huber
>>>                 <marchuber.hft at gmx.de <http://marchuber.hft@gmx.de>>
>>>                 wrote:
>>>
>>>                     Sorry for leaving so much unclear.
>>>                     I have closed volumes e.g. a CAD model of a pipe
>>>                     Best regards
>>>                     Marc Huber
>>>                     *Gesendet:* Donnerstag, 11. April 2013 um 14:22 Uhr
>>>                     *Von:* "Bill Lorensen" <bill.lorensen at gmail.com
>>>                     <http://bill.lorensen@gmail.com>>
>>>                     *An:* "Marc Huber" <marchuber.hft at gmx.de
>>>                     <http://marchuber.hft@gmx.de>>
>>>                     *Cc:* "VTK Users" <vtkusers at vtk.org
>>>                     <http://vtkusers@vtk.org>>
>>>                     *Betreff:* Re: [vtkusers] TIN to regular mesh
>>>                     What source of object is being modeled? Is it a
>>>                     closed volume? An elevation map?
>>>                     On Thu, Apr 11, 2013 at 2:09 AM, Marc Huber
>>>                     <marchuber.hft at gmx.de
>>>                     <http://marchuber.hft@gmx.de>> wrote:
>>>
>>>                         I need a quad mesh where the point distance
>>>                         in x and y direction is always the same.
>>>                         Best regards
>>>                         Marc
>>>
>>>                         Am 10.04.2013 um 21:52 schrieb Bill Lorensen
>>>                         <bill.lorensen at gmail.com
>>>                         <http://bill.lorensen@gmail.com>>:
>>>
>>>                             What is your definition of "regular
>>>                             mesh"? A regular triangular mesh is one
>>>                             where each element has 3 edges and the
>>>                             valence of each interior point is 6. A
>>>                             regular quad mesh is one where each
>>>                             element has 4 edges and the valens of
>>>                             interior points is 4.
>>>
>>>                             On Wed, Apr 10, 2013 at 11:50 AM, Marc
>>>                             Huber <marchuber.hft at gmx.de
>>>                             <http://marchuber.hft@gmx.de>> wrote:
>>>
>>>                                 Hi,
>>>                                 I have a CAD model, which is
>>>                                 triangulated. What I'd like to do is
>>>                                 to create a regular mesh of it.
>>>                                 I already searched in the archives
>>>                                 and found out that it might help to
>>>                                 use shepard. I awfully don't get it
>>>                                 managed to solve this problem. Maybe
>>>                                 I’m also just searching with the
>>>                                 wrong keywords.
>>>                                 Has maybe somebody some example code
>>>                                 for this? (if c++, tcl, python,...
>>>                                 doesn't matter)
>>>                                 I'd be very thankful if anybody
>>>                                 could help me.
>>>                                 Best regards
>>>                                 Marc
>>>
>>>                                 _______________________________________________
>>>                                 Powered by www.kitware.com
>>>                                 <http://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
>>>
>>>                                 Follow this link to
>>>                                 subscribe/unsubscribe:
>>>                                 http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>>
>>>
>>>                             --
>>>                             Unpaid intern in BillsBasement at noware
>>>                             dot com
>>>
>>>                     --
>>>                     Unpaid intern in BillsBasement at noware dot com
>>>
>>>                 --
>>>                 Unpaid intern in BillsBasement at noware dot com
>>>
>>>
>>>
>>>
>>>             -- 
>>>             Unpaid intern in BillsBasement at noware dot com
>>
>>
>>             -- 
>>             Best regards / Mit freundlichen Grüßen
>>             Marc Huber
>>
>>
>>
>>
>>         -- 
>>         Unpaid intern in BillsBasement at noware dot com
>
>
>         -- 
>         Best regards / Mit freundlichen Grüßen
>         Marc Huber
>
>
>
>
>     -- 
>     Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> -- 
> Unpaid intern in BillsBasement at noware dot com


-- 
Best regards / Mit freundlichen Grüßen
Marc Huber

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130415/030b552a/attachment.htm>


More information about the vtkusers mailing list