[vtkusers] Documentation of Tcl interface

Erin McKay e.mckay at unsw.edu.au
Wed Feb 2 16:17:04 EST 2005

> At Wed, 2 Feb 2005 15:52:12 +1100, Erin McKay wrote:
>>> The methods not available from Tcl are put between "//BTX" and 
>>> "//ETX"
>>> in header files.
>> My headers don't seem to follow this rule. I checked the headers for
>> vtkFloatArray and vtkCharArray (VTK 4.4.2). According to the above,
>> both should supply the SetArray method to the Tcl interface. But this
>> command is only available for vtkCharArray in my build (on OSX 10.3).
>> Is there something else going on here?
>> erin
> As the first argument type of vtkFloatArray::SetArray is "float*",
> this method cannot be wrapped. As the type in vtkCharArray is "char *",
> that happens to be same as a string, the method can be wrapped.
> It's because "everything is a string" in Tcl.
> Recent Tcl (later than 8.0?) supports binary data other than strings.
> But, as far as I know, VTK's wrapper doesn't utilize the new feature.
> Hideaki Hiraki

OK, so I shouldn't expect to be able to use vtkCharArray::SetArray from 
Tcl even though its available...

Well, at the risk of sounding like a broken record: does anyone know 
how to transfer the contents of a Tcl binary string (or any other 
non-vtk memory buffer for that matter) into VTK using only the 
facilities present in the current distribution?

Alternatively, can someone confirm that there is no way to do this 
presently without modifying the VTK source?

The two methods I have tried that work (a SetValue loop and file-based 
data transfer) are, sadly, too slow for my application.

regards to all

More information about the vtkusers mailing list