[vtkusers] vtkDEMReader

Amy Henderson amy.henderson at kitware.com
Wed Feb 4 16:00:35 EST 2004


Hi Vetria,

lindex is a Tcl command to extract an element from a list.  In C++, those 2 
lines of Tcl code would look something like this:

float lo = Scale * demModel->GetElevationBounds()[0];
float hi = Scale * demModel->GetElevationBounds()[1];

- Amy

At 02:45 PM 2/4/2004 -0600, Vetria Byrd wrote:
>I am trying to convert a tcl program that uses vtkDEMReader to C++.
>
>Does any one know how to convert the following tcl code to C++:
>
>set lo [expr $Scale * [lindex [demModel GetElevationBounds] 0 ]]
>set hi [expr $Scale * [lindex [demModel GetElevationBounds] 1 ]]
>
>Prior to previous two lines of code I have:
>vtkDEMReader *demModel = vtkDEMReader::New();
>demModel->SetFileName(argv[1]);
>demModel->Update();
>
>I am not sure what lindex is (variable name?) it isn't explicitly defined
>in the tcl code.
>
>Thanks in advance to anyone who can help.
>Vetria
>
>
>_______________________________________________
>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