<div dir="ltr">Adding to the stream of good advice:<div><br></div><div>1)</div><div><br></div><div>I put that one up just because I thought a lua wrapper would be COOL. I have a hunch it will turn out to be really useful too at some point, but I don't really know what for just yet.</div><div><br></div><div>2)</div><div><br></div><div>As for the input generator:</div><div><div style="font-size:13px"><br></div><div style="font-size:13px">The scope of that particular project idea is deceivingly big and a perfect solution within a summer will take a skilled, motivated and experienced developer. That said, small steps along the path are worthwhile too. The root problem is that there is a lot of tribal knowledge that goes into making a good reader. </div><div style="font-size:13px"><br></div><div style="font-size:13px">The closest thing I know of to a complete solution for it is the VisIt visualization tools database reader plugin architecture. See: Chapter 3 of <a href="https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/visit/GettingDataIntoVisIt2.0.0.pdf" target="_blank">https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/visit/GettingDataIntoVisIt2.0.0.pdf</a> for details.</div><div style="font-size:13px">Combine its concepts with the ease of customization that a scripting tool (like the python programmable filter) would probably get you most of the way. Either that or gut and templatize one of the truly generic readers like xdmf and you might get there too.</div><div style="font-size:13px"><br></div><div style="font-size:13px">More background on readers can be found at:</div><div style="font-size:13px"><a href="http://www.paraview.org/Wiki/Writing_ParaView_Readers">http://www.paraview.org/Wiki/Writing_ParaView_Readers</a></div><div style="font-size:13px"><br></div></div><div style="font-size:13px">thanks for considering VTK under GSoC and good luck with your proposal!</div><div style="font-size:13px"><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Thu, Mar 12, 2015 at 5:04 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Mar 12, 2015 at 2:13 PM, Ben Boeckel <span dir="ltr"><<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><br>
> I have experience doing Lua wrapping for other open source projects, so I'm<br>
> especially confident I could do the former project.<br>
<br>
</span>There is wrapping infrastructure in Wrapping/Tools which does all the<br>
parsing and data extraction already. What would need to be done is to<br>
take those structures and turn them into Lua code to call the right<br>
functions, do type conversions, etc. Extending the wrapping<br>
infrastructure to expose any information Lua needs would be in scope as<br>
well.<br>
<span><br>
> If someone could clarify what people would like to be able do with Lua<br>
<br>
</span>Similar things as Python: take VTK objects, put them into a pipeline,<br>
load data, do computations, etc.<br>
<span><br>
> and which parts of the project would need to be wrapped, that would be<br>
> great.<br>
<br>
</span>If the wrapping infrastructure is used, "all" of VTK shouldn't be too<br>
much past the initial push. There are bound to be corner cases that will<br>
need to be handled though.<br>
<br>
David Gobbi is the main developer behind the wrapping infrastructure,<br>
but I've done some work in it as well.<br></blockquote><div><br></div></span><div>I can add a bit more info about how the VTK python wrappers work.</div><div>Basically, the wrappers use a custom C++ parser (specifically tuned</div><div>to VTK) that reads all the VTK header files and create a C data structure</div><div>that describes the VTK API in all of its gory detail.  That information is then</div><div>used to generate the python wrapper code for each of the VTK classes.</div><div>The entire python wrapper generator is actually written in C.</div><div><br></div><div>If there is a desire to add other wrapper languages, there are options:</div><div><br></div><div><div>1) I have a modification to the VTK wrappers that generates a full xml</div><div>description of the VTK API at <a href="https://github.com/dgobbi/WrapVTK" target="_blank">https://github.com/dgobbi/WrapVTK</a> ,</div><div>and this xml could be fed into a customized wrapper-code generator. </div></div><div><br></div><div>2) A person could write a back-end for our custom C++ parser that</div><div>generates swig .i files, and then swig can be used to generate the</div><div>language wrappers. Or, the aforementioned xml could be converted</div><div>into a set of .i files for swig.</div><div><br></div><div>3) The same approach could be taken as for the existing wrappers,</div><div>i.e. write the wrapper-generator in C (or C++).  :)</div><div><br></div><div>Due to its complexity, VTK is probably not amenable to off-the-shelf</div><div>wrapping tools.  So just as Qt chose to write their own PySide wrapper</div><div>tools (and Riverbank wrote sip before that), and just as ITK chose to</div><div>use a hybrid gccxml/swig approach, VTK is well served by a customized</div><div>wrapping solution.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span></div><br></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>