[vtk-developers] How can I test my PolyData Algorithm? #2

Kilgus, Thomas t.kilgus at Dkfz-Heidelberg.de
Fri Jan 25 06:24:03 EST 2013


Hi Andrew,

thanks for your answer! I will definitely try this! I guess there is no description how to make a DartClient use Xvfg? This could definitely solve my Linux issues.

@All: Regarding Windows and Rendering tests: We observe strange rendering results if a user uses some remote desktop software to connect to his machine before a DartClient started. Did anyone experience similar things in VTK?

Regards,
Thomas



From: Andrew Maclean [mailto:andrew.amaclean at gmail.com]
Sent: Freitag, 25. Januar 2013 02:15
To: vtk-developers at vtk.org; Kilgus, Thomas
Cc: Moreland, Kenneth; David E DeMarle
Subject: Re: [vtk-developers] How can I test my PolyData Algorithm? #2

Hi Thomas,
  Have you thought about using xvfb?
See for example: http://kovyrin.net/2007/10/01/how-to-run-gui-programs-on-a-server-without-any-monitor/
Also see: http://en.wikipedia.org/wiki/Xvfb but is is not very informative.
You may be able to use this to set up VTK regression testing in a headless environment.
Regards
   Andrew



---------- Forwarded message ----------
From: "Kilgus, Thomas" <t.kilgus at Dkfz-Heidelberg.de<mailto:t.kilgus at Dkfz-Heidelberg.de>>
To: "Moreland, Kenneth" <kmorel at sandia.gov<mailto:kmorel at sandia.gov>>, "vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>" <vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>
Cc:
Date: Thu, 24 Jan 2013 19:30:57 +0100
Subject: Re: [vtk-developers] How can I test my PolyData Algorithm? #2
Ok that is very interessting.

My deparment has no real experience with the rendering tests. I was trying to configure everything to unleash the power ;), but I struggled with Linux (which doesnt work at all) and Windows (which delivers strange rendered images, when a users connects to his machine via Remote Desktop). It was hard for me to get to know everything. In fact, I was looking into the code to understand how to insert multiple reference images for a single test (which is very easy once you know it, but I could not find any documentation).

Is there any documentation like "How to set up linux dartclients to use vtkRegressionTestImage" or stuff like that? Maybe I should solve our iissues regarding vtkRegressionTestImage, instead of programming my own functions to compare data objects.

Regards,
Thomas
________________________________________
Von: Moreland, Kenneth [kmorel at sandia.gov<mailto:kmorel at sandia.gov>]
Gesendet: Donnerstag, 24. Januar 2013 17:32
An: Kilgus, Thomas; vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>
Betreff: RE: [vtk-developers] How can I test my PolyData Algorithm? #2

To my knowledge there is no built in mechanism for comparing data objects and the like.  The VTK regression tests rely pretty much exclusively on the rendering tests.  I won't prattle on about the advantages of them, but suffice it to say that once configured the rendering tests are easy to set up to test a large fraction of what can be done with VTK.  So I am not aware of anyone bothering to implement anything else.

-Ken

From: <Kilgus>, Thomas <t.kilgus at Dkfz-Heidelberg.de<mailto:t.kilgus at Dkfz-Heidelberg.de<mailto:t.kilgus at Dkfz-Heidelberg.de>>>
Date: Thursday, January 24, 2013 9:14 AM
To: Kenneth Moreland <kmorel at sandia.gov<mailto:kmorel at sandia.gov><mailto:kmorel at sandia.gov<mailto:kmorel at sandia.gov>>>, "vtk-developers at vtk.org<mailto:vtk-developers at vtk.org><mailto:vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>" <vtk-developers at vtk.org<mailto:vtk-developers at vtk.org><mailto:vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>>
Subject: [EXTERNAL] RE: [vtk-developers] How can I test my PolyData Algorithm? #2

Hi Kenneth,

Thank you very much for your answer! I know the regression tests and really like them, however, in this case I would like to test the data itself and not the rendering. One problem I have with rendering tests is that they do not run in Linux DartClients. (We use a CMake Script to run the nightlies and it somehow opens an environment without any X-Server so there is no possibility to actually open any render window. I know that it is possible to use Mesa Software rendering, but that is huge configuration effort. But this is really off topic …).

Is there no way to make the test on a lower level? vtkRegressionTestImage would also test the rendering, which slightly overkill here in my opinion. Just out of curiosity: Are most VTK algorithms (even they just modify data and do not render anything themselves) tested with vtkRegressionTestImage?

Regards,
Thomas

From: vtk-developers-bounces at vtk.org<mailto:vtk-developers-bounces at vtk.org><mailto:vtk-developers-bounces at vtk.org<mailto:vtk-developers-bounces at vtk.org>> [mailto:vtk-developers-bounces at vtk.org<mailto:vtk-developers-bounces at vtk.org>] On Behalf Of Moreland, Kenneth
Sent: Donnerstag, 24. Januar 2013 16:53
To: Kilgus, Thomas; vtk-developers at vtk.org<mailto:vtk-developers at vtk.org><mailto:vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>
Subject: Re: [vtk-developers] How can I test my PolyData Algorithm? #2

The typical way this type of testing is done within the VTK regression tests is to run your algorithm, render the result, and then test the image to some ground truth image.  There is a utility in VTK (vtkRegressionTestImage) that performs this test with the requisite tolerance to compensate for slight variations in hardware (as well as the ability to provide multiple ground truth images for instances where the difference is more than a little but still correct).

There are lots of examples in the VTK source.  A basic one is called Mace.cxx.  Take a look at that example first.

-Ken

From: <Kilgus>, Thomas <t.kilgus at Dkfz-Heidelberg.de<mailto:t.kilgus at Dkfz-Heidelberg.de<mailto:t.kilgus at Dkfz-Heidelberg.de>>>
Date: Thursday, January 24, 2013 3:32 AM
To: "vtk-developers at vtk.org<mailto:vtk-developers at vtk.org><mailto:vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>" <vtk-developers at vtk.org<mailto:vtk-developers at vtk.org><mailto:vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>>>
Subject: [EXTERNAL] [vtk-developers] How can I test my PolyData Algorithm? #2

Hi there,

I didn’t get any answer last time (also on the user’s list) so I try again ☺:


I have an algorithm generating a vtkPolyData as output. I would like to write a test, in order to make sure that my algorithm generates the same output every day (even though there might be changes to the algorithm or to surrounding classes). What is a nice way to do this?

I thought I could save a generated PolyData as “ground truth” and compare it point wise to the generated output. However, my output data contains lots of 3D floating-point points and thus I have to perform lots of comparisons between floating-point numbers and this can be difficult for different data or 32Bit/64Bit Systems.

I was wondering if there are any methods/classes already meant general testing purposes? Anything I could reuse for comparing two PolyDatas or anything to make sure my algorithm provides the same result for the same data. I tried to look into tests of other VTK classes but couldn’t really find anything. Any suggestions?

Regards
Thomas

--
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130125/4ecca0ff/attachment.html>


More information about the vtk-developers mailing list