On Fri, Jul 15, 2011 at 7:42 AM, Prabhu Ramachandran <span dir="ltr"><<a href="mailto:prabhu@aero.iitb.ac.in" target="_blank">prabhu@aero.iitb.ac.in</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


<div><br></div>
Don't you already have vtkVector2i, vtkVector2f etc. which really are specific instantiations or am I missing something -- I'm away from my laptop where I built things so cannot verify?</blockquote><div><br>Those have been defined in the C++ header files as subclasses for some of the template instantiations.  But they cannot be used in place of the template instantiations in the wrappers.  For example, tracing the hierarchy for vtkVector3f:</div>


<div><br></div><div>class vtkVector3f : public vtkVector3<float></div><div><br></div><div><div>template<typename T></div><div>class vtkVector3 : public vtkVector<T, 3></div><div><br></div><div><div>template<typename T, int Size></div>


<div>class vtkVector</div></div><div><br></div><div>To capture the complete hierarchy, it is necessary to wrap all of these: vtkVector3f, vtkVector3<float>, vtkVector<float, 3>.  Wrapping just the leaf class vtkVector3f would be insufficient.  Right now, in python I have named the latter two classes vtkVector3[float32] and vtkVector[float32,3] and they can be instantiated as such by evaluation, because vtkVector3[] and vtkVector[] are dicts that take the template parameters 'float32' and ('float32', 3) as keys.  A more thorough explanation is provided in the template section of this document:</div>


<div><a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Wrapping/Python/README_WRAP.txt" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Wrapping/Python/README_WRAP.txt</a></div><div><br></div><div>I could change the python names of the template instantiations to a mangled form to make them python-legit,</div>


<div><br></div><div>vtkVector3<float> -> 'T10vtkVector3IfE'</div><div>vtkVector<float,3> -> 'T9vtkVectorIfLi3EE'</div><div><br></div><div>but I cannot use names like "vtkVector3f" or else there will be collisions.</div>


<div><br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
In actuality I'd like Mayavi to work but installing it is non-trivial so I will try and whip up a script for you with no external dependencies later tonight (in 3-4 hours from now).  I hope that will work.<br></blockquote>


<div><br></div><div>Thanks, that would help.</div><div><br></div><div> - David</div></div>