[vtkusers] 2D contouring with vtkDiscreteMarchingCube

quasilister quasilister at gmail.com
Fri Dec 7 16:14:59 EST 2007


Dear vtkUsers,
    I seem to be having some trouble contouring 2D data with
vtkDiscreteMarchingCubes.  I "trick" the algorithm by giving an extra
z-dimension to vtkImageData.  For example If my data is 100x100 (x-y), I
write vol.SetDimensions(100,100,2), however, my vtkFloatArray will only
contain 100x100 points.

When I render an image for the first time my method works just fine:
http://debye.physics.indiana.edu/images/correct.jpg

However, if I reload and render the same data several times, the
rendered images have points or entire blocks that are incorrectly
plotted:
http://debye.physics.indiana.edu/images/incorrect_1.jpg
http://debye.physics.indiana.edu/images/incorrect_2.jpg

I have tried this both under windows and linux and get similar results.
I am using PyQt and python-VTK

Thank you,
--Benjamjn




More information about the vtkusers mailing list