<div dir="ltr">I have an extra question.Both my reader and Delaunay3D filter are subclass from vtkUnstructuredGridAlgorithm.But when I test with 8 vertices of a cube,my reader renders a hollow cube.But why can Delaunay3D filter render a solid cube?I have checked the Delaunay3D source file,but can not find the answer.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/29 Karl König <span dir="ltr"><<a href="mailto:kkoenig11@web.de" target="_blank">kkoenig11@web.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
庞庆æº,<br>
<br>
I found some spare time to look into this.<br>
<br>
The test data set you provided defines a point cloud with spherical<br>
topology. Your reader does import this geometric information (as<br>
points), but provides no topology. In order for VTK and hence ParaView<br>
to display anything, some kind of topology is needed. The simplest being<br>
vertices as 0D topology, i.e. a dot per point. The patch attached does<br>
exactly add that. With this, you can already see something in ParaView<br>
when using your reader plugin to import the test data set.<br>
<br>
You've been trying to triangulate your point cloud with spherical<br>
topology with Delaunay3D, in vain. I could reproduce that. With a debug<br>
build of ParaView, one notices thousands of warnings of kind "Unable to<br>
factor linear system" being issued when trying to apply Delaunay3D<br>
filter to your input.<br>
<br>
The same actually happens when applying Delaunay3D filter to a sphere<br>
source created with theta resolution 180 and phi resolution 90.<br>
A few dozen warnings about being unable to factor a linear system are<br>
raised. (On a side node: a debug build of ParaView master branch with<br>
CMake option VTK_DEBUG_LEAKS:BOOL=ON reveals a memory leak in Delaunay3D<br>
when applied to this densely meshed sphere.) The result, however, is<br>
disappointing as the volume mesh has some gaps and rifts, not really a<br>
smooth surface any more. So, you need to pursue another triangulation<br>
approach.<br>
<br>
Applying Delaunay2D filter instead produces at least a hemisphere,<br>
almost instantly. I suspect, however, that a hemisphere is not good<br>
enough.<br>
<br>
You could resort to applying a Glyph filter with Glyph type "Sphere" and<br>
otherwise default settings. That yields a coarse approximation of what I<br>
guess you would like to achieve.<br>
<br>
It might also be that class vtkSurfaceReconstructionFilter or class<br>
vtkMarchingCubes or one of the filters from the pv-meshless plugin are<br>
able to create the surface mesh, but I'm not too familiar with them to<br>
say this with confidence or provide additional advice.<br>
<br>
There have recently even been a few discussions on the VTK mailing list<br>
regarding the general problem of triangulating point clouds with<br>
spherical topology, see e.g.<br>
<a href="http://markmail.org/message/fc3kjifkwtpggqai" target="_blank">http://markmail.org/message/fc3kjifkwtpggqai</a><br>
<br>
But given that your points are not arbitrarily distributed over the<br>
sphere, but in fact stored in your input file in a very regular and pre-<br>
sorted way (180 points per latitude, latitude after latitude from pole<br>
to pole) and given that the implied topology is very simple too (every<br>
vertex has exactly 4 neighbors), it is not too hard to extend your<br>
reader to have it create a smooth triangulation of the surface by simple<br>
quads (connecting vertex i with i+1, i+181 and i+180) without involving<br>
the help from additional VTK meshing classes.<br>
<br>
Maybe someone else on the list can even tell you how to re-arrange your<br>
data to fulfill the prerequisites for a structured grid data set for<br>
which the triangulation is implicitly done by VTK.<br>
<br>
Hope this helps,<br>
Karl<br>
<br>
<br>
<br>
åºžåº†æº wrote, On 27.09.2013 02:46:<br>
<div class="im">> This is the source of my test plugin.Could you have a try?<br>
> My paraview version is 4.0.1 ,built from source.<br>
><br>
><br>
</div>> 2013/9/27 Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a> <mailto:<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>><br>
<div class="im">><br>
> Â Â I doubt that would make a difference. I just tried a bimodal<br>
> Â Â distribution using two point sources, and the filter still executed<br>
> Â Â in about the same amount of time.<br>
><br>
> Â Â So what version of ParaView are you using? Are you using a binary<br>
</div>> Â Â downloaded from <a href="http://paraview.org" target="_blank">paraview.org</a> <<a href="http://paraview.org" target="_blank">http://paraview.org</a>> or did you build<br>
<div class="im">> Â Â your own?<br>
><br>
> Â Â -Ken<br>
><br>
>   From: åºžåº†æº <<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a><br>
</div>> Â Â <mailto:<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a>>><br>
<div class="im">> Â Â Date: Thursday, September 26, 2013 3:05 AM<br>
</div>> Â Â To: Kenneth Moreland <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a> <mailto:<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>><br>
> Â Â Cc: "<a href="mailto:paraview@paraview.org">paraview@paraview.org</a> <mailto:<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>>"<br>
> Â Â <<a href="mailto:paraview@paraview.org">paraview@paraview.org</a> <mailto:<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>>><br>
<div class="im">><br>
> Â Â Subject: [EXTERNAL] Re: [Paraview] Delaunay 3D filter too slow<br>
><br>
> Â Â My points are not Uniform distribution.They take from intersections<br>
> Â Â of 89 wefts and 180 warps.So the points are intensive at poles and<br>
> Â Â sparse at equator.Is this the problem?<br>
><br>
><br>
> Â Â 2013/9/25 Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a><br>
</div>> Â Â <mailto:<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>><br>
<div class="im">><br>
> Â Â Â Â That is strange. I cannot replicate your problem. I used a point<br>
> Â Â Â Â source to create 16020 random points in a sphere, and the<br>
> Â Â Â Â Delaunay triangulation took only about 2 seconds. My processor<br>
> Â Â Â Â might be a bit better than yours, but not anywhere near enough<br>
> Â Â Â Â to explain the difference.<br>
><br>
> Â Â Â Â What version of ParaView are you using? Are you a binary<br>
</div>> Â Â Â Â downloaded from <a href="http://paraview.org" target="_blank">paraview.org</a> <<a href="http://paraview.org" target="_blank">http://paraview.org</a>> or did you<br>
<div class="im">> Â Â Â Â build your own?<br>
><br>
> Â Â Â Â -Ken<br>
><br>
>     From: åºžåº†æº <<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a><br>
</div>> Â Â Â Â <mailto:<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a>>><br>
<div class="im">> Â Â Â Â Date: Tuesday, September 24, 2013 10:29 PM<br>
</div>> Â Â Â Â To: Kenneth Moreland <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a> <mailto:<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>><br>
<div class="im">> Â Â Â Â Subject: [EXTERNAL] Re: [Paraview] Delaunay 3D filter too slow<br>
><br>
> Â Â Â Â in fact,I have only 16020 points for test.My cpu is AMD<br>
> Â Â Â Â Athlon(tm) II P320 Dual-Core Processor with 2.1GHz.How long will<br>
> Â Â Â Â it take in this case if I use one cpu to calculate?I have wait<br>
> Â Â Â Â for more than 10 minutes before stopping it.<br>
><br>
><br>
> Â Â Â Â 2013/9/24 Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a><br>
</div>> Â Â Â Â <mailto:<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>>><br>
<div class="im">><br>
> Â Â Â Â Â Â Your options are probably either to wait or do something<br>
> Â Â Â Â Â Â else. Delaunay triangulation is a pretty heavyweight<br>
> Â Â Â Â Â Â operation and in general it is not trivial to impose a<br>
> Â Â Â Â Â Â topology on a collection of points.<br>
><br>
> Â Â Â Â Â Â You might rethink whether you really need to create a solid<br>
> Â Â Â Â Â Â sphere in the first place. I'm guessing you have at least<br>
> Â Â Â Â Â Â around 100,000 points (or else Delaunay probably would not<br>
> Â Â Â Â Â Â be that slow). If you just render these points as a cloud of<br>
> Â Â Â Â Â Â points, you should get enough occlusion for it to look<br>
> Â Â Â Â Â Â pretty much like a sphere.<br>
><br>
> Â Â Â Â Â Â -Ken<br>
><br>
>       From: åºžåº†æº <<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a><br>
</div>> Â Â Â Â Â Â <mailto:<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a>>><br>
<div class="im">> Â Â Â Â Â Â Date: Tuesday, September 24, 2013 5:01 AM<br>
> Â Â Â Â Â Â To: paraview <<a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
</div>> Â Â Â Â Â Â <mailto:<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>>><br>
<div class="HOEnZb"><div class="h5">> Â Â Â Â Â Â Subject: [EXTERNAL] [Paraview] Delaunay 3D filter too slow<br>
><br>
> Â Â Â Â Â Â I have a lot of points taking sample from a solid sphere.So<br>
> Â Â Â Â Â Â I want to use Delaunay 3D filter to render the shpere with<br>
> Â Â Â Â Â Â known scalars of the points.But it took me so much time.What<br>
> Â Â Â Â Â Â should I do?<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><font face="arial, helvetica, sans-serif" size="6" color="#33ff33"><a href="mailto:pangqingyuan1991@gmail.com" target="_blank">庞庆æº<span></span><span></span></a></font>
</div>