<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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" width="80"
border="0" cellpadding="0" cellspacing="0">
<colgroup><col style="width:60pt" width="80"> </colgroup><tbody>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt; width:60pt"
height="20" width="80" align="right">3548</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3548</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3549</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">3550</td>
</tr>
<tr style="height:15.0pt" height="20">
<td class="xl63" style="height:15.0pt" height="20"
align="right">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>
<blockquote
cite="mid:CADZJ4hPZRNVg+5wY2qnjeqzt0_-RnbRH8kght45drzXOjsjqaA@mail.gmail.com"
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
moz-do-not-send="true" 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 class="h5">
<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
moz-do-not-send="true"
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
moz-do-not-send="true"
href="mailto:bill.lorensen@gmail.com"
target="_blank">bill.lorensen@gmail.com</a>><br>
<b>An:</b> "Marc Huber" <<a
moz-do-not-send="true"
href="mailto:marchuber.hft@gmx.de"
target="_blank">marchuber.hft@gmx.de</a>><br>
<b>Cc:</b> "VTK Users" <<a
moz-do-not-send="true"
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
moz-do-not-send="true"
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
moz-do-not-send="true" href="http://bill.lorensen@gmail.com"
target="_blank">bill.lorensen@gmail.com</a>><br>
<b>An:</b> "Marc
Huber" <<a
moz-do-not-send="true" href="http://marchuber.hft@gmx.de"
target="_blank">marchuber.hft@gmx.de</a>><br>
<b>Cc:</b> "VTK
Users" <<a
moz-do-not-send="true" 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
moz-do-not-send="true"
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
moz-do-not-send="true" 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
moz-do-not-send="true"
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
moz-do-not-send="true" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other
Kitware
open-source
projects at <a
moz-do-not-send="true"
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
moz-do-not-send="true"
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
moz-do-not-send="true"
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 class="HOEnZb"><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 class="moz-signature" cols="72">--
Best regards / Mit freundlichen Grüßen
Marc Huber</pre>
</body>
</html>