[vtkusers] vtkMarchingCubes does not work with vtkPolyData??
Luca Pamparana
luca.pamparana at gmail.com
Tue Aug 7 05:10:12 EDT 2007
Hi everyone,
Looking at the documentation of the vtkMarchingCubes object, it inherits
from vtkPolyDataAlgorithm. However, when I use the following filter
pipeline, it fails with the error:
Input for connection index 0 on input port index 0 for algorithm
vtkMarchingCubes(0x1753e60) is of type vtkPolyData, but a vtkImageData is
required.
The pipeline is as follows:
// Convert the image data to polygons
m_polyDataFilter->SetInput(m_input->GetOutput());
m_polyDataFilter->SetOutputStyleToPolygonalize();
// Smooth the data to remove the high frequencies and minmise the step
effects
m_smoother->SetInput(m_polyDataFilter->GetOutput());
m_smoother->SetNumberOfIterations(50);
// Pass this to the marching cube filter
m_mc->SetInput(m_smoother->GetOutput());
This fails with the above error. Is it meant to be like this? Is there an
easy way to convert polydata back to image data or alternatively smooth an
image data with some filter.
Thanks,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070807/bfd033d2/attachment.htm>
More information about the vtkusers
mailing list