<div dir="ltr">// vtkCellDataToPointData is a filter that transforms cell data (i.e., data<br>// specified per cell) into point data (i.e., data specified at cell<br>// points). The method of transformation is based on averaging the data<br>
// values of all cells using a particular point. Optionally, the input cell<br>// data can be passed through to the output as well<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 12, 2013 at 8:33 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Marc,<div><br></div><div>I'm pretty sure is works with PointData and not CellData.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Bill</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 12, 2013 at 7:08 AM, Marc Huber <span dir="ltr"><<a href="mailto:marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>This is exactly what I want thanks!<br>
<br>
It just doesnt take my scalar values to build regions<br>
<br>
i have scalar values like e.g.<br>
<table style="border-collapse:collapse;width:60pt" border="0" cellpadding="0" cellspacing="0" width="80">
<colgroup><col style="width:60pt" width="80"> </colgroup><tbody>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt;width:60pt" align="right" height="20" width="80">3548</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3548</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3549</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3550</td>
</tr>
<tr style="min-height:15.0pt" height="20">
<td style="min-height:15.0pt" align="right" height="20">3550</td>
</tr>
</tbody>
</table>
<br>
for each value I want to create regions if there is a connection<br>
my problem is, that I just get 1 big region, but depending on my
values i should get about 100 regions<br>
<br>
My Code:<br>
<br>
polydata->GetCellData()->SetScalars(arr); //arr contains
my scalars for each cell (Type: vtkFloatArray)<br>
vtkSmartPointer<vtkPolyDataConnectivityFilter> regionFilter
= vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();<br>
regionFilter->SetInputConnection(polydata->GetProducerPort());<br>
regionFilter->ScalarConnectivityOn(); <br>
regionFilter->SetFullScalarConnectivity(1);<br>
regionFilter->SetScalarRange(1,9090);<br>
regionFilter->SetExtractionModeToAllRegions(); <br>
regionFilter->SetColorRegions(1);<br>
regionFilter->Update();<br>
vtkSmartPointer<vtkPolyDataMapper> conMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();<br>
conMapper->SetInputConnection(regionFilter->GetOutputPort());<br>
conMapper->Update();<br>
stlActor->SetMapper(conMapper);<br>
<br>
RenderData(stlActor); //my function for rendering<br>
<br>
<br>
<br>
Am 11.04.2013 18:07, schrieb Bill Lorensen:<br>
</div><div><div>
<blockquote type="cite">
<div dir="ltr">There is a "region growing" filter in VTK.
<div>
<div>// .NAME vtkPolyDataConnectivityFilter - extract
polygonal data based on geomet\</div>
<div>ric connectivity
</div>
<div>// .SECTION Description
</div>
<div>// vtkPolyDataConnectivityFilter is a filter that
extracts cells that </div>
<div>// share common points and/or satisfy a scalar threshold
</div>
<div>// criterion. (Such a group of cells is called a region.)
The filter </div>
<div>// works in one of six ways: 1) extract the largest (most
points) connected reg\</div>
<div>ion
</div>
<div>// in the dataset; 2) extract specified region numbers;
3) extract all </div>
<div>// regions sharing specified point ids; 4) extract all
regions sharing </div>
<div>// specified cell ids; 5) extract the region closest to
the specified </div>
<div>// point; or 6) extract all regions (used to color
regions). </div>
<div>// </div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Thu, Apr 11, 2013 at 11:13 AM, Marc Huber <span dir="ltr"><<a href="mailto:marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>i want to divide objects into polygons (regions)
which point in a very similiar direction.<br>
<br>
I have computed normal vectors for the points of the
object.<br>
now i want to extend a method of image processing to 3D.<br>
in an image i'm growing regions with similar color
values starting from different seed points.<br>
this i want to apply in a changed way to the 3D space<br>
my normal vectors are my "color values" and I want to
iterate through the 3D space to grow regions.<br>
<br>
if i have no regular spacing between the points i might
get problems<br>
<br>
<br>
<br>
Am 11.04.2013 16:44, schrieb Bill Lorensen:<br>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">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.
<div><br>
</div>
<div>Are you trying to compute something? Maybe if
we know what the final problem is we can provide
some ideas.</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Apr 11, 2013 at
8:54 AM, Marc Huber <span dir="ltr"><<a href="mailto:marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-family:Verdana;font-size:12.0px">
<div>unfortunatelly not. I need it and
hoped that vtk is able to do this.</div>
<div>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.</div>
<div> </div>
<div>thanks for your help<br>
</div>
<div>Best regards<br>
Marc</div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0 10px 10px;border-left:2px solid #c3d9e5;word-wrap:break-word">
<div style="margin:0 0 10px 0"><b>Gesendet:</b> Donnerstag,
11. April 2013 um 14:45 Uhr
<div><br>
<b>Von:</b> "Bill Lorensen" <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>><br>
<b>An:</b> "Marc Huber" <<a href="mailto:marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>><br>
<b>Cc:</b> "VTK Users" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
</div>
<b>Betreff:</b> Re: Re: [vtkusers]
TIN to regular mesh</div>
<div>
<div>
<div name="quoted-content">
<div>I don't know of a vtk
filter that does this.
<div> </div>
<div>Do you have a reference
for an algorithm that does
this?</div>
<div> </div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On
Thu, Apr 11, 2013 at 8:43
AM, Marc Huber <span><<a href="http://marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1.0px rgb(204,204,204) solid;padding-left:1.0ex">
<div>
<div style="font-family:Verdana;font-size:12.0px">
<div> </div>
<div>Sorry for
leaving so much
unclear.</div>
<div>I have closed
volumes e.g. a CAD
model of a pipe<br>
</div>
<div>Best regards<br>
Marc Huber</div>
<div>
<div>
<div style="margin:10.0px 5.0px 5.0px 10.0px;padding:10.0px 0 10.0px 10.0px;border-left:2.0px solid rgb(195,217,229)">
<div style="margin:0 0 10.0px 0"><b>Gesendet:</b> Donnerstag,
11. April 2013
um 14:22 Uhr<br>
<b>Von:</b> "Bill
Lorensen" <<a href="http://bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>><br>
<b>An:</b> "Marc
Huber" <<a href="http://marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>><br>
<b>Cc:</b> "VTK
Users" <<a href="http://vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
<b>Betreff:</b> Re:
[vtkusers] TIN
to regular
mesh</div>
<div>
<div>
<div>
<div>What
source of
object is
being modeled?
Is it a closed
volume? An
elevation map?</div>
<div class="gmail_extra">
<div class="gmail_quote">On
Thu, Apr 11,
2013 at 2:09
AM, Marc Huber
<span><<a href="http://marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1.0px rgb(204,204,204) solid;padding-left:1.0ex">
<div>
<div>I need a
quad mesh
where the
point distance
in x and y
direction is
always the
same.<br>
<div>Best
regards</div>
<div>Marc</div>
<div> </div>
</div>
<div><br>
Am 10.04.2013
um 21:52
schrieb Bill
Lorensen <<a href="http://bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>>:<br>
</div>
<div>
<div>
<blockquote>
<div>
<div>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.<br>
<br>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On
Wed, Apr 10,
2013 at 11:50
AM, Marc Huber
<span><<a href="http://marchuber.hft@gmx.de" target="_blank">marchuber.hft@gmx.de</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1.0px rgb(204,204,204) solid;padding-left:1.0ex">
<div>
<div style="font-family:Verdana;font-size:12.0px">
<div>
<div>Hi,</div>
<div> </div>
<div>I have a
CAD model,
which is
triangulated.
What I'd like
to do is to
create a
regular mesh
of it.</div>
<div>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.</div>
<div>Has maybe
somebody some
example code
for this? (if
c++, tcl,
python,...
doesn't
matter)</div>
<div> </div>
<div>I'd be
very thankful
if anybody
could help me.</div>
<div> </div>
</div>
<div>Best
regards<br>
<span><font color="#888888">Marc</font></span></div>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other
Kitware
open-source
projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep
messages
on-topic and
check the VTK
FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this
link to
subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
--<br>
Unpaid intern
in
BillsBasement
at noware dot
com</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
--<br>
Unpaid intern
in
BillsBasement
at noware dot
com</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
--<br>
Unpaid intern in
BillsBasement at noware dot
com</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Unpaid intern in BillsBasement at noware dot com<br>
</div>
</blockquote>
<br>
<br>
</div>
</div>
<span><font color="#888888">
<pre cols="72">--
Best regards / Mit freundlichen Grüßen
Marc Huber</pre>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Unpaid intern in BillsBasement at noware dot com<br>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Best regards / Mit freundlichen Grüßen
Marc Huber</pre>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>