GDCM: modified compilation scheme
authorMaksim Shabunin <maksim.shabunin@itseez.com>
Thu, 7 Jul 2016 09:33:24 +0000 (12:33 +0300)
committerMaksim Shabunin <maksim.shabunin@itseez.com>
Fri, 8 Jul 2016 13:08:55 +0000 (16:08 +0300)
- renamed source files
- guard the contents - always include

modules/imgcodecs/CMakeLists.txt
modules/imgcodecs/src/grfmt_gdcm.cpp [moved from modules/imgcodecs/src/gdcm_dicom.cpp with 99% similarity]
modules/imgcodecs/src/grfmt_gdcm.hpp [moved from modules/imgcodecs/src/gdcm_dicom.hpp with 98% similarity]
modules/imgcodecs/src/grfmts.hpp
modules/imgcodecs/src/loadsave.cpp

index 1c7cc25..c614d79 100644 (file)
@@ -63,11 +63,6 @@ endif()
 file(GLOB grfmt_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/grfmt*.hpp)
 file(GLOB grfmt_srcs ${CMAKE_CURRENT_LIST_DIR}/src/grfmt*.cpp)
 
-if(HAVE_GDCM)
-  list(APPEND grfmt_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/gdcm_dicom.hpp)
-  list(APPEND grfmt_srcs ${CMAKE_CURRENT_LIST_DIR}/src/gdcm_dicom.cpp)
-endif()
-
 list(APPEND grfmt_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/bitstrm.hpp)
 list(APPEND grfmt_srcs ${CMAKE_CURRENT_LIST_DIR}/src/bitstrm.cpp)
 list(APPEND grfmt_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/rgbe.hpp)
similarity index 99%
rename from modules/imgcodecs/src/gdcm_dicom.cpp
rename to modules/imgcodecs/src/grfmt_gdcm.cpp
index 58e38b9..7aecf35 100644 (file)
@@ -41,7 +41,9 @@
 //M*/
 
 #include "precomp.hpp"
-#include "gdcm_dicom.hpp"
+#include "grfmt_gdcm.hpp"
+
+#ifdef HAVE_GDCM
 
 #include <gdcmImageReader.h>
 
@@ -214,3 +216,5 @@ bool  DICOMDecoder::readData( Mat& csImage )
     return(bOK);
 }
 }
+
+#endif
\ No newline at end of file
similarity index 98%
rename from modules/imgcodecs/src/gdcm_dicom.hpp
rename to modules/imgcodecs/src/grfmt_gdcm.hpp
index c9c5c23..8a8e100 100644 (file)
 #ifndef _GDCM_DICOM_H_
 #define _GDCM_DICOM_H_
 
+#include "cvconfig.h"
+
+#ifdef HAVE_GDCM
+
 #include "grfmt_base.hpp"
 
 namespace cv
@@ -68,4 +72,6 @@ protected:
 
 }
 
+#endif
+
 #endif/*_GDCM_DICOM_H_*/
index c9e3153..7db1ac9 100644 (file)
@@ -54,5 +54,6 @@
 #include "grfmt_webp.hpp"
 #include "grfmt_hdr.hpp"
 #include "grfmt_gdal.hpp"
+#include "grfmt_gdcm.hpp"
 
 #endif/*_GRFMTS_H_*/
index c62b0bc..1c0b794 100644 (file)
@@ -45,9 +45,6 @@
 
 #include "precomp.hpp"
 #include "grfmts.hpp"
-#ifdef HAVE_GDCM
-#include "gdcm_dicom.hpp"
-#endif
 #undef min
 #undef max
 #include <iostream>