diff --git a/CMakeLists.txt b/CMakeLists.txt index d9664998..aa534192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(DIAGPathology) SET(CURRENT_MAJOR_VERSION 1) SET(CURRENT_MINOR_VERSION 7) -SET(CURRENT_PATCH_VERSION 0) +SET(CURRENT_PATCH_VERSION 1) set(ASAP_VERSION ${CURRENT_MAJOR_VERSION}.${CURRENT_MINOR_VERSION}.${CURRENT_PATCH_VERSION}) include (GenerateExportHeader) diff --git a/io/multiresolutionimageinterface/TIFFImage.cpp b/io/multiresolutionimageinterface/TIFFImage.cpp index 0f32b156..768e2d2a 100644 --- a/io/multiresolutionimageinterface/TIFFImage.cpp +++ b/io/multiresolutionimageinterface/TIFFImage.cpp @@ -25,6 +25,14 @@ bool TIFFImage::initializeType(const std::string& imagePath) { TIFFSetErrorHandler(NULL); if (_tiff) { + const char * img_desc; + TIFFGetField(_tiff, TIFFTAG_IMAGEDESCRIPTION, &img_desc); + std::string img_desc_string(img_desc); + if (img_desc_string.find("xml") != std::string::npos || img_desc_string.find("XML") != std::string::npos) { + // Not one of our TIFFs + cleanup(); + return false; + } unsigned int cType = 0, dType = 0, planarconfig=0, bitsPerSample = 0; TIFFGetField(_tiff, TIFFTAG_PHOTOMETRIC, &cType);