[gdcm] Updated to new CharLs version
mrceresa
mrceresa at fedoraproject.org
Mon Feb 14 11:12:13 UTC 2011
commit fd8f86a35acd14c25557bd50c1bb2eae3ad91acb
Author: Mario Ceresa <mrceresa at gmail.com>
Date: Mon Feb 14 12:12:09 2011 +0100
Updated to new CharLs version
gdcm-2.0.16-JlsParameters.patch | 58 +++++++++++++++++++++++++++++++++++++++
gdcm-2.0.16-fix-decode.patch | 22 +++++++++++++++
gdcm-2.0.16-remove-stdafx.patch | 13 +++++++++
gdcm.spec | 19 +++++++++---
4 files changed, 107 insertions(+), 5 deletions(-)
---
diff --git a/gdcm-2.0.16-JlsParameters.patch b/gdcm-2.0.16-JlsParameters.patch
new file mode 100644
index 0000000..953b4e5
--- /dev/null
+++ b/gdcm-2.0.16-JlsParameters.patch
@@ -0,0 +1,58 @@
+diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+index 4d38bef..48a52ac 100644
+--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
++++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+@@ -72,7 +72,7 @@ bool JPEGLSCodec::GetHeaderInfo(std::istream &is, TransferSyntax &ts)
+ is.seekg(0, std::ios::beg);
+ is.read( dummy_buffer, buf_size);
+
+- JlsParamaters metadata;
++ JlsParameters metadata;
+ if (JpegLsReadHeader(dummy_buffer, buf_size, &metadata) != OK)
+ {
+ return false;
+@@ -160,7 +160,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+ sf->GetBuffer(buffer, totalLen);
+ //is.write(buffer, totalLen);
+
+- JlsParamaters metadata;
++ JlsParameters metadata;
+ if (JpegLsReadHeader(buffer, totalLen, &metadata) != OK)
+ {
+ return false;
+@@ -172,7 +172,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+ const BYTE* pbyteCompressed = (const BYTE*)buffer;
+ int cbyteCompressed = totalLen;
+
+- JlsParamaters params = {0};
++ JlsParameters params = {0};
+ JpegLsReadHeader(pbyteCompressed, cbyteCompressed, ¶ms);
+
+ std::vector<BYTE> rgbyteCompressed;
+@@ -216,7 +216,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+ // what if 0xd9 is never found ?
+ assert( totalLen > 0 && pbyteCompressed[totalLen-1] == 0xd9 );
+
+- JlsParamaters metadata;
++ JlsParameters metadata;
+ if (JpegLsReadHeader(mybuffer, totalLen, &metadata) != OK)
+ {
+ return false;
+@@ -228,7 +228,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+
+ int cbyteCompressed = totalLen;
+
+- JlsParamaters params = {0};
++ JlsParameters params = {0};
+ JpegLsReadHeader(pbyteCompressed, cbyteCompressed, ¶ms);
+
+ std::vector<BYTE> rgbyteCompressed;
+@@ -293,7 +293,7 @@ bool JPEGLSCodec::Code(DataElement const &in, DataElement &out)
+ {
+ const char *inputdata = input + dim * image_len; //bv->GetPointer();
+
+- JlsParamaters params = {};
++ JlsParameters params = {};
+ /*
+ The fields in JlsCustomParameters do not control lossy/lossless. They
+ provide the possiblity to tune the JPEG-LS internals for better compression
diff --git a/gdcm-2.0.16-fix-decode.patch b/gdcm-2.0.16-fix-decode.patch
new file mode 100644
index 0000000..7bbe85b
--- /dev/null
+++ b/gdcm-2.0.16-fix-decode.patch
@@ -0,0 +1,22 @@
+diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+index d51832f..4d38bef 100644
+--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
++++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+@@ -181,7 +181,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+ std::vector<BYTE> rgbyteOut;
+ rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
+
+- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
++ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, ¶ms);
+ ASSERT(result == OK);
+
+ delete[] buffer;
+@@ -237,7 +237,7 @@ bool JPEGLSCodec::Decode(DataElement const &in, DataElement &out)
+ std::vector<BYTE> rgbyteOut;
+ rgbyteOut.resize(params.height *params.width * ((params.bitspersample + 7) / 8) * params.components);
+
+- JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed);
++ JLS_ERROR result = JpegLsDecode(&rgbyteOut[0], rgbyteOut.size(), pbyteCompressed, cbyteCompressed, ¶ms);
+ ASSERT(result == OK);
+ bool r = true;
+
diff --git a/gdcm-2.0.16-remove-stdafx.patch b/gdcm-2.0.16-remove-stdafx.patch
new file mode 100644
index 0000000..7b85343
--- /dev/null
+++ b/gdcm-2.0.16-remove-stdafx.patch
@@ -0,0 +1,13 @@
+diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+index a44a2b1..d51832f 100644
+--- a/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
++++ b/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx
+@@ -19,7 +19,7 @@
+
+ // CharLS includes
+ #ifdef GDCM_USE_SYSTEM_EXPAT
+-#include "CharLS/stdafx.h" // sigh...
++//#include "CharLS/stdafx.h" // sigh...
+ #include "CharLS/interface.h"
+ #include "CharLS/util.h"
+ #include "CharLS/defaulttraits.h"
diff --git a/gdcm.spec b/gdcm.spec
index 986fd9c..5acfaef 100644
--- a/gdcm.spec
+++ b/gdcm.spec
@@ -11,7 +11,7 @@
Name: gdcm
Version: 2.0.16
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
Group: Development/Libraries
License: BSD
@@ -29,6 +29,9 @@ Patch3: gdcm-2.0.14-use_system_charls.patch
Patch4: gdcm-2.0.16-fix_dso_link.patch
Patch5: gdcm-2.0.16-remove_versioned_install_dir.patch
Patch6: gdcm-2.0.16-fix_ptrdiff.patch
+Patch7: gdcm-2.0.16-remove-stdafx.patch
+Patch8: gdcm-2.0.16-fix-decode.patch
+Patch9: gdcm-2.0.16-JlsParameters.patch
BuildRequires: cmake >= 2.6.0
BuildRequires: openssl-devel
@@ -39,7 +42,7 @@ BuildRequires: poppler-devel
BuildRequires: mesa-libOSMesa-devel
BuildRequires: fontconfig-devel
BuildRequires: doxygen
-BuildRequires: CharLS-devel
+BuildRequires: CharLS-devel >= 1.0
BuildRequires: texlive-latex
BuildRequires: graphviz
BuildRequires: python2-devel
@@ -86,6 +89,9 @@ used this library with python
%patch4 -p1
%patch5
%patch6 -p2
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
# Remove bundled utilities (we use Fedora's ones)
@@ -185,16 +191,19 @@ ctest .
#%{python_sitelib}/*
%changelog
+* Mon Feb 14 2011 Mario Ceresa <mrceresa at gmail.com> - 2.0.16-13
+- Adapted to new version of CharLS lib (v 1.0)
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.16-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-* Mon Feb 2 2011 Mario Ceresa <mrceresa at gmail.com> 2.0.16-11
+* Mon Feb 02 2011 Mario Ceresa <mrceresa at gmail.com> - 2.0.16-11
- Removed python bindings because they fail to build with gcc 4.6
-* Mon Feb 2 2011 Mario Ceresa <mrceresa at gmail.com> 2.0.16-10
+* Mon Feb 02 2011 Mario Ceresa <mrceresa at gmail.com> - 2.0.16-10
- Added patch to fix upstream bug #3169784
-* Sun Jan 02 2011 Rex Dieter <rdieter at fedoraproject.org> - 2.0.16-9
+* Sun Jan 02 2011 Rex Dieter <rdieter at fedoraproject.org> - 2.0.16-11
- rebuild (poppler)
* Wed Dec 15 2010 Rex Dieter <rdieter at fedoraproject.org> - 2.0.16-8
More information about the scm-commits
mailing list