[Insight-developers] SimpleITK - language specific test

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Mar 31 09:23:56 EDT 2011


Hi,

For wrapping we are using itkTestDriver which seems to do what  
PythonTests.cxx do without the need to edit any cxx file.
It is also used to test the ITK examples now.

You may want to look at it.

[glehmann at marvin ITK-build]$ bin/itkTestDriver --help
usage: itkTestDriver [options] prg [args]

itkTestDriver alter the environment, run a test program and compare  
the images
produced.

Options:
   --add-before-libpath PATH
       Add a path to the library path environment. This option take  
care of
       choosing the right environment variable for your system.
       This option can be used several times.

   --add-before-env NAME VALUE
       Add a VALUE to the variable name in the environment.
       The seperator used is the default one on the system.
       This option can be used several times.

   --add-before-env-with-sep NAME VALUE SEP
       Add a VALUE to the variable name in the environment using the  
provided separator.
       This option can be used several times.

   --compare TEST BASELINE
       Compare the TEST image to the BASELINE one.
       This option can be used several times.
   --with-threads THREADS
       Use at most THREADS threads.

   --without-threads
       Use at most one thread.

   --compareNumberOfPixelsTolerance TOLERANCE
       When comparing images with --compare, allow TOLERANCE pixels to  
differ.
       Default is 0.

   --compareRadiusTolerance TOLERANCE
       Default is 0.

   --compareIntensityTolerance TOLERANCE
       Default is 2.0.

   --
       The options after -- are not interpreted by this program and  
passed
       directly to the test program.

   --help
       Display this message and exit.


Gaëtan


Le 31 mars 11 à 15:14, Bradley Lowekamp a écrit :

> Dan,
>
> Thanks. I saw the PythonTest.cxx just after I posted. Initially I  
> was looking for a Java one. There does not seem to be an example  
> driver to Tcl, Java, R, or C#. To the Jira issue reporter!
>
> Brad
>
> On Mar 31, 2011, at 8:59 AM, Daniel Blezek wrote:
>
>> Sure.  Write the test in Python, the Examples directory is a good  
>> place to put it.  Your script should take input and output images,  
>> with optional arguments.  Edit the PythonTests.cxx file in Testing/ 
>> Unit.  This constructs a command line to call the correct Python  
>> and passes in test data.  Once “RunExecutable” finishes, you need  
>> to check the output (for baseline or hash).
>>
>> -dan
>>
>> On 3/30/11 1:06 PM, "Bradley Lowekamp" <blowekamp at mail.nih.gov>  
>> wrote:
>>
>>> Dan,
>>>
>>> I would like to write a test just for python. I am not sure how to  
>>> do it with our current testing frame work. Can you provide some  
>>> insight?
>>>
>>> Thanks,
>>> Brad
>>>
>>> ========================================================
>>>
>>> Bradley Lowekamp
>>>
>>> Lockheed Martin Contractor for
>>>
>>> Office of High Performance Computing and Communications
>>>
>>> National Library of Medicine
>>>
>>> blowekamp at mail.nih.gov
>>>
>>>
>>>
>>
>> -- 
>> Daniel Blezek, PhD
>> Medical Imaging Informatics Innovation Center
>>
>> P 127 or (77) 8 8886
>> T 507 538 8886
>> E blezek.daniel at mayo.edu
>>
>> Mayo Clinic
>> 200 First St. S.W.
>> Harwick SL-44
>> Rochester, MN 55905
>> mayoclinic.org
>> "It is more complicated than you think." -- RFC 1925
>
> ========================================================
> Bradley Lowekamp
> Lockheed Martin Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine
> blowekamp at mail.nih.gov
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110331/ef8c6c98/attachment.pgp>


More information about the Insight-developers mailing list