diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/mkg3states.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/mkg3states.c index 1df9ccc5f6c..58d07992da1 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/mkg3states.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/mkg3states.c @@ -29,7 +29,7 @@ * in Frank Cringle's viewfax program; * Copyright (C) 1990, 1995 Frank D. Cringle. */ -#include "tif_config.h" +#include "itk_tif_config.h" #include #include diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_config.h.in b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_config.h.in index b2cea3546f7..ce70dc76263 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_config.h.in +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_config.h.in @@ -1,43 +1,52 @@ -/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */ +/* libtiff/itk_tif_config.h.in. Generated from configure.ac by autoheader. */ +#ifndef __itk_tif_config_h +#define __itk_tif_config_h + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ + +#include /* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD +#if defined(__APPLE__) +#define AC_APPLE_UNIVERSAL_BUILD +#endif /* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT +#define CCITT_SUPPORT 1 /* Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING +#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING /* enable partial strip reading for large strips (experimental) */ #undef CHUNKY_STRIP_READ_SUPPORT /* Support C++ stream API (requires C++ compiler) */ -#undef CXX_SUPPORT +#cmakedefine CXX_SUPPORT /* Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly. */ -#undef DEFAULT_EXTRASAMPLE_AS_ALPHA +#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA /* enable deferred strip/tile offset/size loading (experimental) */ #undef DEFER_STRILE_LOAD /* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H +#cmakedefine HAVE_ASSERT_H @HAVE_ASSERT_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H +#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H +#cmakedefine HAVE_FCNTL_H @HAVE_FCNTL_H@ /* Define to 1 if you have the `floor' function. */ -#undef HAVE_FLOOR +#cmakedefine HAVE_FLOOR @HAVE_FLOOR@ /* Define to 1 if you have the `getopt' function. */ -#undef HAVE_GETOPT +#cmakedefine HAVE_GETOPT @HAVE_GETOPT@ /* Define to 1 if you have the header file. */ #undef HAVE_GLUT_GLUT_H @@ -53,25 +62,25 @@ /* Define as 0 or 1 according to the floating point format suported by the machine */ -#undef HAVE_IEEEFP +#define HAVE_IEEEFP 1 /* Define to 1 if the system has the type `int16'. */ -#undef HAVE_INT16 +#cmakedefine HAVE_INT16 /* Define to 1 if the system has the type `int32'. */ -#undef HAVE_INT32 +#cmakedefine HAVE_INT32 /* Define to 1 if the system has the type `int8'. */ -#undef HAVE_INT8 +#cmakedefine HAVE_INT8 /* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H +#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ /* Define to 1 if you have the header file. */ #undef HAVE_IO_H /* Define to 1 if you have the `isascii' function. */ -#undef HAVE_ISASCII +#cmakedefine HAVE_ISASCII @HAVE_ISASCII@ /* Define to 1 if you have the `jbg_newlen' function. */ #undef HAVE_JBG_NEWLEN @@ -79,26 +88,29 @@ /* Define to 1 if you have the `lfind' function. */ #undef HAVE_LFIND +/* Define to 1 if you have the `c' library (-lc). */ +#cmakedefine HAVE_LIBC + /* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM +#cmakedefine HAVE_LIBM /* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H +#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H +#cmakedefine HAVE_MALLOC_H @HAVE_MALLOC_H@ /* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE +#cmakedefine HAVE_MEMMOVE @HAVE_MEMMOVE@ /* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H +#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ /* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET +#cmakedefine HAVE_MEMSET @HAVE_MEMSET@ /* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP +#cmakedefine HAVE_MMAP @HAVE_MMAP@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENGL_GLU_H @@ -107,78 +119,90 @@ #undef HAVE_OPENGL_GL_H /* Define to 1 if you have the `pow' function. */ -#undef HAVE_POW +#cmakedefine HAVE_POW @HAVE_POW@ /* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD +#cmakedefine HAVE_PTHREAD /* Define to 1 if you have the header file. */ -#undef HAVE_SEARCH_H +#cmakedefine HAVE_SEARCH_H /* Define to 1 if you have the `setmode' function. */ #undef HAVE_SETMODE /* Define to 1 if you have the `sqrt' function. */ -#undef HAVE_SQRT - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H +#cmakedefine HAVE_SQRT @HAVE_SQRT@ /* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H +#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ /* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP +#cmakedefine HAVE_STRCASECMP @HAVE_STRCASECMP@ /* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR +#cmakedefine HAVE_STRCHR @HAVE_STRCHR@ /* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H +#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H +#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ /* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR +#cmakedefine HAVE_STRRCHR @HAVE_STRRCHR@ /* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR +#cmakedefine HAVE_STRSTR @HAVE_STRSTR@ /* Define to 1 if you have the `strtol' function. */ -#undef HAVE_STRTOL +#cmakedefine HAVE_STRTOL @HAVE_STRTOL@ /* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define to 1 if you have the `strtoull' function. */ -#undef HAVE_STRTOULL +#cmakedefine HAVE_STRTOUL @HAVE_STRTOUL@ /* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H +#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_TIME_H @HAVE_SYS_TIME_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H +#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Use nonstandard varargs form for the GLU tesselator callback */ -#undef HAVE_VARARGS_GLU_TESSCB +#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ /* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H +#cmakedefine HAVE_WINDOWS_H @HAVE_WINDOWS_H@ + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ + #define WORDS_BIGENDIAN 1 +# endif +#else + #cmakedefine WORDS_BIGENDIAN +#endif + /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ #undef HOST_BIGENDIAN - /* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ #undef HOST_FILLORDER +#ifdef WORDS_BIGENDIAN +# define HOST_BIGENDIAN 1 +# define HOST_FILLORDER FILLORDER_LSB2MSB +#else +# define HOST_BIGENDIAN 0 +# define HOST_FILLORDER FILLORDER_MSB2LSB +#endif + + + /* Support ISO JBIG compression (requires JBIG-KIT library) */ #undef JBIG_SUPPORT @@ -186,13 +210,13 @@ #undef JPEG_DUAL_MODE_8_12 /* Support JPEG compression (requires IJG JPEG library) */ -#undef JPEG_SUPPORT +#cmakedefine JPEG_SUPPORT @JPEG_SUPPORT@ /* 12bit libjpeg primary include file with path */ #undef LIBJPEG_12_PATH /* Support LogLuv high dynamic range encoding */ -#undef LOGLUV_SUPPORT +#define LOGLUV_SUPPORT 1 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -202,194 +226,209 @@ #undef LZMA_SUPPORT /* Support LZW algorithm */ -#undef LZW_SUPPORT +#define LZW_SUPPORT 1 /* Support Microsoft Document Imaging format */ #undef MDI_SUPPORT /* Support NeXT 2-bit RLE algorithm */ -#undef NEXT_SUPPORT +#define NEXT_SUPPORT 1 /* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O +#cmakedefine NO_MINUS_C_MINUS_O -/* Support Old JPEG compresson (read-only) */ -#undef OJPEG_SUPPORT +/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation + fails with unpatched IJG JPEG library) */ +#cmakedefine OJPEG_SUPPORT /* Name of package */ -#undef PACKAGE +#cmakedefine PACKAGE /* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT +#cmakedefine PACKAGE_BUGREPORT /* Define to the full name of this package. */ -#undef PACKAGE_NAME +#cmakedefine PACKAGE_NAME /* Define to the full name and version of this package. */ -#undef PACKAGE_STRING +#cmakedefine PACKAGE_STRING /* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME +#cmakedefine PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ -#undef PACKAGE_VERSION +#cmakedefine PACKAGE_VERSION /* Support Macintosh PackBits algorithm */ -#undef PACKBITS_SUPPORT +#define PACKBITS_SUPPORT 1 /* Support Pixar log-format algorithm (requires Zlib) */ -#undef PIXARLOG_SUPPORT +#cmakedefine PIXARLOG_SUPPORT -/* Define to necessary symbol if this constant uses a non-standard name on +/* Define to the necessary symbol if this constant uses a non-standard name on your system. */ -#undef PTHREAD_CREATE_JOINABLE +#cmakedefine PTHREAD_CREATE_JOINABLE /* The size of `signed int', as computed by sizeof. */ -#undef SIZEOF_SIGNED_INT +#define SIZEOF_SIGNED_INT @SIZEOF_INT@ /* The size of `signed long', as computed by sizeof. */ -#undef SIZEOF_SIGNED_LONG +#define SIZEOF_SIGNED_LONG @SIZEOF_LONG@ /* The size of `signed long long', as computed by sizeof. */ #undef SIZEOF_SIGNED_LONG_LONG /* The size of `signed short', as computed by sizeof. */ -#undef SIZEOF_SIGNED_SHORT +#define SIZEOF_SIGNED_SHORT @SIZEOF_SHORT@ /* The size of `unsigned char *', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_CHAR_P /* The size of `unsigned int', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_INT +#define SIZEOF_UNSIGNED_INT @SIZEOF_INT@ /* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG @SIZEOF_LONG@ + +/* On Apple, universal builds use different settings on each build. +the sizes can be different.*/ +#if defined(__APPLE__) +#undef SIZEOF_SIGNED_LONG +# if defined(__LP64__) && __LP64__ +# define SIZEOF_SIGNED_LONG 8 +# else +# define SIZEOF_SIGNED_LONG 4 +# endif #undef SIZEOF_UNSIGNED_LONG +# if defined(__LP64__) && __LP64__ +# define SIZEOF_UNSIGNED_LONG 8 +# else +# define SIZEOF_UNSIGNED_LONG 4 +# endif +#endif /* The size of `unsigned long long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG_LONG +#define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_LONG@ /* The size of `unsigned short', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_SHORT +#define SIZEOF_UNSIGNED_SHORT @SIZEOF_SHORT@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +#cmakedefine STDC_HEADERS /* Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage) */ -#undef STRIPCHOP_DEFAULT +#cmakedefine STRIPCHOP_DEFAULT /* Default size of the strip in bytes (when strip chopping enabled) */ #undef STRIP_SIZE_DEFAULT /* Enable SubIFD tag (330) support */ -#undef SUBIFD_SUPPORT +#cmakedefine SUBIFD_SUPPORT /* Support ThunderScan 4-bit RLE algorithm */ -#undef THUNDER_SUPPORT +#cmakedefine THUNDER_SUPPORT /* Signed 16-bit type */ #undef TIFF_INT16_T +#define TIFF_INT16_T int16_t /* Signed 32-bit type formatter */ -#undef TIFF_INT32_FORMAT +#define TIFF_INT32_FORMAT "%d" /* Signed 32-bit type */ #undef TIFF_INT32_T +#define TIFF_INT32_T int32_t /* Signed 64-bit type formatter */ -#undef TIFF_INT64_FORMAT +#define TIFF_INT64_FORMAT "%ld" /* Signed 64-bit type */ #undef TIFF_INT64_T +#define TIFF_INT64_T int64_t /* Signed 8-bit type */ #undef TIFF_INT8_T +#define TIFF_INT8_T int8_t /* Pointer difference type formatter */ -#undef TIFF_PTRDIFF_FORMAT +#define TIFF_PTRDIFF_FORMAT "%ld" /* Pointer difference type */ #undef TIFF_PTRDIFF_T /* Signed size type formatter */ -#undef TIFF_SSIZE_FORMAT +#define TIFF_SSIZE_FORMAT "%zd" /* Signed size type */ #undef TIFF_SSIZE_T +#define TIFF_SSIZE_T intptr_t /* Unsigned 16-bit type */ #undef TIFF_UINT16_T +#define TIFF_UINT16_T uint16_t /* Unsigned 32-bit type formatter */ -#undef TIFF_UINT32_FORMAT +#define TIFF_UINT32_FORMAT "%d" /* Unsigned 32-bit type */ #undef TIFF_UINT32_T +#define TIFF_UINT32_T uint32_t /* Unsigned 64-bit type formatter */ -#undef TIFF_UINT64_FORMAT +#define TIFF_UINT64_FORMAT "%ld" /* Unsigned 64-bit type */ #undef TIFF_UINT64_T +#define TIFF_UINT64_T uint64_t /* Unsigned 8-bit type */ #undef TIFF_UINT8_T +#define TIFF_UINT8_T uint8_t /* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME +#cmakedefine TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME +#cmakedefine TM_IN_SYS_TIME /* define to use win32 IO system */ #undef USE_WIN32_FILEIO /* Version number of package */ -#undef VERSION - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +#cmakedefine VERSION /* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING +#cmakedefine X_DISPLAY_MISSING /* Support Deflate compression */ -#undef ZIP_SUPPORT - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif +#cmakedefine ZIP_SUPPORT /* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS +#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@ /* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES +#cmakedefine _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ -#undef const +#cmakedefine const -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ +/* MSVC does not support C99 inline, so just make the inline keyword + disappear for C. */ #ifndef __cplusplus -#undef inline +# ifdef _MSC_VER +# define inline +# endif #endif /* Define to `long int' if does not define. */ -#undef off_t +#cmakedefine off_t /* Define to `unsigned int' if does not define. */ -#undef size_t +#cmakedefine size_t + +#endif diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_dirread.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_dirread.c index 19a26e27882..f7ba334d3df 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_dirread.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_dirread.c @@ -3538,9 +3538,12 @@ TIFFReadDirectory(TIFF* tif) TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); if (fii == FAILED_FII) { - TIFFWarningExt(tif->tif_clientdata, module, - "Unknown field with tag %d (0x%x) encountered", - dp->tdir_tag,dp->tdir_tag); + if (tif->tif_flags&TIFF_WARNABOUTUNKNOWNTAGS) + { + TIFFWarningExt(tif->tif_clientdata, module, + "Unknown field with tag %d (0x%x) encountered", + dp->tdir_tag,dp->tdir_tag); + } /* the following knowingly leaks the anonymous field structure */ if (!_TIFFMergeFields(tif, @@ -4181,16 +4184,22 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); if (fii == FAILED_FII) { - TIFFWarningExt(tif->tif_clientdata, module, - "Unknown field with tag %d (0x%x) encountered", - dp->tdir_tag, dp->tdir_tag); + if (tif->tif_flags&TIFF_WARNABOUTUNKNOWNTAGS) + { + TIFFWarningExt(tif->tif_clientdata, module, + "Unknown field with tag %d (0x%x) encountered", + dp->tdir_tag, dp->tdir_tag); + } if (!_TIFFMergeFields(tif, _TIFFCreateAnonField(tif, dp->tdir_tag, (TIFFDataType) dp->tdir_type), 1)) { - TIFFWarningExt(tif->tif_clientdata, module, - "Registering anonymous field with tag %d (0x%x) failed", - dp->tdir_tag, dp->tdir_tag); + if (tif->tif_flags&TIFF_WARNABOUTUNKNOWNTAGS) + { + TIFFWarningExt(tif->tif_clientdata, module, + "Registering anonymous field with tag %d (0x%x) failed", + dp->tdir_tag, dp->tdir_tag); + } dp->tdir_tag=IGNORE; } else { TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_jpeg.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_jpeg.c index b61b91b0dcc..78d4b8fc566 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_jpeg.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_jpeg.c @@ -85,8 +85,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); # define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #endif -#include "jpeglib.h" -#include "jerror.h" +#include "itk_jpeg.h" /* * Do we want to do special processing suitable for when JSAMPLE is a diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_open.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_open.c index 8c88328cf28..5c78a101733 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_open.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_open.c @@ -264,6 +264,9 @@ TIFFClientOpen( if (m&O_CREAT) tif->tif_flags |= TIFF_BIGTIFF; break; + case 'W': + tif->tif_flags |= TIFF_WARNABOUTUNKNOWNTAGS; + break; } /* * Read in TIFF header. diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_predict.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_predict.c index f93c6645f0f..892385a4faa 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_predict.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_predict.c @@ -391,7 +391,7 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc) for (count = 0; count < wc; count++) { uint32 byte; for (byte = 0; byte < bps; byte++) { - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN cp[bps * count + byte] = tmp[byte * wc + count]; #else cp[bps * count + byte] = @@ -560,7 +560,7 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc) for (count = 0; count < wc; count++) { uint32 byte; for (byte = 0; byte < bps; byte++) { - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN cp[byte * wc + count] = tmp[bps * count + byte]; #else cp[(bps - byte - 1) * wc + count] = diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_swab.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_swab.c index f37e33f1c99..dcc8a9eae05 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_swab.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_swab.c @@ -31,7 +31,6 @@ */ #include "tiffiop.h" -#ifndef TIFFSwabShort void TIFFSwabShort(uint16* wp) { @@ -40,9 +39,7 @@ TIFFSwabShort(uint16* wp) assert(sizeof(uint16)==2); t = cp[1]; cp[1] = cp[0]; cp[0] = t; } -#endif -#ifndef TIFFSwabLong void TIFFSwabLong(uint32* lp) { @@ -52,9 +49,7 @@ TIFFSwabLong(uint32* lp) t = cp[3]; cp[3] = cp[0]; cp[0] = t; t = cp[2]; cp[2] = cp[1]; cp[1] = t; } -#endif -#ifndef TIFFSwabLong8 void TIFFSwabLong8(uint64* lp) { @@ -66,9 +61,7 @@ TIFFSwabLong8(uint64* lp) t = cp[5]; cp[5] = cp[2]; cp[2] = t; t = cp[4]; cp[4] = cp[3]; cp[3] = t; } -#endif -#ifndef TIFFSwabArrayOfShort void TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) { @@ -82,9 +75,7 @@ TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) wp++; } } -#endif -#ifndef TIFFSwabArrayOfTriples void TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) { @@ -98,9 +89,7 @@ TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) tp += 3; } } -#endif -#ifndef TIFFSwabArrayOfLong void TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) { @@ -115,9 +104,7 @@ TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) lp++; } } -#endif -#ifndef TIFFSwabArrayOfLong8 void TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) { @@ -134,9 +121,7 @@ TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) lp++; } } -#endif -#ifndef TIFFSwabFloat void TIFFSwabFloat(float* fp) { @@ -146,9 +131,7 @@ TIFFSwabFloat(float* fp) t = cp[3]; cp[3] = cp[0]; cp[0] = t; t = cp[2]; cp[2] = cp[1]; cp[1] = t; } -#endif -#ifndef TIFFSwabArrayOfFloat void TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) { @@ -163,9 +146,7 @@ TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) fp++; } } -#endif -#ifndef TIFFSwabDouble void TIFFSwabDouble(double *dp) { @@ -177,9 +158,7 @@ TIFFSwabDouble(double *dp) t = cp[5]; cp[5] = cp[2]; cp[2] = t; t = cp[4]; cp[4] = cp[3]; cp[3] = t; } -#endif -#ifndef TIFFSwabArrayOfDouble void TIFFSwabArrayOfDouble(double* dp, tmsize_t n) { @@ -196,7 +175,6 @@ TIFFSwabArrayOfDouble(double* dp, tmsize_t n) dp++; } } -#endif /* * Bit reversal tables. TIFFBitRevTable[] gives diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_unix.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_unix.c index 1387558fbab..b17744ab0c2 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_unix.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_unix.c @@ -29,7 +29,7 @@ * Windows Common RunTime Library. */ -#include "tif_config.h" +#include "itk_tif_config.h" #ifdef HAVE_SYS_TYPES_H # include diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_zip.c b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_zip.c index f5aa2a9647a..45bf7d1bf7c 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_zip.c +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tif_zip.c @@ -47,7 +47,7 @@ * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. */ #include "tif_predict.h" -#include "zlib.h" +#include "itk_zlib.h" #include diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiff.h b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiff.h index 19b4e7976d4..311e9bfbc18 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiff.h +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiff.h @@ -27,7 +27,8 @@ #ifndef _TIFF_ #define _TIFF_ -#include "tiffconf.h" +#include "itk_tiff_mangle.h" +#include "itk_tif_config.h" /* * Tag Image File Format (TIFF) diff --git a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiffiop.h b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiffiop.h index 53357d85290..4451dc2c540 100644 --- a/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiffiop.h +++ b/Modules/ThirdParty/TIFF/src/itktiff/libtiff/tiffiop.h @@ -30,7 +30,7 @@ * ``Library-private'' definitions. */ -#include "tif_config.h" +#include "itk_tif_config.h" #ifdef HAVE_FCNTL_H # include @@ -122,6 +122,7 @@ struct tiff { #define TIFF_DIRTYSTRIP 0x200000 /* stripoffsets/stripbytecount dirty*/ #define TIFF_PERSAMPLE 0x400000 /* get/set per sample tags as arrays */ #define TIFF_BUFFERMMAP 0x800000 /* read buffer (tif_rawdata) points into mmap() memory */ + #define TIFF_WARNABOUTUNKNOWNTAGS 0x1000000 /* emit a warning when encountering a unknown tag */ uint64 tif_diroff; /* file offset of current directory */ uint64 tif_nextdiroff; /* file offset of following directory */ uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */