[vtkusers] vtkDelaunay2D example

Dominik Szczerba domi at vision.ee.ethz.ch
Sun Aug 26 15:09:38 EDT 2007


I am using the release version 5.0.3
- DS

Sylvain Jaume wrote:
> Are you sure you updated your VTK repository after I fixed vtkDelaunay2D
> and added TestDelaunay2D (2007-06-20)?
> 
> Sylvain
> 
> Dominik Szczerba wrote:
>> Well I just compiled and run the code you posted. There is nothing I can
>> send you. On execution it says:
>>
>> input numPts= 16
>> output numPts= 16
>> output numCells= 18
>> output numPolys= 18
>> output numLines= 0
>> output numVerts= 0
>> Triangulation has 4 unconnected points
>> ERROR: Triangulation has 4 unconnected points
>>
>> I did not debug any further (the thing is purely ambitional for me)
>>
>> - Dominik
>>
>> Sylvain Jaume wrote:
>>> Hi Dominik,
>>>
>>> TestDelaunay2D passed on every tested platforms on the dashboard:
>>> http://www.vtk.org/Testing/Dashboard/20070826-0300-Nightly/TestDetail/__Graphics_Testing_Cxx_TestDelaunay2D.html
>>>
>>>
>>>
>>> Do you a have a test case that fails with vtkDelaunay2D? If yes, could
>>> you send your data to me and I will try to reproduce your case.
>>>
>>> Sincerely,
>>> Sylvain
>>>
>>>
>>> Dominik Szczerba wrote:
>>>> I tried the Delaunay example out of curiosity (I use the great qhull
>>>> for
>>>> years) and I am sorry to report it does not work (at least the test
>>>> itself says the test is not passed). My experience with the VTK 3-D
>>>> Delaunay has not been a very succesful one either.
>>>>
>>>> I have worked out how to use qhull in C++ (qhull is a very special
>>>> programming style...) and tested it extensively for a few years. I
>>>> would
>>>> be ready to share my experience, unfortunately I have no time to
>>>> implement it as a VTK algorithm. Anyone to collaborate?
>>>>
>>>> - Dominik
>>>>
>>>> Sylvain Jaume wrote:
>>>>> Hi Daniela,
>>>>>
>>>>> Example of vtkDelaunay2D can be found here:
>>>>> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Graphics/Testing/Cxx/TestDelaunay2D.cxx?root=VTK&content-type=text/plain
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The output is a vtkPolyData. So you need vtkPolyDataMapper, not
>>>>> vtkDataSetMapper.
>>>>>
>>>>> HTH,
>>>>> Sylvain
>>>>>
>>>>> Daniela Castelluccia wrote:
>>>>>>  Hi Sylvain,
>>>>>> I'm trying with vtkDelaunay2D ( which makes triangles ) usign the
>>>>>> BoundaryTriangulation method:
>>>>>>
>>>>>> vtkFeatureEdges feature
>>>>>> feature SetInput originalPolydata
>>>>>> feature BoundaryEdgesOn
>>>>>> feature FeatureEdgesOff
>>>>>> feature NonManifoldEdgesOff
>>>>>> feature ManifoldEdgesOff
>>>>>>
>>>>>>
>>>>>> vtkDelaunay2D del
>>>>>> #vtkDelaunay3D del
>>>>>>     del SetInput [feature GetOutput]
>>>>>>     del BoundingTriangulationOn
>>>>>>     del SetTolerance 0.001
>>>>>>     del SetAlpha10.0
>>>>>>
>>>>>> vtkDataSetMapper map
>>>>>>     map SetInput [del GetOutput]
>>>>>>  
>>>>>> vtkActor triangulation
>>>>>>     triangulation SetMapper map
>>>>>>     [triangulation GetProperty] SetColor 1.0 0.49 0.25
>>>>>>  
>>>>>> #vtkPolyDataMapper mapper
>>>>>> #mapper SetInput originalPolydata
>>>>>> #vtkActor original
>>>>>> #    original SetMapper mapper
>>>>>> #   [original GetProperty] SetColor 1.0 0.0 0.0
>>>>>>
>>>>>> vtkRenderer ren1
>>>>>> vtkRenderWindow renWin
>>>>>>     renWin AddRenderer ren1
>>>>>> vtkRenderWindowInteractor iren
>>>>>>     iren SetRenderWindow renWin
>>>>>>
>>>>>>
>>>>>> ren1 AddActor triangulation
>>>>>> #ren1 AddActor original
>>>>>> ren1 SetBackground 1 1 1
>>>>>> renWin SetSize 900 900
>>>>>> renWin Render
>>>>>>
>>>>>> wm withdraw .
>>>>>>
>>>>>>
>>>>>> How can I set the right parameters for Delaunay trinagulation?
>>>>>> Have you some examples?
>>>>>>  
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> This is the private VTK discussion list. Please keep messages
>>>>> on-topic.
>>>>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>

-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list