[vtkusers] Documentation of Tcl interface

HIRAKI Hideaki hhiraki at lab.nig.ac.jp
Thu Feb 3 00:00:14 EST 2005


Have you filed a feature request to the bug tracker?
I think what you want is a missing feature of VTK.

If no Tcl-only/general solution existed, a small C++ 
code might be a workaround. It could be outside the 
VTK source. How do you put your contents into Tcl? 
I guess a similar code would put it into vtkDataArray.

Regards


At Thu, 3 Feb 2005 08:17:04 +1100, Erin McKay wrote:
> 
> > 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
> erin
> 



More information about the vtkusers mailing list