parent
6883366278
commit
eba51f5fdb
@ -0,0 +1,13 @@
|
||||
--- BUILD/gdcm-2.2.4/Utilities/VTK/CMakeLists.txt 2013-07-08 19:20:27.000000000 +0200
|
||||
+++ BUILD/gdcm-2.2.4.new/Utilities/VTK/CMakeLists.txt 2013-07-16 09:28:59.317107484 +0200
|
||||
@@ -2,6 +2,10 @@
|
||||
# We need VTK
|
||||
# Technically we require VTK 5.0 and above
|
||||
|
||||
+# To support VTK 6.0
|
||||
+include(${VTK_CMAKE_DIR}/vtkMakeInstantiator.cmake)
|
||||
+
|
||||
+
|
||||
# Define the src for the vtk-gdcm bridge
|
||||
SET(vtkgdcm_SRCS
|
||||
vtkGDCMTesting.cxx
|
@ -1,26 +0,0 @@
|
||||
diff -ru gdcm-2.0.16_orig/Utilities/VTK/Applications/CMakeLists.txt gdcm-2.0.16/Utilities/VTK/Applications/CMakeLists.txt
|
||||
--- gdcm-2.0.16_orig/Utilities/VTK/Applications/CMakeLists.txt 2010-08-18 12:25:43.000000000 +0200
|
||||
+++ gdcm-2.0.16/Utilities/VTK/Applications/CMakeLists.txt 2010-11-19 20:30:06.447787551 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
IF(GDCM_EXECUTABLE_PROPERTIES)
|
||||
SET_TARGET_PROPERTIES(${app} PROPERTIES ${GDCM_EXECUTABLE_PROPERTIES})
|
||||
ENDIF(GDCM_EXECUTABLE_PROPERTIES)
|
||||
- TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME})
|
||||
+ TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} gdcmMSFF)
|
||||
IF(VTK_USE_RENDERING)
|
||||
TARGET_LINK_LIBRARIES(${app} vtkRendering)
|
||||
|
||||
Only in gdcm-2.0.16/Utilities/VTK/Applications: CMakeLists.txt~
|
||||
diff -ru gdcm-2.0.16_orig/Utilities/VTK/Examples/Cxx/CMakeLists.txt gdcm-2.0.16/Utilities/VTK/Examples/Cxx/CMakeLists.txt
|
||||
--- gdcm-2.0.16_orig/Utilities/VTK/Examples/Cxx/CMakeLists.txt 2010-08-18 12:25:43.000000000 +0200
|
||||
+++ gdcm-2.0.16/Utilities/VTK/Examples/Cxx/CMakeLists.txt 2010-11-19 20:30:09.457709578 +0100
|
||||
@@ -40,7 +40,7 @@
|
||||
FOREACH(app ${GDCM_VTK_APPS})
|
||||
ADD_EXECUTABLE(${app} ${app}.cxx)
|
||||
#SET_TARGET_PROPERTIES(${app} PROPERTIES ${GDCM_EXECUTABLE_PROPERTIES})
|
||||
- TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} ${vtkgdcm_LIBS})
|
||||
+ TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} ${vtkgdcm_LIBS} gdcmMSFF)
|
||||
IF( "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}" GREATER 5.0 )
|
||||
IF(VTK_USE_RENDERING)
|
||||
TARGET_LINK_LIBRARIES(${app} vtkWidgets vtkVolumeRendering)
|
||||
Only in gdcm-2.0.16/Utilities/VTK/Examples/Cxx: CMakeLists.txt~
|
@ -1,11 +0,0 @@
|
||||
--- CMakeLists.txt.orig2 2010-11-22 11:43:24.258330997 +0100
|
||||
+++ CMakeLists.txt 2010-11-22 11:43:54.402331000 +0100
|
||||
@@ -191,7 +191,7 @@
|
||||
# Install directories
|
||||
|
||||
STRING(TOLOWER ${PROJECT_NAME} projectname)
|
||||
-SET(subdir "${projectname}-${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}")
|
||||
+SET(subdir "${projectname}")
|
||||
|
||||
IF(NOT GDCM_INSTALL_BIN_DIR)
|
||||
SET(GDCM_INSTALL_BIN_DIR "bin")
|
@ -1,62 +0,0 @@
|
||||
diff -up gdcm-2.0.18/Examples/Cxx/CMakeLists.txt.charls gdcm-2.0.18/Examples/Cxx/CMakeLists.txt
|
||||
--- gdcm-2.0.18/Examples/Cxx/CMakeLists.txt.charls 2011-06-29 01:08:45.000000000 -0600
|
||||
+++ gdcm-2.0.18/Examples/Cxx/CMakeLists.txt 2011-11-02 09:33:12.023845136 -0600
|
||||
@@ -107,7 +107,7 @@ ENDIF(GDCM_BUILD_TESTING)
|
||||
FOREACH(example ${EXAMPLES_SRCS})
|
||||
ADD_EXECUTABLE(${example} ${example}.cxx)
|
||||
IF(${example} STREQUAL "FixJAIBugJPEGLS")
|
||||
- TARGET_LINK_LIBRARIES(${example} gdcmMSFF gdcmcharls)
|
||||
+ TARGET_LINK_LIBRARIES(${example} gdcmMSFF ${GDCM_CHARLS_LIBRARIES})
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(${example} gdcmMSFF)
|
||||
ENDIF()
|
||||
diff -up gdcm-2.0.18/Examples/Cxx/FixJAIBugJPEGLS.cxx.charls gdcm-2.0.18/Examples/Cxx/FixJAIBugJPEGLS.cxx
|
||||
--- gdcm-2.0.18/Examples/Cxx/FixJAIBugJPEGLS.cxx.charls 2011-06-29 01:08:45.000000000 -0600
|
||||
+++ gdcm-2.0.18/Examples/Cxx/FixJAIBugJPEGLS.cxx 2011-11-02 09:15:59.630494712 -0600
|
||||
@@ -17,8 +17,7 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
-#include "gdcmcharls/stdafx.h"
|
||||
-#include "gdcmcharls/interface.h"
|
||||
+#include "gdcm_charls.h"
|
||||
|
||||
/*
|
||||
* This small example should show how one can handle the famous JAI-JPEGLS bug
|
||||
@@ -67,7 +66,11 @@ int main(int argc, char *argv[])
|
||||
char *buffer = &vbuffer[0];
|
||||
sf->GetBuffer(buffer, totalLen);
|
||||
|
||||
+#ifdef GDCM_USE_SYSTEM_CHARLS
|
||||
+ JlsParameters metadata;
|
||||
+#else
|
||||
JlsParamaters metadata;
|
||||
+#endif
|
||||
if (JpegLsReadHeader(buffer, totalLen, &metadata) != OK)
|
||||
{
|
||||
std::cerr << "Cant parse jpegls" << std::endl;
|
||||
@@ -156,15 +159,24 @@ int main(int argc, char *argv[])
|
||||
const char *pbyteCompressed = &vbuffer[0];
|
||||
unsigned int cbyteCompressed = vbuffer.size(); // updated legnth
|
||||
|
||||
+#ifdef GDCM_USE_SYSTEM_CHARLS
|
||||
+ JlsParameters params = {0};
|
||||
+#else
|
||||
JlsParamaters params = {0};
|
||||
+#endif
|
||||
JpegLsReadHeader(pbyteCompressed, cbyteCompressed, ¶ms);
|
||||
|
||||
std::vector<BYTE> rgbyteOut;
|
||||
//rgbyteOut.resize( image.GetBufferLength() );
|
||||
rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
|
||||
|
||||
+#ifdef GDCM_USE_SYSTEM_CHARLS
|
||||
+ JLS_ERROR result =
|
||||
+ JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, ¶ms );
|
||||
+#else
|
||||
JLS_ERROR result =
|
||||
JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed );
|
||||
+#endif
|
||||
if (result != OK)
|
||||
{
|
||||
std::cerr << "Could not patch JAI-JPEGLS" << std::endl;
|
Loading…
Reference in new issue