[vtk-developers] Examples Guidelines

Bill Lorensen bill.lorensen at gmail.com
Tue Dec 22 08:22:16 EST 2009


Andrew,

For now, cout versus std::cout is the recommended VTK way. There is a
commit check that prevents std::cout from being checked in. Hopefully
we can change this in the future.

Bill

On Tue, Dec 22, 2009 at 12:37 AM, Andrew Maclean
<andrew.amaclean at gmail.com> wrote:
> Hi Bill,
>
> The guidelines look Ok, just one comment: Is there a reason for not
> specifying the std:: namespace? E.g. I just like to make it explicit
> that for example I am using std::cerr and not cerr.
>
> If you would like it I am happy to submit an example that reads
> x,y,z, r,g,b,a point cloud data and produces a vtp file, I would call
> it ReadXYZRGBA. Just tell me where you would like it and I will write
> it up.
> It will demonstrate a templated parser that skips comments and how to
> create and fill a vtkPolyData structure.
> Users should be able to easily modify if for reading in x,y,z, scalar
> or x,y,z, scalar, r,g,b,a etc. I'll leave some hints in the code!
>
>  Regards
>   Andrew
>
>
> On Mon, Dec 21, 2009 at 9:11 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Folks,
>>
>> In preparation for a major upgrade to the VTK/Examples (both on the
>> wiki and repository), I've started to generate an Examples guideline
>> page on the wiki:
>> http://www.vtk.org/Wiki/VTK/Examples/GuideLines
>>
>> Suggestions/comments are welcome.
>>
>> I've also been working on a mechanism for building and regression
>> testing the examples once they migrate to the VTK repository. This
>> mechanism uses the vtkTesting framework to regression test examples
>> without changing the examples code. It uses a vtkTestingObjectFactory
>> and the vtk factory facility to override the Start() method of
>> vtkRenderWindowInteractor. This override allows interactive examples
>> to exit with code modification. It also grabs the screen and compares
>> the result to a  baseline image in VTKData/Baseline.
>>
>> I've tested this locally on about a 1/2 dozen examples.
>>
>> The factory code is checked in:
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.cxx?view=log
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.h?view=log
>>
>> This .cmake file contains the magic mojo to integrate the factory with
>> the existing testing framework:
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.cmake?view=log
>>
>> The changes to the CMakeLists.txt files re not checked in yet.
>>
>> Still some refining to do, we're getting close.
>>
>> Thanks to Dave Dorria for the moivation (and most of the examples work),
>>
>> Bill
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>>
>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
> Centre for Autonomous Systems
> The Rose Street Building J04
> The University of Sydney  2006  NSW
> AUSTRALIA
> Ph: +61 2 9351 3283
> Fax: +61 2 9351 7474
> URL: http://www.acfr.usyd.edu.au/
> ___________________________________________
>



More information about the vtk-developers mailing list