TubeTK/Developers FAQ: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 14: Line 14:


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


Line 55: Line 55:


<code>
<code>
> 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_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-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/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_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-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/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/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
:> tubetk/Base/Filtering/itkTubeLDAGenerator.txx:572: note: synthesized method ‘vnl_matrix_inverse<double>::vnl_matrix_inverse(const vnl_matrix_inverse<double>&)’ first required here
</code>
</code>


Line 75: Line 75:
** http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
** http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
** http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/C_002b_002b-Dialect-Options.html
** http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/C_002b_002b-Dialect-Options.html
[[Category:TubeTK|Developers FAQ]]

Latest revision as of 18:42, 26 July 2013

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

Then it is likely that are not using 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? We strongly recommend that you have TubeTK build its own versions of ITK and VTK.

What are the recommended compilation options