[Insight-users] Display itkVoronoiDiagram2D
Steffan
ulysse.rigaud at gmail.com
Mon Jun 27 22:34:21 EDT 2011
I've replace my VTKPolyDataWriter<VoronoiDiagram2DType> by VTKPolyDataWriter<VoronoiDiagram2DType::Superclass> and it compiles.
And I end up at the same point as you David, Paraview crash.
I've looked up to the voronoi.vtk:
# vtk DataFile Version 2.0
File written by itkVTKPolyDataWriter
ASCII
DATASET POLYDATA
POINTS 0 float
POLYGONS 5 29
5 0 0 0 0 0
5 0 0 0 0 0
4 0 0 0 0
5 0 0 0 0 0
5 0 0 0 0 0
There are clearly some missing data in order to display the voronoi diagram, which explain why Paraview crash.
I think there is a different data structure between Mesh and VoronoiDiagram2D.
By using VoronoiDiagram2D::Superclass (which is Mesh) as template value for VTKPolyDataWriter, we are writing only the data structure in common between Mesh and VoronoiDiagram2D.
And if you use VoronoiDiagram2D as template value for the writer, you will end up with the same compilation errors I had:
itkVTKPolyDataWriter.txx:191: error: invalid conversion from … to …
itkVTKPolyDataWriter.txx:225: error: invalid conversion from … to …
itkVTKPolyDataWriter.txx:240: error: invalid conversion from … to …
--
Steffan
On Monday, June 27, 2011 at 7:12 PM, David Doria wrote:
> On Sun, Jun 26, 2011 at 11:16 PM, Steffan <ulysse.rigaud at gmail.com> wrote:
> > That's right, a C/C error, but that doesn't change anything to my problem.
> > I only give an x,y coordinates, but I also tried by adding a z coordinates,
> > that didn't change anything.
> > thanks for notice it :)
>
> I have been trying to do the same thing. It seems to run fine, but
> when trying to open the .vtk file in Paraview, Paraview crashes:
>
> http://www.itk.org/Wiki/ITK/Examples/Segmentation/WishList/VoronoiDiagram2DGenerator
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110628/c2938db3/attachment.htm>
More information about the Insight-users
mailing list