TubeTK/Developers FAQ: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 20: Line 20:
</code>
</code>


= What should I know about storing testing data? =


== Input Images ==
= CMake/Build reports that it cannot find Git =


* Store input images in TubeTK/Data
* If CMake complains that it cannot find Git:
* Store all images in a compressed format.
** Toggle the 'Advanced' checkbox to ON
* Don't put baseline images in TubeTK/Data.
** Set the value of GIT_EXECUTABLE value to C:\Program Files (x86)\Git\bin\git.exe, or its equivalent on your system
** Press the 'Configure' button twice
** Toggle the 'Advanced' checkbox to OFF


== Test Baseline Images ==
= Missing libraries on build? =


* Baseline images should be stored with their tests.   We'd like to keep TubeTK's modules as portable and self-contained as possible. We'll share input data by placing it in TubeTK/Data, but data specific to a particular test (e.g., baseline images) should be stored with the test.  We've decided on the filesystem hierarchy
Confirm the following CMake variables
TubeTK/Applications/CLI/<myprogram>/Testing/Baselines
 
for storing the baseline images for the tests for myprogram.
* BUILD_TESTING: ON
* Don't put baseline images in TubeTK/Data.
* CMAKE_BUILD_TYPE: Specify Debug, Release, RelWithDebInfo or MinSizeRel
* TubeTK_USE_CTK: ON
* TubeTK_USE_QT: OFF
** If you have Qt 4.6.3 or greater installed, you can turn it on.
** If you do not have Qt, CMake will complain until you turn this option off.
* TubeTK_USE_SUPERBUILD: ON
** If "ON", then cmake will fetch and compile ITK and VTK from the Slicer git repository, and will fetch and compile TCLAP, ModuleDescriptionParser, and GenerateCLP from the Slicer3 svn repository
* TubeTK_USE_VTK: ON
* USE_SYSTEM_ITK: OFF
** If "ON", then you can tell TubeTK to use an ITK build that is already present on your system (using the CMake variable ITK_DIR).  See the warning below.
* USE_SYSTEM_VTK: OFF
** If "ON", then you can tell TubeTK to use a VTK build that is already present on your system (using the CMake variable VTK_DIR).  See the warning below.

Revision as of 13:13, 14 June 2012

How do I enter equations in the Wiki?

How do I do coverage and profiling on linux?

How do I write compressed images?

ITK, regretfully, doesn't write compressed images by default. You must add one line to your code, to write compressed images:

typename ImageWriterType::Pointer writer = ImageWriterType::New();
writer->SetFileName( outputVolume.c_str() );
writer->SetInput( cropFilter.GetOutput() );
writer->SetUseCompression( true );                             // ADD THIS LINE


CMake/Build reports that it cannot find Git

  • If CMake complains that it cannot find Git:
    • Toggle the 'Advanced' checkbox to ON
    • Set the value of GIT_EXECUTABLE value to C:\Program Files (x86)\Git\bin\git.exe, or its equivalent on your system
    • Press the 'Configure' button twice
    • Toggle the 'Advanced' checkbox to OFF

Missing libraries on build?

Confirm the following CMake variables

  • BUILD_TESTING: ON
  • CMAKE_BUILD_TYPE: Specify Debug, Release, RelWithDebInfo or MinSizeRel
  • TubeTK_USE_CTK: ON
  • TubeTK_USE_QT: OFF
    • If you have Qt 4.6.3 or greater installed, you can turn it on.
    • If you do not have Qt, CMake will complain until you turn this option off.
  • TubeTK_USE_SUPERBUILD: ON
    • If "ON", then cmake will fetch and compile ITK and VTK from the Slicer git repository, and will fetch and compile TCLAP, ModuleDescriptionParser, and GenerateCLP from the Slicer3 svn repository
  • TubeTK_USE_VTK: ON
  • USE_SYSTEM_ITK: OFF
    • If "ON", then you can tell TubeTK to use an ITK build that is already present on your system (using the CMake variable ITK_DIR). See the warning below.
  • USE_SYSTEM_VTK: OFF
    • If "ON", then you can tell TubeTK to use a VTK build that is already present on your system (using the CMake variable VTK_DIR). See the warning below.