<div>
            <div>
                <span>That's right, a C/C error, but that doesn't change anything to my problem.</span></div><div><span><br></span></div><div><span>I only give an x,y coordinates, but I also tried by adding a z coordinates, that didn't change anything.</span></div><div><span><br></span></div><div><span>thanks for notice it :)</span></div><div><span><br>--</span></div><div><span>Steffan Ulysse Rigaud<br><br></span>
                
                <p style="color: #a0a0a0;">On Monday, June 27, 2011 at 11:09 AM, robert tamburo wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Not sure if this is related to the error, but looks like your 3rd point is not initialized correctly:<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: Menlo; font-size: 11px; ">Point3[<span style="color: rgb(44, 46, 207); ">0</span>] =&nbsp;&nbsp;<span style="color: rgb(44, 46, 207); ">0</span>; Point2[<span style="color: rgb(44, 46, 207); ">1</span>] = -<span style="color: rgb(44, 46, 207); ">1</span>;</span><br>
<br><div class="gmail_quote">On Sun, Jun 26, 2011 at 11:04 PM, Steffan <span dir="ltr">&lt;<a href="mailto:ulysse.rigaud@gmail.com">ulysse.rigaud@gmail.com</a>&gt;</span> wrote:<br><blockquote type="cite"><div>
<div>
            <div>
                <span>Hello everyone,</span></div><div><span><br></span></div><div><span>I've discover that itk has an implementation of Voronoi, which is quite great for me:</span></div><div><span>itkVoronoiDiagram2D</span></div>
<div><span>itkVoronoiDiagram2DGenerator</span></div><div>Where itkVoronoiDiagram2DGenerator generates an&nbsp;itkVoronoiDiagram2D which inherit from itkMesh.</div><div><br></div><div>I'm trying to make it simple for now by giving 3 inputs points (Point1,Point2,Point3), and write the output Mesh in a vtkPolyData.</div>
<div><span><br></span></div><div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#bb2d9d">typedef</span> itk::<span style="color:#713ea3">VoronoiDiagram2DGenerator</span>&lt;<span style="color:#bb2d9d">float</span>&gt; &nbsp; &nbsp; VoronoiDiagram2DGeneratorType;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#bb2d9d">typedef</span> VoronoiDiagram2DGeneratorType::<span style="color:#713ea3">PointType</span>&nbsp; <span style="color:#713ea3">PointType</span>;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#bb2d9d">typedef</span> VoronoiDiagram2DGeneratorType::<span style="color:#713ea3">VDMesh</span> &nbsp; &nbsp; VoronoiMeshType;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#bb2d9d">typedef</span> itk::<span style="color:#713ea3">VTKPolyDataWriter</span>&lt;VoronoiMeshType&gt; &nbsp; PolyDataWriterType;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#713ea3">PointType</span> Point1;</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>Point1[<span style="color:#2c2ecf">0</span>] = -<span style="color:#2c2ecf">1</span>; Point1[<span style="color:#2c2ecf">1</span>] = <span style="color:#2c2ecf">1</span>;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#713ea3">PointType</span> Point2;</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>Point2[<span style="color:#2c2ecf">0</span>] =&nbsp; <span style="color:#2c2ecf">1</span>; Point2[<span style="color:#2c2ecf">1</span>] = <span style="color:#2c2ecf">1</span>;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span><span style="color:#713ea3">PointType</span> Point3;</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>Point3[<span style="color:#2c2ecf">0</span>] =&nbsp; <span style="color:#2c2ecf">0</span>; Point2[<span style="color:#2c2ecf">1</span>] = -<span style="color:#2c2ecf">1</span>;</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>VoronoiDiagram2DGeneratorType::<span style="color:#713ea3">Pointer</span> voronoiGenerator = VoronoiDiagram2DGeneratorType::<span style="color:#3e1f7c">New</span>();</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>voronoiGenerator-&gt;<span style="color:#3e1f7c">AddOneSeed</span>( Point1 );</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>voronoiGenerator-&gt;<span style="color:#3e1f7c">AddOneSeed</span>( Point2 );</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>voronoiGenerator-&gt;<span style="color:#3e1f7c">AddOneSeed</span>( Point3 );</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>PolyDataWriterType::<span style="color:#713ea3">Pointer</span> writer = PolyDataWriterType::<span style="color:#3e1f7c">New</span>();</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#d12c26"><span style="color:#000000"><span style="white-space:pre-wrap">        </span>writer-&gt;</span><span style="color:#3e1f7c">SetFileName</span><span style="color:#000000">(</span>"voronoiMesh.vtk"<span style="color:#000000">);</span></p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>writer-&gt;<span style="color:#3e1f7c">SetInput</span>(voronoiGenerator-&gt;<span style="color:#3e1f7c">GetOutput</span>());</p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"><span style="white-space:pre-wrap">        </span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="white-space:pre-wrap">        </span>writer-&gt;<span style="color:#3e1f7c">Update</span>();</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo">
<br></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="font-family:Helvetica;font-size:13px"></span></p><div>That's give me 3 errors inside the VTKPolyDataWriter.txx:</div><div><br></div><div>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65: &nbsp; instantiated from 'void itk::VTKPolyDataWriter&lt;TInputMesh&gt;::Update() [with TInputMesh = itk::VoronoiDiagram2D&lt;float&gt;]'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../Voronoi/main.cxx:42:0 /../Voronoi/main.cxx:42: &nbsp; instantiated from here</p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:191:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:191: error: invalid conversion from 'itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt;* const' to 'itk::PolygonCell&lt;itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt; &gt;*'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65: &nbsp; instantiated from 'void itk::VTKPolyDataWriter&lt;TInputMesh&gt;::Update() [with TInputMesh = itk::VoronoiDiagram2D&lt;float&gt;]'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../Voronoi/main.cxx:42:0 /../Voronoi/main.cxx:42: &nbsp; instantiated from here</p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:225:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:225: error: invalid conversion from 'itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt;* const' to 'itk::PolygonCell&lt;itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt; &gt;*'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><br></p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:65: &nbsp; instantiated from 'void itk::VTKPolyDataWriter&lt;TInputMesh&gt;::Update() [with TInputMesh = itk::VoronoiDiagram2D&lt;float&gt;]'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../Voronoi/main.cxx:42:0 /../Voronoi/main.cxx:42: &nbsp; instantiated from here</p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo">/../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:240:0 /../ITKsources/Modules/Core/Mesh/include/itkVTKPolyDataWriter.txx:240: error: invalid conversion from 'itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt;* const' to 'itk::PolygonCell&lt;itk::CellInterface&lt;float, itk::CellTraitsInfo&lt;2, float, float, long unsigned int, long unsigned int, long unsigned int, itk::Point&lt;float, 2u&gt;, itk::MapContainer&lt;long unsigned int, itk::Point&lt;float, 2u&gt; &gt;, std::set&lt;long unsigned int, std::less&lt;long unsigned int&gt;, std::allocator&lt;long unsigned int&gt; &gt; &gt; &gt; &gt;*'</p>

<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><font face="Helvetica" size="3"><span style="font-size:13px"><font face="Menlo" size="3"><span style="font-size:11px"><br></span></font></span></font></p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;min-height:13.0px"><span style="font-family:Helvetica;font-size:13px"></span></p><div>Well, I'm stuck there, I don't know how to display an itkVoronoiDiagram2D, except using the PolyDataWriter but that doesn't seem to work.&nbsp;</div>
<div>If you have any idea that could help be on how to generate the VoronoiDiagram and to display, I would be grateful.</div><p></p></div><div><br></div><p></p></div><div><span><div>Thanks in advance.</div><div><br></div>
--&nbsp;<br>Steffan Ulysse Rigaud<br><br></span>
            </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<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></div></blockquote></div><br></div>
</div></div></span>
                
                
                
                
                </blockquote>
                
                <div>
                    <br>
                </div>
            </div>
        </div>