[vtkusers] 'SetOutput' : cannot convert parameter 1 from 'class vtkImageData *' to 'class vtkPolyData *'

Amy Henderson amy.henderson at kitware.com
Thu Oct 16 09:10:55 EDT 2003


At 11:23 AM 10/16/2003 +0800, Paul Tait wrote:
>according to the docs and examples this should work. What am I doing wrong ?
>
>usg is vtkUnstructuredGrid
>// vtkShepardMethod *sm = vtkShepardMethod::New();
>// sm->SetInput(usg);
>vtkGaussianSplatter *sm = vtkGaussianSplatter::New();
>sm->SetInput(usg);
>vtkContourFilter *cf = vtkContourFilter::New();
>
>cf->SetOutput(sm->GetOutput());

You probably wanted to set the input to vtkShepardMethod and 
vtkContourFilter, not the output.  Both of these take vtkDataSet (which 
vtkImageData is a subclass of) as input.  The output data set is the result 
of running a filter, and is rarely set explicitly.

- Amy

>error C2664: 'SetOutput' : cannot convert parameter 1 from 'class
>vtkImageData *' to 'class vtkPolyData *'
>
>same error for vtkShepardMethod too
>
>Thanks Paul Tait
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list