[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

itk and tiff



Ok, so itk is failing to build on big endian systems because of the TIFF
that is included with itk. I fixed this before, but it has come back. I
sent a patch upstream [1], and it has been merged and will probably be
in the next release. 

However, we should probably use the system TIFF. The reason we didn't
before was because it "requires version 4, but libvtk5-dev depends on
version 3" according to the notes in the rules file. But as far as I can
tell, libvtk5 no longer uses version 3.

There is a bug in itk when you enable system tiff, but I have attached a
patch and submitted it upstream [2]. With the patch, itk builds and
passes all the tests on my machine (amd64).

So, long story short, we should use system tiff
(-DITK_USE_SYSTEM_TIFF:BOOL=ON) and apply the attached patch. Or, not
use system tiff and use the patch in [1]. I vote for using system tiff.

-Paul

[1] http://review.source.kitware.com/9382
[2] http://review.source.kitware.com/9798
--- insighttoolkit4-4.3.1.orig/Modules/Compatibility/Deprecated/test/itkTestDriverIncludeDeprecatedIOFactories.h
+++ insighttoolkit4-4.3.1/Modules/Compatibility/Deprecated/test/itkTestDriverIncludeDeprecatedIOFactories.h
@@ -23,7 +23,10 @@
 #include "itkNiftiImageIOFactory.h"
 #include "itkGiplImageIOFactory.h"
 #include "itkJPEGImageIOFactory.h"
-#include "itkLSMImageIOFactory.h"
+#include "itk_tiff.h" // ITK_USE_SYSTEM_TIFF
+#ifndef ITK_USE_SYSTEM_TIFF
+#  include "itkLSMImageIOFactory.h"
+#endif // ITK_USE_SYSTEM_TIFF
 #include "itkMetaImageIOFactory.h"
 #include "itkPNGImageIOFactory.h"
 #include "itkNrrdImageIOFactory.h"
@@ -43,7 +46,9 @@
   itk::ObjectFactoryBase::RegisterFactory( itk::PNGImageIOFactory::New() );
   itk::ObjectFactoryBase::RegisterFactory( itk::VTKImageIOFactory::New() );
   itk::ObjectFactoryBase::RegisterFactory( itk::GiplImageIOFactory::New() );
+#ifndef ITK_USE_SYSTEM_TIFF
   itk::ObjectFactoryBase::RegisterFactory( itk::LSMImageIOFactory::New() );
+#endif // ITK_USE_SYSTEM_TIFF
   itk::ObjectFactoryBase::RegisterFactory( itk::NiftiImageIOFactory::New() );
   itk::ObjectFactoryBase::RegisterFactory( itk::JPEGImageIOFactory::New() );
   itk::ObjectFactoryBase::RegisterFactory( itk::TIFFImageIOFactory::New() );

Reply to: