[vtk-developers] How can I test my PolyData Algorithm? #2
Moreland, Kenneth
kmorel at sandia.gov
Thu Jan 24 11:32:28 EST 2013
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>>
Date: Thursday, January 24, 2013 9:14 AM
To: Kenneth Moreland <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>>
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] 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>
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>>
Date: Thursday, January 24, 2013 3:32 AM
To: "vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>" <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130124/4fe502bd/attachment.html>
More information about the vtk-developers
mailing list