TubeTK/Developers FAQ

From KitwarePublic
Jump to navigationJump to search

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.

I've got build errors!

Don't Panic!

Errors when compiling "Insight"

If you get build errors similar to:
> tubetk-Release/Insight/Utilities/vxl/core/vnl/algo/vnl_svd.h: In copy constructor ‘vnl_matrix_inverse<double>::vnl_matrix_inverse(const vnl_matrix_inverse<double>&)’:
> tubetk-Release/Insight/Utilities/vxl/core/vnl/algo/vnl_matrix_inverse.h:35: instantiated from ‘void itk::tube::LDAGenerator<ImageT, LabelmapT>::GenerateLDA() [with ImageT = itk::Image<float, 2u>, LabelmapT = itk::Image<unsigned char, 2u>]’
> tubetk/Base/Filtering/itkTubeNJetLDAGenerator2F.cxx:53: instantiated from here
> tubetk-Release/Insight/Utilities/vxl/core/vnl/algo/vnl_svd.h:193: error: ‘vnl_svd<T>::vnl_svd(const vnl_svd<T>&) [with T = double]’ is private
> tubetk-Release/Insight/Utilities/vxl/core/vnl/algo/vnl_matrix_inverse.h:35: error: within this context
> tubetk/Base/Filtering/itkTubeLDAGenerator.txx: In member function ‘void itk::tube::LDAGenerator<ImageT, LabelmapT>::GenerateLDA() [with ImageT = itk::Image<float, 2u>, LabelmapT = itk::Image<unsigned char, 2u>]’:
> tubetk/Base/Filtering/itkTubeNJetLDAGenerator2F.cxx:53: instantiated from here
> tubetk/Base/Filtering/itkTubeLDAGenerator.txx:572: note: synthesized method ‘vnl_matrix_inverse<double>::vnl_matrix_inverse(const vnl_matrix_inverse<double>&)’ first required here

you likely do not have the correct version of ITK. Perhaps you have ITK from the official ITK repository instead of from 3D Slicer, or perhaps you haven't fetched updates lately?

  • Generally, unless you are modifying ITK or VTK yourself, it is simpler to have TubeTK build its own versions of ITK and VTK.

What are the recommended compilation options