Thanks for the clarification Cory. I am having way too much trouble with the marching cubes algo.<br><br>I am aware of using the old style pipeline. Just been too lazy to update it. Will get to it once this problem is solved! :)
<br><br>Thanks,<br>Luca<br><br><div><span class="gmail_quote">On 8/7/07, <b class="gmail_sendername">Cory Quammen</b> <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[cc'ing list]<br><br>Luca,<br><br>Inheritance from vtkPolyDataAlgorithm does not necessarily imply that<br>the algorithm takes vtkPolyData as input. In the case of<br>vtkMarchingCubes, you just need to pass in your filtered image data.
<br>You might consider using vtkImageGaussianSmooth for smoothing your<br>data, or any one of the other filters starting with vtkImage* listed<br>at <a href="http://www.vtk.org/doc/nightly/html/classes.html">http://www.vtk.org/doc/nightly/html/classes.html
</a>.<br><br>As an aside, you are using the old style pipeline connections. It is<br>better to use the new style connections, such as:<br><br>m_smoother->SetInputConnection(m_input->GetOutputPort());<br>m_mc->SetInputConnection(m_smoother->GetOutputPort());
<br><br>Hope this helps,<br>Cory<br><br>On 8/7/07, Luca Pamparana <<a href="mailto:luca.pamparana@gmail.com">luca.pamparana@gmail.com</a>> wrote:<br>> Hi everyone,<br>><br>> Looking at the documentation of the vtkMarchingCubes object, it inherits
<br>> from vtkPolyDataAlgorithm. However, when I use the following filter<br>> pipeline, it fails with the error:<br>><br>> Input for connection index 0 on input port index 0 for algorithm<br>> vtkMarchingCubes(0x1753e60) is of type vtkPolyData, but a vtkImageData is
<br>> required.<br>><br>> The pipeline is as follows:<br>><br>> // Convert the image data to polygons<br>> m_polyDataFilter->SetInput(m_input->GetOutput());<br>><br>> m_polyDataFilter->SetOutputStyleToPolygonalize();
<br>><br>> // Smooth the data to remove the high frequencies and minmise the step<br>> effects<br>> m_smoother->SetInput(m_polyDataFilter->GetOutput());<br>><br>> m_smoother->SetNumberOfIterations(50);
<br>><br>> // Pass this to the marching cube filter<br>> m_mc->SetInput(m_smoother->GetOutput());<br>><br>> This fails with the above error. Is it meant to be like this? Is there an<br>> easy way to convert polydata back to image data or alternatively smooth an
<br>> image data with some filter.<br>><br>> Thanks,<br>> Luca<br>><br>><br>><br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at:
<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br>><br>><br><br><br>--<br>Cory Quammen<br>Department of Computer Science<br>University of North Carolina at Chapel Hill<br><a href="http://www.cs.unc.edu/~cquammen">http://www.cs.unc.edu/~cquammen</a><br></blockquote>
</div><br>