Difference between revisions of "Documentation/Nightly/Developers/Tutorials/UploadTestData"

From Slicer Wiki
Jump to: navigation, search
m (Created page with '= Introduction = Slicer has adopted [http://slicer.kitware.com/midas3 MIDAS] to store testing and algorithm validation dataset. For this purpose, we have created a dedicated [ht…')
 
m
Line 13: Line 13:
 
{{note}} Each time a  release of Slicer is done, for both the <code>Application</code> and <code>Modules/&lt;ModuleName&gt;<code> folders, the current <code>Nightly</code> is copied into an <code>X.Y</code> folders where X and Y corresponds to the major and minor release number of Slicer.
 
{{note}} Each time a  release of Slicer is done, for both the <code>Application</code> and <code>Modules/&lt;ModuleName&gt;<code> folders, the current <code>Nightly</code> is copied into an <code>X.Y</code> folders where X and Y corresponds to the major and minor release number of Slicer.
  
Test data are expected to be stored in folders likes:
+
Test data are expected to be stored in folders like:
  
 
* Nightly/Testing/Baseline
 
* Nightly/Testing/Baseline
Line 22: Line 22:
 
#'''Input data folder''': Used to store testing input data.
 
#'''Input data folder''': Used to store testing input data.
 
#'''Baseline dataset folder''': Used to store the baseline images for regression tests.
 
#'''Baseline dataset folder''': Used to store the baseline images for regression tests.
 
= How to add a new tubetk test =
 
 
#If the input data is not already in Midas,
 
##Upload the data to the "Data" folder
 
##Download the key file (*.md5) and store it in the MIDAS_KEYS directory at the top level of tubetk source code tree
 
#Add baseline dataset for the new test ( if your test is a regression testing )
 
##Upload the dataset to the appropriate CLI or module folder. If your test is part of a new "module" or CLI, create a new a folder in MIDAS and then upload the dataset
 
##Download the key file  (*.md5) for the baseline image and store it in the MIDAS_KEYS directory.
 
#Modify cmake list files in the Testing directory to "add" unit tests to use the data from MIDAS.
 
##Use MIDAS_FETCH_ONLY macro, if you would like to fetch the dataset but not use it directly in the test
 
##Use MIDAS_DIRECTORY, if you would like to specify a whole directory as an input command line argument to your test
 
 
Examples:
 
 
Test using a data store in MIDAS
 
 
MIDAS_ADD_TEST( ${PROJECT_NAME}MIDAS-Test4
 
            ${PROJ_EXE}
 
            MIDAS{SyntheticTubePlusSurfaceImage_oriented.mha.md5}
 
            ${TEMP}/SyntheticTubePlusSurfaceEEDFilterResultImage_oriented.mha )
 
 
Test with a directory as input argument: DICOMSeries
 
 
MIDAS_ADD_TEST( ${PROJECT_NAME}MIDAS-Test1
 
            ${PROJ_EXE}
 
              -i
 
              -r
 
              -a Test1 001
 
              -w
 
              -o ${TEMP}
 
              -b DSC_
 
              MIDAS_DIRECTORY{DICOMSeries} )
 
 
Test that demonstrates fetch only option: tubeEdgeEnhancingAnisotropicDiffusionMIDAS-Test1
 
 
MIDAS_ADD_TEST( ${PROJECT_NAME}MIDAS-Test1
 
            ${PROJ_EXE}
 
              MIDAS{CroppedWholeLungCTScan.mhd.md5}
 
              ${TEMP}/itkAnisotropicEdgeEnhancingDiffusionImageFilterTest.mha
 
              MIDAS_FETCH_ONLY{CroppedWholeLungCTScan.raw.md5}
 
              )
 
 
When setting up test dependencies in your CMakeLists.txt files describing the tests, use something like:
 
 
  set_property(TEST ${PROJECT_NAME}-TestSphereNoReg-Compare
 
                      APPEND PROPERTY DEPENDS ${PROJECT_NAME}-TestSphereNoReg )
 
 
= MIDAS macro =
 
The following are the essential midas macros for setting up a test using data stored in midas.
 
#[http://www.kitware.com/midaswiki/index.php/MIDAS%2BCTest#How_to_create_a_test_that_will_download_and_use_MIDAS-hosted_data MIDAS_ADD_TEST]
 
#[http://www.kitware.com/midaswiki/index.php/MIDAS%2BCTest#MIDAS_TGZ_option MIDAS_TGZ ]
 
#[http://www.kitware.com/midaswiki/index.php/MIDAS%2BCTest#MIDAS_FETCH_ONLY_option MIDAS_FETCH ONLY]
 
#[http://www.kitware.com/midaswiki/index.php/MIDAS%2BCTest#MIDAS_DIRECTORY_option MIDAS_DIRECTORY]
 

Revision as of 15:49, 5 November 2012

Home < Documentation < Nightly < Developers < Tutorials < UploadTestData

Introduction

Slicer has adopted MIDAS to store testing and algorithm validation dataset. For this purpose, we have created a dedicated NA-MIC MIDAS community

In the NA-MIC community Slicer/Data folder, you will find:

  • Application
  • Modules

To organize the test data based on Slicer major release, you will find sub folders like:

  • Nightly
  • 4.2.

Note Each time a release of Slicer is done, for both the Application and Modules/<ModuleName> folders, the current Nightly is copied into an X.Y folders where X and Y corresponds to the major and minor release number of Slicer.

Test data are expected to be stored in folders like:

  • Nightly/Testing/Baseline
  • Nightly/Testing/Input
  • X.Y/Testing/Baseline
  • X.Y/Testing/Input
  1. Input data folder: Used to store testing input data.
  2. Baseline dataset folder: Used to store the baseline images for regression tests.