[vtkusers] unusual SetInput() and GetOutput() methods

Mathieu Malaterre mathieu.malaterre at kitware.com
Sun Aug 22 21:09:27 EDT 2004


LinX,
 
  Usually this is a good idea to read the FAQ:

http://vtk.org/Wiki/VTK_FAQ#Forward_declaration_in_VTK_4.x

HTH
Mathieu

> 
> Hi everybody
> 
> I've been trying  to translate the expCos.tcl example to Cxx, but I got errs 
> in this part:
> 
> TCL>
> 
> vtkTransformPolyDataFilter transF
>    transF SetInput [plane GetOutput]
>    transF SetTransform transform
> vtkProgrammableFilter besselF
>    besselF SetInput [transF GetOutput]
>    besselF SetExecuteMethod bessel
> 
> 
> I translated this as
> 
> 
> vtkTransformPolyDataFilter *transF=vtkTransformPolyDataFilter::New();
>   transF->SetInput(plane->GetOutput());
>   transF->SetTransform(transform);
> 
> vtkProgrammableFilter *besselF=vtkProgrammableFilter::New();
>    besselF->SetInput(transF->GetOutput());
>    besselF->SetExecuteMethod(bessel);
> 
> 
> then, in making, I get this err
> 
> Building object file 3d.o...
> 3d.cc: In function `int main()':
> 3d.cc:25: no matching function for call to `vtkProgrammableFilter::SetInput(
>    vtkPolyData*)'
> /usr/local/include/vtk/vtkDataSetToDataSetFilter.h:62: candidates are: void 
>    vtkDataSetToDataSetFilter::SetInput(vtkDataSet*)
> 3d.cc:29: no matching function for call to `vtkWarpScalar::SetInput(
>    vtkPolyData*)'
> /usr/local/include/vtk/vtkPointSetToPointSetFilter.h:57: candidates are: void 
>    vtkPointSetToPointSetFilter::SetInput(vtkPointSet*)
> make: *** [3d.o] Error 1
> 
> 
> I've included these headers:
> #include "vtkPlaneSource.h"
> #include "vtkTransform.h"
> #include "vtkTransformPolyDataFilter.h"
> #include "vtkProgrammableFilter.h"
> #include "vtkWarpScalar.h"
> #include "vtkPolyDataMapper.h"
> #include "vtkActor.h"
> #include "vtkRenderer.h"
> #include "vtkRenderWindow.h"
> #include "vtkRenderWindowInteractor.h"
> 
> Does somebody knows what is the problem??
> ThanX
> 
> 
> LinX
> 
> _______________________________________________
> 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