[vtkusers] Error in conversion from Tcl to C++

Peter F Bradshaw pfb at exadios.com
Thu Sep 18 11:08:27 EDT 2008


Hi;

On Thu, 18 Sep 2008, B. C. wrote:

> Hi everyone.
> I found (in vtkCurvatures class examples) code lines in Tcl language. When i did the conversion into C++ language, many errors are generated!!!
> I post an example of conversion and the associated error s:
>  
> TCL:
> vtkPolyDataMapper cmapper1
> cmapper1 SetInputConnection [curve1 GetOutputPort]
> cmapper1 SetLookupTable lut1
> cmapper1 SetUseLookupTableScalarRange 1
>  
>  
> C++:
> vtkPolyDataMapper *cmapper1 = vtkPolyDataMapper::New();
> cmapper1->SetInputConnection(curve1->GetOutputPort());
> cmapper1->SetLookupTable(lut1);
> cmapper1->SetUseLookupTableScalarRange(1);
>
>  
> curve1 is a vtkCurvatures
> lut1 is a vtkLookupTable
>  
>  
> Errors:
> 'SetInputConnection' : is not a member of 'vtkPolyDataMapper'
> see declaration of 'vtkPolyDataMapper'
>
> 'GetOutputPort' : is not a member of 'vtkCurvatures'
> see declaration of 'vtkCurvatures'

Both SetInputConnection() and GetOutputPort() are members of the classes
and have been since the introduction of VTK 5.0. Older versions of VTK
had a different architecture and used SetInput() and GetOutput() for the
equivalent functionality.

Have you somehow reverted to an old library version?

Cheers

-- 
Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
Personal site: http://personal.exadios.com
"I love truth, and the way the government still uses it occasionally to
 keep us guessing." - Sam Kekovich.



More information about the vtkusers mailing list